arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.16054cs.LO
收藏

带While循环的基于满足的概率Hoare逻辑的相对完备性研究

On the Relative Completeness of Satisfaction-based Probabilistic Hoare Logic With While Loop

Xin Sun, Xingchi Su, Xiaoning Bian, Anran Cui

AI总结:

本文针对带While循环的基于满足的概率Hoare逻辑的相对完备性这一长期开放问题,构建新型PHL系统,通过两步证明其相对完备性,为随机化程序的概率性质验证提供了理论基础。

摘要:

概率Hoare逻辑(PHL)是Hoare逻辑的扩展,在验证随机化程序方面尤为有用。它使研究人员能够对含随机元素的程序行为进行形式化推理,确保所需的概率性质得到满足。自1979年首个PHL诞生以来,基于满足的PHL的相对完备性一直是一个开放问题。更具体地说,目前还没有带While循环的基于满足的PHL被证明是相对完备的。本文通过建立一种新的带While循环的PHL并证明其相对完备性,解决了这一问题。我们的PHL所涉及的编程语言与现有PHL系统在表达能力上等价,但在证明完备性方面带来了诸多便利。While循环命令的最弱前置项揭示了它如何改变计算机状态的概率性质,同时考虑了终止的执行分支和无限运行两种情况。我们分两步证明该PHL的相对完备性。首先,我们建立了含概率程序和确定性断言的Hoare三元组的语义与证明系统。然后,利用确定性断言的最弱前置条件,我们构建了概率表达式的最弱前置项演算。该PHL的相对完备性随后作为最弱前置项演算的推论得到。

英文摘要:

Probabilistic Hoare logic (PHL) is an extension of Hoare logic and is specifically useful in verifying randomized programs. It allows researchers to formally reason about the behavior of programs with stochastic elements, ensuring the desired probabilistic properties are upheld. The relative completeness of satisfaction-based PHL has been an open problem ever since the birth of the first PHL in 1979. More specifically, no satisfaction-based PHL with While-loop has been proven to be relatively complete yet. This paper solves this problem by establishing a new PHL with While-loop and prove its relative completeness. The programming language concerned in our PHL is expressively equivalent to the existing PHL systems but brings a lot of convenience in showing completeness. The weakest preterm for While-loop command reveals how it changes the probabilistic properties of computer states, considering both execution branches that halt and infinite runs. We prove the relative completeness of our PHL in two steps. We first establish a semantics and proof system of Hoare triples with probabilistic programs and deterministic assertions. Then, by utilizing the weakest precondition of deterministic assertions, we construct the weakest preterm calculus of probabilistic expressions. The relative completeness of our PHL is then obtained as a consequence of the weakest preterm calculus.

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

↑