arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2304.01284cs.PL
收藏

递归程序的自动化期望值分析

Automated Expected Value Analysis of Recursive Programs

Martin Avanzini, Georg Moser, Michael Schaper

AI总结:

本文提出 infer[.] 项表示,将含过程、局部变量和递归的概率程序前置期望语义转化为可自动求解的一阶约束,并在原型 ev-imp 中验证其表达能力。

摘要:

在这项工作中,我们研究在存在过程、局部变量和递归等自然编程构造的情况下,对概率程序的期望结果值进行全自动推断。尽管捕获这些构造至关重要,但其实现却非常不平凡。关键贡献是定义了一种表示为 infer[.] 的项表示,它将前置期望语义转换为一阶约束,这些约束易于通过标准方法实现自动化。一个关键步骤是使用逻辑变量,其灵感来自先前关于递归程序 Hoare 逻辑的工作。值得注意的是,我们的方法并不局限于尾递归——尾递归无疑可以被迭代替代,因而不需要额外的洞见。我们已在原型工具 ev-imp 中实现了该分析,并提供了充分的实验证据,证明该原型在算法上的表达能力。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑