Positive Almost-Sure Termination: Complexity and Proof Rules
Rupak Majumdar, V. R. Sathiyanarayana
Abstract
We study the recursion-theoretic complexity of Positive Almost-Sure Termination (PAST) in an imperative programming language with rational variables, bounded nondeterministic choice, and discrete probabilistic choice. A program terminates positive almost-surely if, for every scheduler, the program terminates almost-surely and the expected runtime to termination is finite. We show that PAST for our language is complete for the (lightface) co-analytic sets ( Π 1 1 -complete). This is in contrast to the related notions of Almost-Sure Termination (AST) and Bounded Termination (BAST), both of which are arithmetical ( Π 2 0 - and Σ 2 0 -complete respectively). Our upper bound implies an effective procedure to reduce reasoning about probabilistic termination to non-probabilistic fair termination in a model with bounded nondeterminism, and to simple program termination in models with unbounded nondeterminism. Our lower bound shows the opposite: for every program with unbounded nondeterministic choice, there is an effectively computable probabilistic program with bounded choice such that the original program is terminating if, and only if, the transformed program is PAST. We show that every program has an effectively computable normal form, in which each probabilistic choice either continues or terminates execution immediately, each with probability 1 / 2 . For normal form programs, we provide a sound and complete proof rule for PAST. Our proof rule uses transfinite ordinals. We show that reasoning about PAST requires transfinite ordinals up to ω 1 CK ; thus, existing techniques for probabilistic termination based on ranking supermartingales that map program states to reals do not suffice to reason about PAST.
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 963d324d-5efc-4e3e-b3cd-e1827c40b886Cited by top-tier papers4
- Sound and Complete Proof Rules for Probabilistic TerminationRupak Majumdar, V. R. SathiyanarayanaPOPL 2025 · 16 citations
- SureDistrib: Verifying Almost-Sure Termination of Composite Asynchronous Byzantine ProtocolsLongfei Qiu, Jingqi Xiao, Ji-Yong Shin, Zhong ShaoPLDI 2026 · 1 citation
- On the Almost-Sure Termination of Probabilistic Counter ProgramsSergei Novozhilov, Mingqi Yang, Mingshuai Chen, Zhiyang Li et al.CAV 2025
- SuperDP: Differential Privacy Refutation via SupermartingalesKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Dorde ZikelicPLDI 2026
Builds on4
- Relatively complete verification of probabilistic programs: an expressive language for expectation-based reasoningKevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph MathejaPOPL 2021 · 33 citations
- Sound and Complete Certificates for Quantitative Termination Analysis of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicCAV 2022 · 30 citations
- On probabilistic termination of functional programs with continuous distributionsRaven Beutner, Luke OngPLDI 2021 · 12 citations
- On Lexicographic Proof Rules for Probabilistic TerminationKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Jiri Zárevúcky et al.FM 2021 · 11 citations
Related papers
- Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic ChoiceAlejandro Aguirre, Lars BirkedalPOPL 2023 · 13 citations
- Proving almost-sure termination by omega-regular decompositionJianhui Chen, Fei HePLDI 2020 · 19 citations
- On Higher-Order Probabilistic Verification via the Weighted Relational Model of Linear LogicUgo Dal Lago, Guido Fiorillo, Paolo PistoneLICS 2026
- Supermartingales for Unique Fixed Points: A Unified Approach to Lower Bound VerificationSatoshi Kura, Hiroshi Unno, Takeshi TsukadaPLDI 2026
- On Certificates, Expected Runtimes, and Termination in Probabilistic Pushdown AutomataTobias Winkler, Joost-Pieter KatoenLICS 2023 · 5 citations
