paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Probabilistic Resource-Aware Session Types

概率资源感知会话类型
POPL 7(POPL)2023匹配度 3/10 · 该论文属于形式化程序语言与类型系统领域,研究概率会话类型和期望资源分析,虽涉及程序分析与概率/随机算法,但未涉及用户核心关注的LLM/Agentic程序静态分析、AI辅助形式化验证、浮点程序分析或贝叶斯程序分析与LLM的交叉。引用 11 inbox
Ankush Das, Di Wang, Jan Hoffmann
crossref: 2026-09-10

AI 速览

一句话:提出概率会话类型与嵌套多重宇宙语义,实现自动期望资源分析并开发 NomosPro 工具。

会话类型保证消息传递进程遵守通信协议,但已有工作限于确定性语言,无法刻画马尔可夫链、随机分布式算法等概率系统。本文提出概率会话类型,用消息上的概率分布刻画通信,是直觉主义二元会话类型的保守扩展;发送依赖内部或外部随机性。期望资源界分析集成于类型系统,是自动摊销资源分析(AARA)的变体,类型推断借助线性约束求解导出符号界。元理论基于嵌套多重宇宙语义,并有类型重构算法以灵活混合随机源。作者实现的 NomosPro 支持线性时间类型检查,并在随机分布式算法、马尔可夫链与数字合约等场景验证。

问题
已有会话类型工作面向确定性语言,无法直接刻画马尔可夫链、随机分布式算法等概率消息传递系统中的通信协议与期望资源消耗。
方法
提出概率会话类型(消息上的概率分布,保守扩展直觉主义二元会话类型),将期望资源界分析(AARA 变体)集成进类型系统,并给出基于嵌套多重宇宙语义的元理论与类型重构算法,类型推断归约为线性约束求解。
评估
实现 NomosPro 工具,支持线性时间类型检查;在随机分布式算法代价分析、马尔可夫链、摊销数据结构与数字合约等场景开展实验,并实现两个广播协议与一个固定丢包率的有界重传协议,验证 64 状态、420 转移马尔可夫链的极限分布以展示可扩展性。
原文摘要(Abstract)

Session types guarantee that message-passing processes adhere to predefined communication protocols. Prior work on session types has focused on deterministic languages but many message-passing systems, such as Markov chains and randomized distributed algorithms, are probabilistic. To implement and analyze such systems, this article develops the meta theory of probabilistic session types with an application focus on automatic expected resource analysis. Probabilistic session types describe probability distributions over messages and are a conservative extension of intuitionistic (binary) session types. To send on a probabilistic channel, processes have to utilize internal randomness from a probabilistic branching or external randomness from receiving on a probabilistic channel. The analysis for expected resource bounds is smoothly integrated with the type system and is a variant of automatic amortized resource analysis. Type inference relies on linear constraint solving to automatically derive symbolic bounds for various cost metrics. The technical contributions include the meta theory that is based on a novel nested multiverse semantics and a type-reconstruction algorithm that allows flexible mixing of different sources of randomness without burdening the programmer with complex type annotations. The type system has been implemented in the language NomosPro with linear-time type checking. Experiments demonstrate that NomosPro is applicable in different domains such as cost analysis of randomized distributed algorithms, analysis of Markov chains, probabilistic analysis of amortized data structures and digital contracts. NomosPro is also shown to be scalable by (i) implementing two broadcast and a bounded retransmission protocol where messages are dropped with a fixed probability, and (ii) verifying the limiting distribution of a Markov chain with 64 states and 420 transitions.

链接与引用

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

BibTeX
@article{paperbot2060,
  title = {Probabilistic Resource-Aware Session Types},
  author = {Ankush Das and Di Wang and Jan Hoffmann},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {POPL},
  year = {2023},
  doi = {10.1145/3571259}
}