Expectation Invariants for Probabilistic Program Loops as Fixed Points

We present static analyses for probabilistic loops using expectation invariants. Probabilistic loops are imperative while-loops augmented with calls to random variable generators. Whereas, traditional program analysis uses Floyd-Hoare style invariants to over-approximate the set of reachable states, our approach synthesizes invariant inequalities involving the expected values of program expressions at the loop head. We first define the notion of expectation invariants, and demonstrate their usefulness in analyzing probabilistic program loops. Next, we present the set of expectation invariants for a loop as a fixed point of the pre-expectation operator over sets of program expressions. Finally, we use existing concepts from abstract interpretation theory to present an iterative analysis that synthesizes expectation invariants for probabilistic program loops. We show how the standard polyhedral abstract domain can be used to synthesize expectation invariants for probabilistic programs, and demonstrate the usefulness of our approach on some examples of probabilistic program loops.

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

[2]  Joël Ouaknine,et al.  Foundations for Decision Problems in Separation Logic with General Inductive Predicates , 2014, FoSSaCS.

[3]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

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

[5]  Zohar Manna,et al.  Temporal verification of reactive systems - safety , 1995 .

[6]  Henny B. Sipma,et al.  Constraint-Based Linear-Relations Analysis , 2004, SAS.

[7]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

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

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

[10]  Jean Goubault-Larrecq,et al.  A generalization of p-boxes to affine arithmetic , 2011, Computing.

[11]  David Monniaux,et al.  Abstract interpretation of programs as Markov decision processes , 2003, Sci. Comput. Program..

[12]  Roberto Bagnara,et al.  Precise widening operators for convex polyhedra , 2003, Sci. Comput. Program..

[13]  Alessandro Panconesi,et al.  Concentration of Measure for the Analysis of Randomized Algorithms , 2009 .

[14]  David Monniaux,et al.  Backwards Abstract Interpretation of Probabilistic Programs , 2001, ESOP.

[15]  Sumit Gulwani,et al.  Static analysis for probabilistic programs: inferring whole program properties from finitely many paths , 2013, PLDI.

[16]  Michael Hicks,et al.  Dynamic Enforcement of Knowledge-Based Security Policies , 2011, 2011 IEEE 24th Computer Security Foundations Symposium.

[17]  Nicolas Halbwachs,et al.  Détermination automatique de relations linéaires vérifiées par les variables d'un programme , 1979 .

[18]  Russ Bubley,et al.  Randomized algorithms , 1995, CSUR.

[19]  Jane Hillston,et al.  PALOMA: A Process Algebra for Located Markovian Agents , 2014, QEST.

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

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

[22]  Kai Lai Chung,et al.  A Course in Probability Theory , 1949 .

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

[24]  David Monniaux,et al.  Abstract Interpretation of Probabilistic Semantics , 2000, SAS.

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

[26]  Patrick Cousot,et al.  Probabilistic Abstract Interpretation , 2012, ESOP.

[27]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[28]  A. Arkin,et al.  It's a noisy business! Genetic regulation at the nanomolar scale. , 1999, Trends in genetics : TIG.