🤖 AI Summary
Automated verification in separation logic (SL) has long relied on ad hoc heuristics, lacking a systematic metatheory and suffering from poor scalability. Method: This paper establishes the first general SL metatheory grounded in category theory and algebraic structures—specifically functors, homomorphisms, and modules over rings—systematically integrating abstract algebra into SL automation. The framework supports compositional model instantiation and modular predicate synthesis for any data structure admitting an algebraic characterization. All results are formally verified in Isabelle/HOL, and an automatic algebraic instantiation algorithm is developed. Contribution/Results: Experiments demonstrate fully automated algebraic modeling of complex imperative program semantics—including lists, trees, and graphs—and yield inference engines whose performance matches state-of-the-art hand-crafted systems. This approach decisively overcomes the scalability limitations inherent in heuristic-based methods.
📝 Abstract
Foundational verification considers the functional correctness of programming languages with formalized semantics and uses proof assistants (e.g., Coq, Isabelle) to certify proofs. The need for verifying complex programs compels it to involve expressive Separation Logics (SLs) that exceed the scopes of well-studied automated proof theories, e.g., symbolic heap. Consequently, automation of SL in foundational verification relies heavily on ad-hoc heuristics that lack a systematic meta-theory and face scalability issues. To mitigate the gap, we propose a theory to specify SL predicates using abstract algebras including functors, homomorphisms, and modules over rings. Based on this theory, we develop a generic SL automation algorithm to reason about any data structures that can be characterized by these algebras. In addition, we also present algorithms for automatically instantiating the algebraic models to real data structures. The instantiation works compositionally, reusing the algebraic models of component structures and preserving their data abstractions. Case studies on formalized imperative semantics show our algorithm can instantiate the algebraic models automatically for a variety of complex data structures. Experimental results indicate the automatically instantiated reasoners from our generic theory show similar results to the state-of-the-art systems made of specifically crafted reasoning rules. The presented theories, proofs, and the verification framework are formalized in Isabelle/HOL.