arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.26386cs.PL
收藏

面向目的感知编程的类型状态方法

A Typestate Approach to Purpose-aware Programming

University of Massachusetts Lowell(马萨诸塞大学洛厄尔分校)

Joan Montas, Samuel Dodson, Anitha Gollamudi, Matteo Cimini

AI总结:

提出基于类型状态(typestate)的PurPL语言,通过类型状态表示数据使用目的集合,实现编译时目的合规性验证。

摘要:

现实应用通常需要验证敏感数据是否被用于其预期目的。然而,现有文献在此领域关于编译时保证的结果有限。本文探索使用类型状态(typestate)来推理数据的目的。在类型状态中,类型具有状态,可以以自动机的方式转换到其他状态。在我们的方法中,敏感数据类型的状态被定义为数据可用于的目的集合。该集合可以在运行时增长或缩小,因为目的可以在执行过程中添加或移除。本文开发了PurPL,一种面向对象的编程语言,其类型状态系统能够推理目的以及根据目的的数据使用合规性。我们通过示例概述了PurPL,并提出了一个形式化类型系统。我们还实现了PurPL的类型检查器,并报告了我们在处理敏感数据的各种编程场景中类型检查的实验结果。

英文摘要:

Real-world applications often require verification that sensitive data is being used for their intended purpose. However, existing literature offers limited results regarding compile-time guarantees in this domain. In this paper, we explore the use of typestate to reason about the purpose of data. In typestate, types have a state, which can transition to other states in the style of automata. In our approach, the state of the type of sensitive data is defined as the set of purposes for which the data can be used. This set can grow or shrink at runtime as purposes can be added or removed during execution. In this paper, we have developed PurPL, an object-oriented programming language that features a typestate system that is capable of reasoning about purposes and data usage compliance according to them. We give an overview of PurPL through examples and present a formal type system. We have also implemented PurPL's type checker, and we report on our experiments with type checking various programming scenarios that handle sensitive data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑