Probabilistic Termination

We propose a framework to prove almost sure termination for probabilistic programs with real valued variables. It is based on ranking supermartingales, a notion analogous to ranking functions on non-probabilistic programs. The framework is proven sound and complete for a meaningful class of programs involving randomization and bounded nondeterminism. We complement this foundational insigh by a practical proof methodology, based on sound conditions that enable compositional reasoning and are amenable to a direct implementation using modern theorem provers. This is integrated in a small dependent type system, to overcome the problem that lexicographic ranking functions fail when combined with randomization. Among others, this compositional methodology enables the verification of probabilistic programs outside the complete class that admits ranking supermartingales.

[1]  Andreas Podelski,et al.  A Complete Method for the Synthesis of Linear Ranking Functions , 2004, VMCAI.

[2]  Henny B. Sipma,et al.  Linear Ranking with Reachability , 2005, CAV.

[3]  Sriram Sankaranarayanan,et al.  Probabilistic Program Analysis with Martingales , 2013, CAV.

[4]  Dexter Kozen,et al.  Semantics of probabilistic programs , 1979, 20th Annual Symposium on Foundations of Computer Science (sfcs 1979).

[5]  Samir Genaim,et al.  Proving Termination One Loop at a Time , 2003, WLPE.

[6]  R. Ash,et al.  Probability and measure theory , 1999 .

[7]  Peter W. O'Hearn,et al.  Variance analyses from invariance analyses , 2007, POPL '07.

[8]  Javier Esparza,et al.  Analyzing probabilistic pushdown automata , 2013, Formal Methods Syst. Des..

[9]  David Monniaux An Abstract Analysis of the Probabilistic Termination of Programs , 2001, SAS.

[10]  Annabelle McIver,et al.  Abstraction, Refinement and Proof for Probabilistic Systems , 2004, Monographs in Computer Science.

[11]  Chung-Kil Hur,et al.  Slicing probabilistic programs , 2014, PLDI.

[12]  Henny B. Sipma,et al.  The Polyranking Principle , 2005, ICALP.

[13]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[14]  Allen Van Gelder,et al.  Termination detection in logic programs using argument sizes (extended abstract) , 1991, PODS.

[15]  Annabelle McIver,et al.  Prinsys - On a Quest for Probabilistic Loop Invariants , 2013, QEST.

[16]  Micha Sharir,et al.  Termination of Probabilistic Concurrent Program , 1983, TOPL.

[17]  Nachum Dershowitz,et al.  A General Framework for Automatic Termination Analysis of Logic Programs , 2000, Applicable Algebra in Engineering, Communication and Computing.

[18]  Annabelle McIver,et al.  Linear-Invariant Generation for Probabilistic Programs: - Automated Support for Proof-Based Methods , 2010, SAS.

[19]  Florian Zuleger,et al.  Ramsey vs. Lexicographic Termination Proving , 2013, TACAS.

[20]  Jürgen Giesl,et al.  The Dependency Pair Framework: Combining Techniques for Automated Termination Proofs , 2005, LPAR.

[21]  Thomas A. Henzinger,et al.  Probabilistic programming , 2014, FOSE.

[22]  Zohar Manna,et al.  A closer look at termination , 1975, Acta Informatica.

[23]  David Williams,et al.  Probability with Martingales , 1991, Cambridge mathematical textbooks.

[24]  Javier Esparza,et al.  Proving Termination of Probabilistic Programs Using Patterns , 2012, CAV.

[25]  Neil D. Jones,et al.  The size-change principle for program termination , 2001, POPL '01.

[26]  F. G. Foster On the Stochastic Matrices Associated with Certain Queuing Processes , 1953 .

[27]  Olivier Bournez,et al.  Proving Positive Almost-Sure Termination , 2005, RTA.

[28]  Henny B. Sipma,et al.  Synthesis of Linear Ranking Functions , 2001, TACAS.

[29]  J. Filar,et al.  Competitive Markov Decision Processes , 1996 .

[30]  Micha Sharir,et al.  Concurrent Probabilistic Programs, Or: How to Schedule if You Must , 1985, SIAM J. Comput..

[31]  Daniel Kroening,et al.  Termination Analysis with Compositional Transition Invariants , 2010, CAV.

[32]  Claire Jones,et al.  Probabilistic non-determinism , 1990 .

[33]  Annabelle McIver,et al.  Operational versus weakest pre-expectation semantics for the probabilistic guarded command language , 2014, Perform. Evaluation.

[34]  Andreas Podelski,et al.  Transition invariants , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[35]  Isabelle Gnaedig,et al.  Induction for positive almost sure termination , 2007, PPDP '07.