Verifying Programs with Logic and Extended Proof Rules: Deep Embedding v.s. Shallow Embedding
Zhongye Wang, Qinxiang Cao, Yichen Tao

TL;DR
This paper compares deep and shallow embeddings in program verification logics, analyzing their impact on proof rules, and proposes a method to lift shallow embeddings to deep ones, demonstrated on existing tools.
Contribution
It provides a formal comparison of deep versus shallow embeddings for program logics and introduces a lifting method to simplify proofs in verification tools.
Findings
Deep embeddings facilitate proof rule validation.
Shallow embeddings are easier to implement but less flexible.
Lifting shallow to deep embeddings simplifies extended rule proofs.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFormal Methods in Verification · Logic, programming, and type systems · Software Testing and Debugging Techniques
