π€ AI Summary
This paper addresses the logical completeness of aligned execution in relational verification, proposing an alignment-complete Relational Hoare Logic (RHL) for ββ- and ββ-relational properties. Methodologically, it introduces semantics-preserving rewrite rules based on Kleene Algebra with Tests (KAT) to uniformly model generalized alignment automata and establishes a novel notion of alignment completeness to assess RHLβs expressive power. Key contributions include: (i) the first proof of alignment completeness of ββ-RHL w.r.t. general alignment automata; (ii) the first formulation and proof of alignment completeness for ββ-RHL; (iii) the establishment of semantic completeness for both ββ- and ββ-RHL over their respective automata classes; and (iv) the mechanized verification of DβOsualdo et al.βs classic hard-to-prove relational examples. This work provides the first formal foundation for relational verification that simultaneously ensures both alignment completeness and semantic completeness.
π Abstract
In relational verification, judicious alignment of computational steps facilitates proof of relations between programs using simple relational assertions. Relational Hoare logics (RHL) provide compositional rules that embody various alignments of executions. Seemingly more flexible alignments can be expressed in terms of product automata based on program transition relations. A single degenerate alignment rule (self-composition), atop a complete Hoare logic, comprises a RHL for $forallforall$ properties that is complete in the ordinary logical sense (Cook'78). The notion of alignment completeness was previously proposed as a more satisfactory measure, and some rules were shown to be alignment complete with respect to a few ad hoc forms of alignment automata. This paper proves alignment completeness with respect to a general class of $forallforall$ alignment automata, for a RHL comprised of standard rules together with a rule of semantics-preserving rewrites based on Kleene algebra with tests. A new logic for $forallexists$ properties is introduced and shown to be alignment complete. The $forallforall$ and $forallexists$ automata are shown to be semantically complete. Thus the logics are both complete in the ordinary sense. Recent work by D'Osualdo et al highlights the importance of completeness relative to assumptions (which we term entailment completeness), and presents $forallforall$ examples seemingly beyond the scope of RHLs. Additional rules enable these examples to be proved in our RHL, shedding light on the open problem of entailment completeness.