论文标题
基于规格的概率计划切片
Slicing of Probabilistic Programs based on Specifications
论文作者
论文摘要
本文介绍了基于规格的概率程序的第一种切片方法。我们表明,当概率程序以前后条件的形式伴随其规格时,我们可以利用此语义信息以比基于数据/控制依赖性的常规技术产生的切片更精确地生成规范保存切片。 为了实现这一目标,我们的技术是基于通过最大的预测变压器(Dijkstra最弱的前提前变压器的概率对应物)的后条件向后传播。该技术对终止敏感,允许保留部分和概率程序的总正确性W.R.T.他们的规格。它是模块化的,具有本地推理原则,并正式被证明是正确的。 作为我们技术的基本技术成分,我们设计并证明了良好的验证条件生成器,用于建立概率程序的部分和完全正确性,这些程序本身就是感兴趣的,并且可以在其他地方进行其他目的。 在实际方面,我们通过一些说明性示例和概率建模领域的案例研究来证明我们的方法的适用性。我们还描述了一种用于计算最少切片的算法,这是我们技术得出的切片空间。
This paper presents the first slicing approach for probabilistic programs based on specifications. We show that when probabilistic programs are accompanied by their specifications in the form of pre- and post-condition, we can exploit this semantic information to produce specification-preserving slices strictly more precise than slices yielded by conventional techniques based on data/control dependency. To achieve this goal, our technique is based on the backward propagation of post-conditions via the greatest pre-expectation transformer -- the probabilistic counterpart of Dijkstra weakest pre-condition transformer. The technique is termination-sensitive, allowing to preserve the partial as well as the total correctness of probabilistic programs w.r.t. their specifications. It is modular, featuring a local reasoning principle, and is formally proved correct. As fundamental technical ingredients of our technique, we design and prove sound verification condition generators for establishing the partial and total correctness of probabilistic programs, which are of interest on their own and can be exploited elsewhere for other purposes. On the practical side, we demonstrate the applicability of our approach by means of a few illustrative examples and a case study from the probabilistic modelling field. We also describe an algorithm for computing least slices among the space of slices derived by our technique.