🤖 AI Summary
Termination analysis of programs has long relied on disparate, specialized logics, making it difficult to uniformly characterize termination, non-termination, and partial correctness—especially for nondeterministic and probabilistic programs. To address this, we propose the first unified program logic framework that simultaneously models and reasons about total correctness, partial correctness, and non-termination within a single formalism. Our logic extends Hoare logic by integrating incorrectness logic and semantics for nondeterminism and probability, and establishes a rigorous metatheory—including soundness and relative completeness. We validate its expressiveness and practicality through multiple case studies, demonstrating support for compositional verification across programming paradigms. The framework significantly enhances the generality, unification, and engineering applicability of termination analysis.
📝 Abstract
While there is a long tradition of reasoning about termination (and nontermination) in the context of program analysis, specialized logics are typically needed to give different termination guarantees. This includes partial correctness, where termination is not guaranteed, and total correctness, where it is guaranteed. We present Total Outcome Logic, a single logic which can express the full spectrum of termination conditions and program properties offered by the aforementioned logics. Total Outcome Logic extends termination and incorrectness reasoning across different kinds of branching effects, so that a single metatheory powers this reasoning in different kinds of programs, including nondeterministic and probabilistic. We demonstrate the utility of this approach through a variety of case studies.