Does a Program Yield the Right Distribution? Verifying Probabilistic Programs via Generating Functions

by   Mingshuai Chen, et al.

We study discrete probabilistic programs with potentially unbounded looping behaviors over an infinite state space. We present, to the best of our knowledge, the first decidability result for the problem of determining whether such a program generates exactly a specified distribution over its outputs (provided the program terminates almost surely). The class of distributions that can be specified in our formalism consists of standard distributions (geometric, uniform, etc.) and finite convolutions thereof. Our method relies on representing these (possibly infinite-support) distributions as probability generating functions which admit effective arithmetic operations. We have automated our techniques in a tool called prodigy, which supports automatic invariance checking, compositional reasoning of nested loops, and efficient queries on various quantities of to the output distribution, as demonstrated by experiments.



page 1

page 2

page 3

page 4


Generating Functions for Probabilistic Programs

This paper investigates the usage of generating functions (GFs) encoding...

This is the Moment for Probabilistic Loops

We present a novel static analysis technique to derive higher moments fo...

Decidable Synthesis of Programs with Uninterpreted Functions

We identify a decidable synthesis problem for a class of programs of unb...

Distilling Programs to Prove Termination

The problem of determining whether or not any program terminates was sho...

Trace Abstraction Modulo Probability

We propose trace abstraction modulo probability, a proof technique for v...

Counterexample-Driven Synthesis for Probabilistic Program Sketches

Probabilistic programs are key to deal with uncertainty in e.g. controll...

Arithmetic Distribution Neural Network for Background Subtraction

We propose a new Arithmetic Distribution Neural Network (ADNN) for learn...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.