arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2007.15246cs.LO
收藏

概率规划的构造正确性

Correctness by construction for probabilistic programs

Annabelle McIver, Carroll Morgan

摘要:

“正确的建设”范式是现代形式化方法的一个重要组成部分,在这里,我们使用概率保护命令语言$\mathit{pGCL}$来说明它的应用程序$\mathit{probabilistic}$编程。$\mathit{pGCL}$扩展了Dijkstra的保护命令语言$\mathit{GCL}$与概率选择,并配备了一个正确性保持细化关系$(\sqsubseteq)$,使紧凑的,抽象的概率属性规范逐步转化为具体的,可执行的代码,通过应用数学的见解在一个系统和分层的方式。典型的“构造正确性”,尽可能在每个细化步骤层的推理不依赖于前面的层,并不影响后面的。我们证明了技术推导出一个公平的硬币实现任何给定的离散概率分布。在模拟一个公平的模具的特殊情况下,我们的正确的构造算法原来是“内吐距离”的Knuth和姚的最优解。

英文摘要:

The "correct by construction" paradigm is an important component of modern Formal Methods, and here we use the probabilistic Guarded-Command Language $\mathit{pGCL}$ to illustrate its application to $\mathit{probabilistic}$ programming. $\mathit{pGCL}$ extends Dijkstra's guarded-command language $\mathit{GCL}$ with probabilistic choice, and is equipped with a correctness-preserving refinement relation $(\sqsubseteq)$ that enables compact, abstract specifications of probabilistic properties to be transformed gradually to concrete, executable code by applying mathematical insights in a systematic and layered way. Characteristically for "correctness by construction", as far as possible the reasoning in each refinement-step layer does not depend on earlier layers, and does not affect later ones. We demonstrate the technique by deriving a fair-coin implementation of any given discrete probability distribution. In the special case of simulating a fair die, our correct-by-construction algorithm turns out to be "within spitting distance" of Knuth and Yao's optimal solution.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑