paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Gradual Probabilistic Lambda Calculus

渐进概率 lambda 演算
OOPSLA 7(OOPSLA1)2023匹配度 3/10 · 论文是概率 lambda 演算的渐进类型系统,属于概率程序语言的形式化基础,与贝叶斯程序分析有间接关联;但不涉及静态分析在 ML/Agent 系统中的应用、LLM 与静态分析交叉、浮点程序分析等核心方向。引用 3 inbox
Wenjia Ye, Matías Toro, Federico Olmedo
crossref: 2026-09-10

AI 速览

一句话:提出并形式化 GPLC,首个渐进类型的概率 lambda 演算,证明其类型安全并满足渐进保证。

概率编程语言常通过类型系统进行静态检查以建立不变量,但静态类型约束可能繁琐或过度保守。渐进类型支持静态与动态检查的平滑过渡,但尚未在概率语言中探索。本文提出并形式化 GPLC——一个渐进源概率 lambda 演算。GPLC 含有二元概率选择算子,允许程序员渐进地引入或移除静态类型与概率标注。其静态语义依赖概率耦合(probabilistic couplings)来定义一致性、精度与一致传递性等关系;动态语义通过 elaboration 到目标语言 TPLC 给出,TPLC 采用基于分布的语义,将程序解释为最终值上的概率分布。元理论方面,作者证明 TPLC 以及 GPLC 是类型安全的,并满足渐进语言两条 refined criteria:它是全静态变体的保守扩展,且满足渐进保证(gradual guarantee),关于类型精度表现出平滑行为。

问题
概率编程语言中的静态类型检查有助于建立不变量,但可能过于繁琐或保守;渐进类型在概率语言中的应用尚未被探索。
方法
提出 GPLC,包含二元概率选择算子,支持渐进引入/移除静态类型与概率标注;静态语义基于概率耦合定义一致性、精度与一致传递性,动态语义经 elaboration 到具有分布语义的 TPLC。
评估
通过形式化元理论证明:TPLC 与 GPLC 类型安全,并满足渐进语言的两条 refined criteria,即对全静态变体的保守扩展与关于类型精度的渐进保证。
原文摘要(Abstract)

Probabilistic programming languages have recently gained a lot of attention, in particular due to their applications in domains such as machine learning and differential privacy. To establish invariants of interest, many such languages include some form of static checking in the form of type systems. However, adopting such a type discipline can be cumbersome or overly conservative. Gradual typing addresses this problem by supporting a smooth transition between static and dynamic checking, and has been successfully applied for languages with different constructs and type abstractions. Nevertheless, its benefits have never been explored in the context of probabilistic languages. In this work, we present and formalize GPLC, a gradual source probabilistic lambda calculus. GPLC includes a binary probabilistic choice operator and allows programmers to gradually introduce/remove static type–and probability–annotations. The static semantics of GPLC heavily relies on the notion of probabilistic couplings, as required for defining several relations, such as consistency, precision, and consistent transitivity. The dynamic semantics of GPLC is given via elaboration to the target language TPLC, which features a distribution-based semantics interpreting programs as probability distributions over final values. Regarding the language metatheory, we establish that TPLC–and therefore also GPLC–is type safe and satisfies two of the so-called refined criteria for gradual languages, namely, that it is a conservative extension of a fully static variant and that it satisfies the gradual guarantee, behaving smoothly with respect to type precision.

链接与引用

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

BibTeX
@article{paperbot2028,
  title = {A Gradual Probabilistic Lambda Calculus},
  author = {Wenjia Ye and Matías Toro and Federico Olmedo},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA1},
  year = {2023},
  doi = {10.1145/3586036}
}