🤖 AI Summary
Program logics lack a unified semantic foundation. Method: This paper proposes an axiomatic framework based on the traced monoidal category of replicable-discardable directed traces. It is the first to uniformly derive correctness logic, incorrectness logic, and relational Hoare logic using structural axioms of distributed monoidal categories; designs an internal language for imperative multicategories; and constructs a combinatorial system tailored to Dijkstra’s guarded command language. Contributions: (1) Establishes a traceable distributed copy-discard structure that integrates trace operations with tensor products to enable algebraic derivation of logical rules; (2) Fully reconstructs the core inference rules of the three fundamental program logics; (3) Demonstrates the reconstructibility and intrinsic consistency of diverse program logics under this unified categorical semantics.
📝 Abstract
We derive multiple program logics, including correctness, incorrectness, and relational Hoare logic, from the axioms of imperative categories: uniformly traced distributive copy-discard categories. We introduce an internal language for imperative multicategories, on top of which we derive combinators for an adaptation of Dijkstra's guarded command language. Rules of program logics are derived from this internal language.