paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Nested Session Types

嵌套会话类型
TOPLAS 44(3)2022匹配度 3/10 · 论文属于会话类型与类型系统理论,虽涉及形式化证明和语言实现,但与用户核心关注的PL与AI交叉(如静态分析用于ML/Agentic程序、LLM改进静态分析)、浮点程序分析及贝叶斯程序分析均无直接关联。引用 4 inbox
Ankush Das, Henry Deyoung, Andreia Mordido, Frank Pfenning
crossref: 2026-09-10

AI 速览

一句话:为会话类型引入 prenex 多态与嵌套递归数据类型,证明类型等价可判定并提出高效可靠算法。

会话类型可静态描述并发消息传递进程之间的通信协议,但即使在受限的 prenex 形式下,参数多态在会话类型中的理论仍未被充分理解。本文给出扩展 prenex 多态的会话类型元理论,并由此支持嵌套递归数据类型。作者证明类型等价是可判定的,方法是将该问题归约为确定性一阶文法的 trace equivalence;鉴于该归约的理论复杂度较高,又提出一种新的类型等价算法并证明其可靠性。该算法虽不完备,但作者观察到其效率出奇地高,且足以处理论文中的所有例子。作者通过扩展 Rast 编程语言实现这些思想,并用若干示例展示增强后类型系统的表达力。

问题
如何在会话类型中理解 prenex 参数多态及其导致的嵌套递归数据类型,并判定类型等价。
方法
建立扩展 prenex 多态的会话类型元理论,将类型等价归约到确定性一阶文法的 trace equivalence,并提出一种可靠的类型等价算法;在 Rast 语言中实现该类型系统。
评估
通过可判定性证明和算法可靠性证明进行理论评估,并在 Rast 实现中结合多个示例考察算法效率与类型系统表达力。
原文摘要(Abstract)

Session types statically describe communication protocols between concurrent message-passing processes. Unfortunately, parametric polymorphism even in its restricted prenex form is not fully understood in the context of session types. In this article, we present the metatheory of session types extended with prenex polymorphism and, as a result, nested recursive datatypes. Remarkably, we prove that type equality is decidable by exhibiting a reduction to trace equivalence of deterministic first-order grammars. Recognizing the high theoretical complexity of the latter, we also propose a novel type equality algorithm and prove its soundness. We observe that the algorithm is surprisingly efficient and, despite its incompleteness, sufficient for all our examples. We have implemented our ideas by extending the Rast programming language with nested session types. We conclude with several examples illustrating the expressivity of our enhanced type system.

链接与引用

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

BibTeX
@article{paperbot1612,
  title = {Nested Session Types},
  author = {Ankush Das and Henry Deyoung and Andreia Mordido and Frank Pfenning},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {44},
  number = {3},
  year = {2022},
  doi = {10.1145/3539656}
}