Lune

POPL2022Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Algebra of Alignment for Relational Verification cites Incorrectness logic
  • A Taxonomy of Hoare-Like Logics: Towards a Holistic View using Predicate Transformers and Kleene Algebras with Top and Tests cites Incorrectness logic
  • A Taxonomy of Hoare-Like Logics: Towards a Holistic View using Predicate Transformers and Kleene Algebras with Top and Tests cites Calculational Design of [In]Correctness Transformational Program Logics by Abstract Interpretation
  • A Taxonomy of Hoare-Like Logics: Towards a Holistic View using Predicate Transformers and Kleene Algebras with Top and Tests cites Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning
  • Existential Calculi of Relations with Transitive Closure: Complexity and Edge Saturations cites Incorrectness logic
  • Local Reasoning About the Presence of Bugs: Incorrectness Separation Logic cites Incorrectness logic
  • Calculational Design of [In]Correctness Transformational Program Logics by Abstract Interpretation cites Local Reasoning About the Presence of Bugs: Incorrectness Separation Logic
  • Calculational Design of [In]Correctness Transformational Program Logics by Abstract Interpretation cites Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning
  • Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning cites Incorrectness logic
  • Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning cites Local Reasoning About the Presence of Bugs: Incorrectness Separation Logic
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Outcome Logic: A Unifying Foundation for Correctness and Incorrectness ReasoningNoam Zilberstein, Derek Dreyer, Alexandra SilvaOOPSLA 2023 · 39 citations
  2. An Algebra of Alignment for Relational VerificationTimos Antonopoulos, Eric Koskinen, Ton Chanh Le, Ramana Nagasamudram et al.POPL 2023 · 17 citations
  3. Calculational Design of [In]Correctness Transformational Program Logics by Abstract InterpretationPatrick CousotPOPL 2024 · 11 citations
  4. Existential Calculi of Relations with Transitive Closure: Complexity and Edge SaturationsYoshiki NakamuraLICS 2023 · 4 citations
  5. 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

  1. Incorrectness logicPeter W. O'HearnPOPL 2020 · 122 citations
  2. Local Reasoning About the Presence of Bugs: Incorrectness Separation LogicAzalea Raad, Josh Berdine, Hoang-Hai Dang, Derek Dreyer et al.CAV 2020 · 70 citations

Related papers

  1. Algebraic reasoning of Quantum programs via non-idempotent Kleene algebraYuxiang Peng, Mingsheng Ying, Xiaodi WuPLDI 2022 · 13 citations
  2. 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
  3. Kleene algebra modulo theories: a framework for concrete KATsMichael Greenberg, Ryan Beckett, Eric Hayden CampbellPLDI 2022 · 7 citations
  4. Revealing Sources of (Memory) Errors via Backward AnalysisFlavio Ascari, Roberto Bruni, Roberta Gori, Francesco LogozzoOOPSLA 2025 · 4 citations
  5. On Extending Incorrectness Logic with Backwards ReasoningFreek Verbeek, Md Syadus Sefat, Zhoulai Fu, Binoy RavindranPOPL 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines