Automatic Generation of Moment-Based Invariants for Prob-Solvable Loops

One of the main challenges in the analysis of probabilistic programs is to compute invariant properties that summarise loop behaviours. Automation of invariant generation is still at its infancy and most of the times targets only expected values of the program variables, which is insufficient to recover the full probabilistic program behaviour. We present a method to automatically generate moment-based invariants of a subclass of probabilistic programs, called Prob-Solvable loops, with polynomial assignments over random variables and parametrised distributions. We combine methods from symbolic summation and statistics to derive invariants as valid properties over higher-order moments, such as expected values or variances, of program variables. We successfully evaluated our work on several examples where full automation for computing higher-order moments and invariants over program variables was not yet possible.

[1]  Gilles Barthe,et al.  Synthesizing Probabilistic Invariants via Doob's Decomposition , 2016, CAV.

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

[3]  Krishnendu Chatterjee,et al.  Termination of Nondeterministic Probabilistic Programs , 2019, VMCAI.

[4]  Timon Gehr,et al.  PSI: Exact Symbolic Inference for Probabilistic Programs , 2016, CAV.

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

[6]  Sriram Sankaranarayanan,et al.  Uncertainty Propagation Using Probabilistic Affine Forms and Concentration of Measure Inequalities , 2016, TACAS.

[7]  Bican Xia,et al.  Finding Polynomial Loop Invariants for Probabilistic Programs , 2017, ATVA.

[8]  Krishnendu Chatterjee,et al.  Polynomial invariant generation for non-deterministic recursive programs , 2019, PLDI.

[9]  Marta Z. Kwiatkowska,et al.  PRISM 4.0: Verification of Probabilistic Real-Time Systems , 2011, CAV.

[10]  Ichiro Hasuo,et al.  Tail Probabilities for Randomized Program Runtimes via Martingales for Higher Moments , 2018, TACAS.

[11]  Richard M. Karp,et al.  Probabilistic recurrence relations , 1994, JACM.

[12]  Lijun Zhang,et al.  Counterexample-Guided Polynomial Loop Invariant Generation by Lagrange Interpolation , 2015, CAV.

[13]  Sebastian Junges,et al.  A Storm is Coming: A Modern Probabilistic Model Checker , 2017, CAV.

[14]  Lijun Zhang,et al.  Probabilistic CEGAR , 2008, CAV.

[15]  Zoubin Ghahramani,et al.  Probabilistic machine learning and artificial intelligence , 2015, Nature.

[16]  Joost-Pieter Katoen,et al.  The Ins and Outs of the Probabilistic Model Checker MRMC , 2009, 2009 Sixth International Conference on the Quantitative Evaluation of Systems.

[17]  Annabelle McIver,et al.  Abstraction, Refinement And Proof For Probabilistic Systems (Monographs in Computer Science) , 2004 .

[18]  Marta Z. Kwiatkowska,et al.  A game-based abstraction-refinement framework for Markov decision processes , 2010, Formal Methods Syst. Des..

[19]  Joost-Pieter Katoen,et al.  How long, O Bayesian network, will I sample thee? A program analysis perspective on expected sampling times , 2018, ESOP.

[20]  Aldo Tagliani,et al.  Discrete distributions from moment generating function , 2006, Appl. Math. Comput..

[21]  Laura Kovács,et al.  Aligator.jl - A Julia Package for Loop Invariant Generation , 2018, CICM.

[22]  Joost-Pieter Katoen,et al.  On the hardness of analyzing probabilistic programs , 2018, Acta Informatica.

[23]  Laura Kovács,et al.  Reasoning Algebraically About P-Solvable Loops , 2008, TACAS.

[24]  Nils Jansen,et al.  Bounded Model Checking for Probabilistic Programs , 2016, ATVA.

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

[26]  Christel Baier,et al.  Principles of model checking , 2008 .

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

[28]  Sriram Sankaranarayanan,et al.  Expectation Invariants for Probabilistic Program Loops as Fixed Points , 2014, SAS.

[29]  Manuel Kauers,et al.  The Concrete Tetrahedron - Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates , 2011, Texts & Monographs in Symbolic Computation.