On incorrectness logic and Kleene algebra with top and tests
Cheng Zhang, Arthur Azevedo de Amorim, Marco Gaboardi
Abstract
Kleene algebra with tests (KAT) is a foundational equational framework for reasoning about programs, which has found applications in program transformations, networking and compiler optimizations, among many other areas. In his seminal work, Kozen proved that KAT subsumes propositional Hoare logic, showing that one can reason about the (partial) correctness of while programs by means of the equational theory of KAT. In this work, we investigate the support that KAT provides for reasoning about incorrectness, instead, as embodied by O'Hearn's recently proposed incorrectness logic. We show that KAT cannot directly express incorrectness logic. The main reason for this limitation can be traced to the fact that KAT cannot express explicitly the notion of codomain, which is essential to express incorrectness triples. To address this issue, we study Kleene Algebra with Top and Tests (TopKAT), an extension of KAT with a top element. We show that TopKAT is powerful enough to express a codomain operation, to express incorrectness triples, and to prove all the rules of incorrectness logic sound. This shows that one can reason about the incorrectness of while-like programs by means of the equational theory of TopKAT.
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 7fd755d3-519d-475d-826c-df9e18dbfde7Cited by top-tier papers5
- Outcome Logic: A Unifying Foundation for Correctness and Incorrectness ReasoningNoam Zilberstein, Derek Dreyer, Alexandra SilvaOOPSLA 2023 · 39 citations
- An Algebra of Alignment for Relational VerificationTimos Antonopoulos, Eric Koskinen, Ton Chanh Le, Ramana Nagasamudram et al.POPL 2023 · 17 citations
- Calculational Design of [In]Correctness Transformational Program Logics by Abstract InterpretationPatrick CousotPOPL 2024 · 11 citations
- Existential Calculi of Relations with Transitive Closure: Complexity and Edge SaturationsYoshiki NakamuraLICS 2023 · 4 citations
- A Taxonomy of Hoare-Like Logics: Towards a Holistic View using Predicate Transformers and Kleene Algebras with Top and TestsLena Verscht, Benjamin Lucien KaminskiPOPL 2025 · 3 citations
Builds on2
Related papers
- Algebraic reasoning of Quantum programs via non-idempotent Kleene algebraYuxiang Peng, Mingsheng Ying, Xiaodi WuPLDI 2022 · 13 citations
- Guarded Kleene algebra with tests: verification of uninterpreted programs in nearly linear timeSteffen Smolka, Nate Foster, Justin Hsu, Tobias Kappé et al.POPL 2020 · 32 citations
- Kleene algebra modulo theories: a framework for concrete KATsMichael Greenberg, Ryan Beckett, Eric Hayden CampbellPLDI 2022 · 7 citations
- Revealing Sources of (Memory) Errors via Backward AnalysisFlavio Ascari, Roberto Bruni, Roberta Gori, Francesco LogozzoOOPSLA 2025 · 4 citations
- On Extending Incorrectness Logic with Backwards ReasoningFreek Verbeek, Md Syadus Sefat, Zhoulai Fu, Binoy RavindranPOPL 2025 · 1 citation
