From Hoare Logic to Matching Logic

Grigore Roşu · Illinois Digital Environment for Access to Learning and Scholarship (University of Illinois at Urbana-Champaign) · 2012

Matching logic has been recently proposed as an alternative program verification approach. Unlike Hoare logic, where one defines a language-specific proof system that needs to be proved sound for each language separately, matching logic provides a language-independent and sound proof system that directly uses the trusted operational semantics of the language as axioms. Matching logic thus has a clear practical advantage: it eliminates the need for an additional semantics of the same language in order to reason about programs, and implicitly eliminates the need for tedious soundness proofs. What is not clear, however, is whether matching logic is as powerful as Hoare logic. This paper introduces a technique to mechanically translate Hoare logic proof derivations into equivalent matching logic proof derivations. The presented technique has two consequences: first, it suggests that matching logic has no theoretical limitation over Hoare logic; and second, it provides a new approach to prove Hoare logics sound.

Read the paper · More papers on PaperTik