paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Chemical Approach to Typestate-Oriented Programming

Typestate 导向编程的化学方法
TOPLAS 39(3)2017匹配度 3/10 · 该论文属于类型系统与并发对象协议的形式化研究,与用户关注的“PL→AI/AI→PL”、浮点程序分析、贝叶斯程序分析等核心方向没有直接交集。虽然涉及 typestate 与静态类型/行为类型,但并非面向 LLM/Agent、机器学习系统或浮点/贝叶斯分析场景。引用 10 inbox
Silvia Crafa, Luca Padovani
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出基于化学隐喻的 typestate 导向编程,以消息分子和化学反应建模并发状态变换,并用行为类型控制对象协议与共享。

论文针对 typestate 面向对象编程通常假定对象状态由单一控制流访问和修改的局限,提出一种基于化学隐喻的方法:对象状态与操作被表示为消息分子,状态转移被表示为化学反应。由此可在本质并发的环境中研究 typestate,多个进程能同时访问对象并只修改其部分状态。作者引入简单的行为类型理论,统一表达对象的私有与公共接口,描述并强制由可能性、禁止与义务构成的结构化对象协议,同时控制对象共享。其贡献是为并发 typestate 提供统一的协议规范与类型化机制,摘要未报告实证性能评估。

问题
如何在对象可被多个进程并发访问、且各进程可能只修改部分状态的场景下表达并强制 typestate 协议,并控制对象共享?
方法
采用化学隐喻,将对象状态与操作建模为消息分子、状态变换建模为化学反应,并引入行为类型理论统一刻画对象的私有/公共接口及可能性、禁止、义务组成的协议。
评估
摘要未报告实证评估;论文以形式化行为类型理论和协议描述来展示该方法在并发 typestate 场景中的表达与强制能力。
原文摘要(Abstract)

We introduce a novel approach to typestate-oriented programming based on the chemical metaphor: state and operations on objects are molecules of messages, and state transformations are chemical reactions. This approach allows us to investigate typestate in an inherently concurrent setting, whereby objects can be accessed and modified concurrently by several processes, each potentially changing only part of their state. We introduce a simple behavioral type theory to express in a uniform way both the private and the public interfaces of objects; describe and enforce structured object protocols consisting of possibilities, prohibitions, and obligations; and control object sharing.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{CrafaP17,
  title = {The Chemical Approach to Typestate-Oriented Programming},
  author = {Silvia Crafa and Luca Padovani},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {39},
  number = {3},
  year = {2017},
  doi = {10.1145/3064849}
}