Proving almost-sure termination by omega-regular decomposition

Almost-sure termination is the most basic liveness property of probabilistic programs. We present a novel decomposition-based approach for proving almost-sure termination of probabilistic programs with complex control-flow structure and non-determinism. Our approach automatically decomposes the runs of the probabilistic program into a finite union of ω-regular subsets and then proves almost-sure termination of each subset based on the notion of localized ranking supermartingales. Compared to the lexicographic methods and the compositional methods, our approach does not require a lexicographic order over the ranking supermartingales as well as the so-called unaffecting condition. Thus it has high generality. We present the algorithm of our approach and prove its soundness, as well as its relative completeness. We show that our approach can be applied to some hard cases and the evaluation on the benchmarks of previous works shows the significant efficiency of our approach.

[1]  Jochen Hoenicke,et al.  Software Model Checking for People Who Love Automata , 2013, CAV.

[2]  Krishnendu Chatterjee,et al.  Lexicographic ranking supermartingales: an efficient approach to termination of probabilistic programs , 2017, Proc. ACM Program. Lang..

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

[4]  Annabelle McIver,et al.  A new proof rule for almost-sure termination , 2017, Proc. ACM Program. Lang..

[5]  Henny B. Sipma,et al.  Linear Invariant Generation Using Non-linear Constraint Solving , 2003, CAV.

[6]  Krishnendu Chatterjee,et al.  Stochastic invariants for probabilistic termination , 2016, POPL.

[7]  Joost-Pieter Katoen,et al.  Weakest Precondition Reasoning for Expected Run-Times of Probabilistic Programs , 2016, ESOP.

[8]  Krishnendu Chatterjee,et al.  Algorithmic analysis of qualitative and quantitative termination problems for affine probabilistic programs , 2015, POPL.

[9]  Jochen Hoenicke,et al.  Ultimate Automizer with SMTInterpol - (Competition Contribution) , 2013, TACAS.

[10]  Henny B. Sipma,et al.  Practical Methods for Proving Program Termination , 2002, CAV.

[11]  Annabelle McIver,et al.  Developing and Reasoning About Probabilistic Programs in pGCL , 2004, PSSE.

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

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

[14]  Annabelle McIver,et al.  Abstraction and refinement in probabilistic systems , 2005, PERV.

[15]  Krishnendu Chatterjee,et al.  New Approaches for Almost-Sure Termination of Probabilistic Programs , 2018, APLAS.

[16]  Flemming Nielson,et al.  Formal Methods: An Appetizer , 2019 .

[17]  Lijun Zhang,et al.  Advanced automata-based algorithms for program termination checking , 2018, PLDI.

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

[19]  Krishnendu Chatterjee,et al.  Modular verification for almost-sure termination of probabilistic programs , 2019, Proc. ACM Program. Lang..

[20]  Joost-Pieter Katoen,et al.  Reasoning about Recursive Probabilistic Programs* , 2016, 2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[21]  Jochen Hoenicke,et al.  Refinement of Trace Abstraction , 2009, SAS.

[22]  Holger Hermanns,et al.  Probabilistic Termination , 2015, POPL.

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

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

[25]  Jochen Hoenicke,et al.  Termination Analysis by Learning Terminating Programs , 2014, CAV.

[26]  Krishnendu Chatterjee,et al.  Termination Analysis of Probabilistic Programs Through Positivstellensatz's , 2016, CAV.

[27]  Dirk Beyer,et al.  Predicate abstraction with adjustable-block encoding , 2010, Formal Methods in Computer Aided Design.