paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Borrowing from Session Types

从会话类型中借用
OOPSLA 9(OOPSLA2)2025匹配度 1/10 · 该论文属于纯类型系统/会话类型方向,研究借用式 API、有序线性类型与死锁自由,不涉及 LLM/Agent、机器学习系统静态分析、浮点程序分析或贝叶斯程序分析,与用户当前核心研究方向基本无关。引用 0 inbox
Hannes Saffrich, Janek Spaderna, Peter Thiemann, Vasco T. Vasconcelos
crossref: 2026-09-10

AI 速览

一句话:提出基于借用的会话类型 API 与 BGV 演算,用有序线性类型和到 PGV 的翻译保证类型安全与无死锁。

传统函数式会话类型系统把通道作为一等值,其 API 在处理模块性与可组合性时常常带来冗余限制。本文提出一种基于 borrowing(借用)的会话类型 API,并形式化为核心演算 BGV。该演算建立在有序线性类型之上,提供显式的通道所有权分割操作,使会话类型客户端代码更模块化、可组合。为奠定语义,作者给出从 BGV 到无死锁函数式会话类型演算 PGV 的类型保持翻译,并由此证明 BGV 的类型安全与死锁自由。论文还给出支持借用记法的外部语言版本,开发了算法化类型系统,并机器验证从外部语言到 BGV 的翻译,从而确立可判定类型检查。

问题
传统带一等通道的函数式会话类型 API 常损害模块性与可组合性,并可能施加不必要的限制或代码混乱。
方法
提出基于借用的会话类型 API 与核心演算 BGV,采用有序线性类型和显式通道所有权分割;通过到无死锁演算 PGV 的类型保持翻译定义语义,并提供支持借用记法的外部语言。
评估
利用到 PGV 的翻译证明类型安全与死锁自由;给出算法化类型系统,并机器验证外部语言到 BGV 的翻译以确立可判定类型检查。
原文摘要(Abstract)

Session types provide a formal framework to enforce rich communication protocols, ensuring correctness properties such as type safety and deadlock freedom. However, the traditional API of functional session type systems with first-class channels often leads to problems with modularity and composability. This paper proposes a new, alternative session type API based on borrowing, embodied in the core calculus BGV. The borrowing-based API enables building modular and composable code for session type clients without imposing clutter or undue limitations. Its basis is a novel type system, founded on ordered linear typing, for functional session types with an explicit operation for splitting ownership of channels. We establish the semantics of BGV via a type-preserving translation to PGV, a deadlock-free functional session type calculus. We establish type safety and deadlock freedom for BGV by this translation. We also present an external version of BGV that supports use of borrow notation. We developed an algorithmic version of the type system that includes a mechanized verified translation from the external language to BGV. This part establishes decidable type checking.

链接与引用

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

BibTeX
@article{paperbot2928,
  title = {Borrowing from Session Types},
  author = {Hannes Saffrich and Janek Spaderna and Peter Thiemann and Vasco T. Vasconcelos},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763173}
}