Generating Functions for Probabilistic Programs

This paper investigates the usage of generating functions (GFs) encoding measures over the program variables for reasoning about discrete probabilistic programs. To that end, we define a denotational GF-transformer semantics for probabilistic while-programs, and show that it instantiates Kozen's seminal distribution transformer semantics. We then study the effective usage of GFs for program analysis. We show that finitely expressible GFs enable checking super-invariants by means of computer algebra tools, and that they can be used to determine termination probabilities. The paper concludes by characterizing a class of -- possibly infinite-state -- programs whose semantics is a rational GF encoding a discrete phase-type distribution.

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

[2]  Chung-Kil Hur,et al.  R2: An Efficient MCMC Sampler for Probabilistic Programs , 2014, AAAI.

[3]  Ronald L. Graham,et al.  Concrete mathematics - a foundation for computer science , 1991 .

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

[5]  J. Davis Univariate Discrete Distributions , 2006 .

[6]  Andy R. Terrel,et al.  SymPy: Symbolic computing in Python , 2017, PeerJ Prepr..

[7]  Timon Gehr,et al.  Fine-Grained Semantics for Probabilistic Programs , 2018, ESOP.

[8]  Marcel F. Neuts,et al.  Matrix-Geometric Solutions in Stochastic Models , 1981 .

[9]  G. Pólya,et al.  Mathematics and Plausible Reasoning: Vol. I: Induction and Analogy in Mathematics , 1979 .

[10]  Ezio Bartocci,et al.  Automatic Generation of Moment-Based Invariants for Prob-Solvable Loops , 2019, ATVA.

[11]  Herbert Wiklicky,et al.  Semantics of Probabilistic Programs: A Weak Limit Approach , 2013, APLAS.

[12]  Jacques Carette,et al.  Simplifying Probabilistic Programs Using Computer Algebra , 2016, PADL.

[13]  Michele Boreale,et al.  Analysis of Probabilistic Systems via Generating Functions and Padé Approximation , 2015, ICALP.

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

[15]  Joost-Pieter Katoen,et al.  Quantitative separation logic: a logic for reasoning about probabilistic pointer programs , 2018, Proc. ACM Program. Lang..

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

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

[18]  Liz Sonenberg,et al.  Fixed Point Theorems and Semantics: A Folk Tale , 1982, Inf. Process. Lett..

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

[20]  Joe Hurd,et al.  A Formal Approach to Probabilistic Termination , 2002, TPHOLs.

[21]  Benjamin Grégoire,et al.  Coupling proofs are probabilistic product programs , 2016, POPL.

[22]  Thomas F. Icard,et al.  Calibrating generative models: The probabilistic Chomsky–Schützenberger hierarchy , 2020 .

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