On probabilistic termination of functional programs with continuous distributions
Raven Beutner, Luke Ong
Abstract
We study termination of higher-order probabilistic functional programs with recursion, stochastic conditioning and sampling from continuous distributions. Reasoning about the termination probability of programs with continuous distributions is hard, because the enumeration of terminating executions cannot provide any non-trivial bounds. We present a new operational semantics based on traces of intervals, which is sound and complete with respect to the standard sampling-based semantics, in which (countable) enumeration can provide arbitrarily tight lower bounds. Consequently we obtain the first proof that deciding almost-sure termination (AST) for programs with continuous distributions is Π20-complete (for CbN). We also provide a compositional representation of our semantics in terms of an intersection type system. In the second part, we present a method of proving AST for non-affine programs, i.e., recursive programs that can, during the evaluation of the recursive body, make multiple recursive calls (of a first-order function) from distinct call sites. Unlike in a deterministic language, the number of recursion call sites has direct consequences on the termination probability. Our framework supports a proof system that can verify AST for programs that are well beyond the scope of existing methods. We have constructed prototype implementations of our methods for computing lower bounds on the termination probability, and AST verification.
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 fc4753a4-03ce-454d-a516-89d2d9feb48bCited by top-tier papers8
- Sound and Complete Certificates for Quantitative Termination Analysis of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicCAV 2022 · 30 citations
- Guaranteed bounds for posterior inference in universal probabilistic programmingRaven Beutner, C.-H. Luke Ong, Fabian ZaiserPLDI 2022 · 18 citations
- Quantitative Bounds on Resource Usage of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicOOPSLA 2024 · 16 citations
- Positive Almost-Sure Termination: Complexity and Proof RulesRupak Majumdar, V. R. SathiyanarayanaPOPL 2024 · 12 citations
- Supermartingales, Ranking Functions and Probabilistic Lambda CalculusAndrew Kenyon-Roberts, C.-H. Luke OngLICS 2021 · 6 citations
Builds on4
- Trace types and denotational semantics for sound programmable inference in probabilistic languagesAlexander K. Lew, Marco F. Cusumano-Towner, Benjamin Sherman, Michael Carbin et al.POPL 2020 · 30 citations
- Intersection types and (positive) almost-sure terminationUgo Dal Lago, Claudia Faggian, Simona Ronchi Della RoccaPOPL 2021 · 21 citations
- Proving almost-sure termination by omega-regular decompositionJianhui Chen, Fei HePLDI 2020 · 19 citations
- Supermartingales, Ranking Functions and Probabilistic Lambda CalculusAndrew Kenyon-Roberts, C.-H. Luke OngLICS 2021 · 6 citations
Related papers
- On Higher-Order Probabilistic Verification via the Weighted Relational Model of Linear LogicUgo Dal Lago, Guido Fiorillo, Paolo PistoneLICS 2026
- Sound and Complete Proof Rules for Probabilistic TerminationRupak Majumdar, V. R. SathiyanarayanaPOPL 2025 · 16 citations
- Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic ChoiceAlejandro Aguirre, Lars BirkedalPOPL 2023 · 13 citations
- Foundations for Deductive Verification of Continuous Probabilistic Programs: From Lebesgue to Riemann and BackKevin Batz, Joost-Pieter Katoen, Francesca Randone, Tobias WinklerOOPSLA 2025 · 2 citations
- On Lexicographic Proof Rules for Probabilistic TerminationKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Jiri Zárevúcky et al.FM 2021 · 11 citations
