Kleene algebra modulo theories: a framework for concrete KATs
Michael Greenberg, Ryan Beckett, Eric Hayden Campbell
Abstract
Kleene algebras with tests (KATs) offer sound, complete, and decidable equational reasoning about regularly structured programs. Interest in KATs has increased greatly since NetKAT demonstrated how well extensions of KATs with domain-specific primitives and extra axioms apply to computer networks. Unfortunately, extending a KAT to a new domain by adding custom primitives, proving its equational theory sound and complete, and coming up with an efficient implementation is still an expert's task. Abstruse metatheory is holding back KAT's potential.
We offer a fast path to a "minimum viable model" of a KAT, formally or in code through our framework, Kleene algebra modulo theories (KMT). Given primitives and a notion of state, we can automatically derive a corresponding KAT's semantics, prove its equational theory sound and complete with respect to a tracing semantics (programs are denoted as traces of states), and derive a normalization-based decision procedure for equivalence checking. Our framework is based on pushback, a generalization of weakest preconditions that specifies how predicates and actions interact. We offer several case studies, showing tracing variants of theories from the literature (bitvectors, NetKAT) along with novel compositional theories (products, temporal logic, and sets). We derive new results over unbounded state, reasoning about monotonically increasing, unbounded natural numbers. Our OCaml implementation closely matches the theory: users define and compose KATs with the module system.
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 360cd7aa-f2ee-479f-a7fe-569345183801Cited by top-tier papers5
- Data Extraction via Semantic Regular Expression SynthesisQiaochu Chen, Arko Banerjee, Çagatay Demiralp, Greg Durrett et al.OOPSLA 2023 · 24 citations
- An Algebra of Alignment for Relational VerificationTimos Antonopoulos, Eric Koskinen, Ton Chanh Le, Ramana Nagasamudram et al.POPL 2023 · 17 citations
- KATch: A Fast Symbolic Verifier for NetKATMark Moeller, Jules Jacobs, Olivier Savary Bélanger, David Darais et al.PLDI 2024 · 9 citations
- Coinductive Proofs of Regular Expression Equivalence in Zero KnowledgeJohn C. Kolesar, Shan Ali, Timos Antonopoulos, Ruzica PiskacOOPSLA 2025 · 4 citations
- Heterogeneous Dynamic Logic: Provability Modulo Program TheoriesSamuel Teuber, Mattias Ulbrich, André Platzer, Bernhard BeckertPLDI 2026 · 1 citation
Builds on1
Related papers
- Algebras for Deterministic Computation Are Inherently IncompleteBalder ten Cate, Tobias KappéPOPL 2025 · 4 citations
- On incorrectness logic and Kleene algebra with top and testsCheng Zhang, Arthur Azevedo de Amorim, Marco GaboardiPOPL 2022 · 9 citations
- CF-GKAT: Efficient Validation of Control-Flow TransformationsCheng Zhang, Tobias Kappé, David E. Narváez, Nico NausPOPL 2025 · 3 citations
- Algebraic reasoning of Quantum programs via non-idempotent Kleene algebraYuxiang Peng, Mingsheng Ying, Xiaodi WuPLDI 2022 · 13 citations
- An Algebraic Language for Specifying Quantum NetworksAnita Buckley, Pavel Chuprikov, Rodrigo Otoni, Robert Soulé et al.PLDI 2024 · 3 citations
