Encode the ∀∃ Relational Hoare Logic into Standard Hoare Logic
Shushu Wu, Xiwei Wu, Qinxiang Cao
Abstract
Verifying a real-world program’s functional correctness can be decomposed into (1) a refinement proof showing that the program implements a more abstract high-level program and (2) an algorithm correctness proof at the high level. Relational Hoare logic serves as a powerful tool to establish refinement but often necessitates formalization beyond standard Hoare logic. Particularly in the nondeterministic setting, the ∀∃ relational Hoare logic is required. Existing approaches encode this logic into a Hoare logic with ghost states and invariants, yet these extensions significantly increase formalization complexity and soundness proof overhead. This paper proposes a generic encoding theory that reduces the ∀∃ relational Hoare logic to standard (unary) Hoare logic. Precisely, we propose to redefine the validity of relational Hoare triples while preserving the original proof rules and then encapsulate the ∀∃ pattern within assertions. We have proved that the validity of encoded standard Hoare triples is equivalent to the validity of the desired relational Hoare triples. Moreover, the encoding theory demonstrates how common relational Hoare logic proof rules are indeed special cases of standard Hoare logic proof rules, and relational proof steps correspond to standard proof steps. Our theory enables standard Hoare logic to prove ∀∃ relational properties by defining a predicate Exec , without requiring modifications to the logic framework or re-verification of soundness.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 550e478d-fb3c-4b3c-9dfc-d36a5648f8f2Builds on12
- Incorrectness logicPeter W. O'HearnPOPL 2020 · 122 citations
- Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun et al.OOPSLA 2023 · 86 citations
- The next 700 relational program logicsKenji Maillard, Catalin Hritcu, Exequiel Rivas, Antoine Van MuylderPOPL 2020 · 41 citations
- Simuliris: a separation logic framework for verifying concurrent program optimizationsLennard Gäher, Michael Sammler, Simon Spies, Ralf Jung et al.POPL 2022 · 33 citations
- Transfinite Iris: resolving an existential dilemma of step-indexed separation logicSimon Spies, Lennard Gäher, Daniel Gratzer, Joseph Tassarotti et al.PLDI 2021 · 32 citations
Related papers
- Hyper Hoare Logic: (Dis-)Proving Program HyperpropertiesThibault Dardinier, Peter MüllerPLDI 2024 · 28 citations
- Infinitary Relational LogicVladimir Gladshtein, Qiyuan Zhao, Yuxi Ling, Sean Wang et al.OOPSLA 2026
- Structural Temporal Logic for Mechanized Program VerificationEleftherios Ioannidis, Yannick Zakowski, Steve Zdancewic, Sebastian AngelOOPSLA 2025 · 1 citation
- Alignment Completeness for Relational Hoare LogicsRamana Nagasamudram, David A. NaumannLICS 2021 · 10 citations
- Hypra: A Deductive Program Verifier for Hyper Hoare LogicThibault Dardinier, Anqi Li, Peter MüllerOOPSLA 2024 · 6 citations
