paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Automated Expected Value Analysis of Recursive Programs

递归程序的自动化期望值分析
PLDI 7(PLDI)2023匹配度 5/10 · 该论文属于概率程序/贝叶斯程序分析的形式化与自动化,使用前期望语义和约束求解推断递归概率程序期望值,与“贝叶斯程序分析”方向有一定关联,并兼具形式化与原型实现。但它不涉及 LLM/Agent、浮点程序分析或 AI 辅助静态分析/形式化验证等用户当前核心交叉点。引用 6 inbox
Martin Avanzini, Georg Moser, Michael Schaper
crossref: 2026-09-10

AI 速览

一句话:提出将前期望语义翻译为一阶约束的项表示,实现递归概率程序期望值的全自动推断。

本文研究含过程、局部变量与递归等自然语言构造的概率程序中,期望结果值的全自动推断。这类构造对分析至关重要,却使自动化变得十分困难。作者提出一种项表示 infer[.],将前期望(pre-expectation)语义翻译为一阶约束,从而可借助标准求解方法实现自动分析。受递归程序 Hoare 逻辑工作启发,该方法引入逻辑变量处理递归,并且不局限于可由迭代替代的尾递归。作者在原型工具 ev-imp 中实现了该分析,并通过大量实验展示了其算法表达能力。

问题
如何对含过程、局部变量和递归的概率程序全自动推断期望结果值。
方法
定义项表示 infer[.],将前期望语义编码为一阶约束,并借助逻辑变量支持递归,包括非尾递归。
评估
在原型工具 ev-imp 中实现该分析,并通过大量实验展示其算法表达能力和自动化程度。
原文摘要(Abstract)

In this work, we study the fully automated inference of expected result values of probabilistic programs in the presence of natural programming constructs such as procedures, local variables and recursion. While crucial, capturing these constructs becomes highly non-trivial. The key contribution is the definition of a term representation, denoted as infer[.], translating a pre-expectation semantics into first-order constraints, susceptible to automation via standard methods. A crucial step is the use of logical variables, inspired by previous work on Hoare logics for recursive programs. Noteworthy, our methodology is not restricted to tail-recursion, which could unarguably be replaced by iteration and wouldn't need additional insights. We have implemented this analysis in our prototype ev-imp. We provide ample experimental evidence of the prototype's algorithmic expressibility.

链接与引用

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

BibTeX
@article{paperbot1987,
  title = {Automated Expected Value Analysis of Recursive Programs},
  author = {Martin Avanzini and Georg Moser and Michael Schaper},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591263}
}