paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Mechanizing Session-Types using a Structural View: Enforcing Linearity without Linearity

以结构化视角机械化会话类型:不依赖线性类型而强制线性
OOPSLA 7(OOPSLA2)2023匹配度 2/10 · 论文研究会话类型与线性类型系统的机械化证明,属于纯PL/形式化验证领域,但未涉及用户核心关注的LLM/Agent与静态分析/程序分析的交叉、浮点程序分析或贝叶斯程序分析,也无工业落地或问题驱动分析,因此与用户研究方向匹配度低。引用 10 inbox
Chuta Sano, Ryan Kavanagh, Brigitte Pientka
crossref: 2026-09-10

AI 速览

一句话:把线性条件嵌入类型判断,用结构上下文在 Beluga 中机械化会话类型及类型保持证明。

会话类型依赖线性类型系统来保证通信通道不被隐式复制或丢弃,因此其机械化通常需要线性上下文并小心处理通道。本文提出一种结构化视角:将线性条件局部化为嵌入类型判断的额外谓词,从而可用结构类型的上下文代替线性上下文;该方法特别适合结合弱高阶抽象语法(weak HOAS)处理通道移动性及复杂绑定结构。作者在证明助手 Beluga 中(编码语言为 LF)机械化了一个基于经典线性逻辑的会话类型系统及其类型保持证明,并证明了编码的 adequacy。结果展示了该方法在建模会话类型等子结构系统时的可操作性与有效性。

问题
会话类型系统的机械化通常必须显式建模线性通道上下文,以确保通道不被复制或丢弃,这使处理通道移动性和绑定结构变得复杂。
方法
将线性约束局部化为类型判断中的谓词,改用结构上下文,并在 Beluga/LF 中使用弱 HOAS 机械化经典线性逻辑的会话类型系统、类型保持证明与编码 adequacy。
评估
在 Beluga 中完成该会话类型系统及其类型保持证明的机械化与 adequacy 证明,展示该方法对子结构系统建模的可操作性和有效性。
原文摘要(Abstract)

Session types employ a linear type system that ensures that communication channels cannot be implicitly copied or discarded. As a result, many mechanizations of these systems require modeling channel contexts and carefully ensuring that they treat channels linearly. We demonstrate a technique that localizes linearity conditions as additional predicates embedded within type judgments, which allows us to use structural typing contexts instead of linear ones. This technique is especially relevant when leveraging (weak) higher-order abstract syntax to handle channel mobility and the intricate binding structures that arise in session-typed systems. Following this approach, we mechanize a session-typed system based on classical linear logic and its type preservation proof in the proof assistant Beluga, which uses the logical framework LF as its encoding language. We also prove adequacy for our encoding. This shows the tractability and effectiveness of our approach in modelling substructural systems such as session-typed languages.

链接与引用

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

BibTeX
@article{paperbot1824,
  title = {Mechanizing Session-Types using a Structural View: Enforcing Linearity without Linearity},
  author = {Chuta Sano and Ryan Kavanagh and Brigitte Pientka},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA2},
  year = {2023},
  doi = {10.1145/3622810}
}