A Taxonomy of Hoare-Like Logics: Towards a Holistic View using Predicate Transformers and Kleene Algebras with Top and Tests
Lena Verscht, Benjamin Lucien Kaminski
TL;DR
This work develops a holistic taxonomy of Hoare-like program logics by unifying partial/total correctness and incorrectness logics through predicate transformers and TopKAT. It introduces eight core predicate transformers (wp, wlp, awp, dwp, awlp, dwlp, asp, aslp, along with dsp and dslp) and derives 16 logics by over-/under-approximations, analyzing their interrelations, contrapositions, and equivalences. A novel contribution is expressing Lisbon logic within TopKAT and mapping many logics to TopKAT equations, revealing both symmetries and asymmetries between forward and backward analyses and showing how termination, reachability, determinism, and reversibility collapse or separate logics. The paper also expands the TopKAT perspective, clarifying expressibility limits (e.g., classic total correctness is not in plain KAT) and introducing in-between logics via union/intersection of transformers, with open questions on complexity, proof-rule derivation, and extending algebraic frameworks for divergence. Overall, this integrative approach provides a structured, algebraic lens for comparing, deriving, and potentially mechanizing a broad spectrum of Hoare-like logics that address both correctness and reliability concerns in nondeterministic programs.
Abstract
We study Hoare-like logics, including partial and total correctness Hoare logic, incorrectness logic, Lisbon logic, and many others through the lens of predicate transformers à la Dijkstra and through the lens of Kleene algebra with top and tests (TopKAT). Our main goal is to give an overview - a taxonomy - of how these program logics relate, in particular under different assumptions like for example program termination, determinism, and reversibility. As a byproduct, we obtain a TopKAT characterization of Lisbon logic, which - to the best of our knowledge - is a novel result.
