形式化验证一个实用的验证条件生成器(扩展版)
Formally Validating a Practical Verification Condition Generator (extended version)
摘要:
一个程序验证器产生可靠的结果,只有当两个逻辑用于证明程序的正确性是健全的,程序验证器的实现本身是正确的。尽管形式上证明逻辑的可靠性是很常见的,但验证器的实现通常仍然未经验证。验证器实现中的错误可能会危及成功验证结果的可信度。由于程序验证器在实践中使用的是复杂的,不断发展的软件系统,它通常是不可行的,正式验证其实现。在本文中,我们提出了一种替代方法:我们验证成功运行的广泛使用的布吉验证器通过产生一个证书,证明所获得的验证结果的正确性。Boogie执行一系列复杂的程序翻译,然后最终生成一个验证条件,其有效性应该意味着输入程序的正确性。我们将展示如何证明三个布吉的核心转型阶段:消除循环控制流路径,(SSA样)的假设使用新的变量(被动化),并最终生成的验证条件的替代分配。类似的翻译被其他验证者采用。我们的实现在Isabelle中生成证书,基于Boogie语言的新颖形式化。
英文摘要:
A program verifier produces reliable results only if both the logic used to justify the program's correctness is sound, and the implementation of the program verifier is itself correct. Whereas it is common to formally prove soundness of the logic, the implementation of a verifier typically remains unverified. Bugs in verifier implementations may compromise the trustworthiness of successful verification results. Since program verifiers used in practice are complex, evolving software systems, it is generally not feasible to formally verify their implementation. In this paper, we present an alternative approach: we validate successful runs of the widely-used Boogie verifier by producing a certificate which proves correctness of the obtained verification result. Boogie performs a complex series of program translations before ultimately generating a verification condition whose validity should imply the correctness of the input program. We show how to certify three of Boogie's core transformation phases: the elimination of cyclic control flow paths, the (SSA-like) replacement of assignments by assumptions using fresh variables (passification), and the final generation of verification conditions. Similar translations are employed by other verifiers. Our implementation produces certificates in Isabelle, based on a novel formalisation of the Boogie language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。