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.
翻译:我们研究离散的概率性程序,在无限的状态空间上进行潜在的无约束循环行为。我们据我们所知,第一个可降解性的结果是确定这样一个程序是否产生出精确的输出分布(但程序几乎可以肯定地终止 ) 。 我们的正规主义中可以具体描述的分布类别包括标准分布( 地测量、 制服等) 和有限的变化。 我们的方法以这些( 可能的无限支持) 分布作为概率生成功能, 以接受有效的算术操作。 我们在一个名为“ 天才” 的工具中自动运用了我们的技术, 工具支持自动逆差检查、 嵌套循环的构思推理, 以及实验所证明的对输出分布的各种数量的有效查询 。