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

用逻辑与扩展证明规则验证程序:深嵌入与浅嵌入

Verifying Programs with Logic and Extended Proof Rules: Deep Embedding v.s. Shallow Embedding

Zhongye Wang, Qinxiang Cao, Yichen Tao

AI总结:

本文系统研究程序逻辑深嵌入与浅嵌入对扩展证明规则的影响,提出将浅嵌入逻辑提升为深嵌入逻辑的方法,并在VST和Iris上验证其有效性。

摘要:

许多基础性的程序验证工具已经被开发出来,用于构建机器检查的程序正确性证明,其中大多数基于Hoare逻辑。它们的程序逻辑、断言语言以及底层编程语言可以通过浅嵌入或深嵌入来形式化。像Iris和早期版本的Verified Software Toolchain(VST)这样的工具选择了不同的浅嵌入来形式化它们的程序逻辑。但这些不同嵌入的优缺点尚未得到充分研究。因此,本文希望研究程序逻辑的嵌入方式对逻辑证明规则的影响。本文考虑了一组有用的扩展证明规则,以及四种不同的逻辑嵌入:一种深嵌入和三种常见的浅嵌入。我们证明了这些扩展规则在这些嵌入下的有效性,并讨论了它们的主要挑战。此外,我们提出了一种将现有浅嵌入逻辑提升为深嵌入逻辑的方法,以极大简化特定证明系统中扩展规则的证明。我们在两个现有验证工具上评估了我们的结果。我们将原本浅嵌入的VST提升为深嵌入的VST以支持扩展规则,并基于Iris框架实现了Iris-CF和深嵌入的Iris-Imp,以在真实验证项目中评估我们的理论。

英文摘要:

Many foundational program verification tools have been developed to build machine-checked program correctness proofs, a majority of which are based on Hoare logic. Their program logics, their assertion languages, and their underlying programming languages can be formalized by either a shallow embedding or a deep embedding. Tools like Iris and early versions of Verified Software Toolchain (VST) choose different shallow embeddings to formalize their program logics. But the pros and cons of these different embeddings were not yet well studied. Therefore, we want to study the impact of the program logic's embedding on logic's proof rules in this paper. This paper considers a set of useful extended proof rules, and four different logic embeddings: one deep embedding and three common shallow embeddings. We prove the validity of these extended rules under these embeddings and discuss their main challenges. Furthermore, we propose a method to lift existing shallowly embedded logics to deeply embedded ones to greatly simplify proofs of extended rules in specific proof systems. We evaluate our results on two existing verification tools. We lift the originally shallowly embedded VST to our deeply embedded VST to support extended rules, and we implement Iris-CF and deeply embedded Iris-Imp based on the Iris framework to evaluate our theory in real verification projects.

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

↑