一句话:提出命令式概率程序的切片理论,给出语法条件、语义正确性证明与最小切片算法。
本文提出命令式概率程序的切片理论,处理含随机赋值与 observe 条件语句的程序。作者将程序表示为概率控制流图(pCFG),其节点修改概率分布,从而把数据依赖、后支配、相关变量等标准切片机制推广到概率场景。论文分离切片规约与实现:先给出语法条件,要求存在另一不相交切片且两者变量概率独立;再证明满足条件的切片语义正确;最后给出计算最小切片的算法。利用某些循环(几乎)必然终止的知识可生成更小切片。可推广到 Hur 等人的结构化概率程序:切片与原程序具有相同“规范化”语义,其证明基于 pCFG 语义的充分性。
Dedicated to the memory of Sebastian Danicic. We present a theory for slicing imperative probabilistic programs containing random assignments and “observe” statements for conditioning. We represent such programs as probabilistic control-flow graphs (pCFGs) whose nodes modify probability distributions. This allows direct adaptation of standard machinery such as data dependence, postdominators, relevant variables, and so on, to the probabilistic setting. We separate the specification of slicing from its implementation: (1) first, we develop syntactic conditions that a slice must satisfy (they involve the existence of another disjoint slice such that the variables of the two slices are probabilistically independent of each other); (2) next, we prove that any such slice is semantically correct; (3) finally, we give an algorithm to compute the least slice. To generate smaller slices, we may in addition take advantage of knowledge that certain loops will terminate (almost) always. Our results carry over to the slicing of structured imperative probabilistic programs, as handled in recent work by Hur et al. For such a program, we can define its slice, which has the same “normalized” semantics as the original program; the proof of this property is based on a result proving the adequacy of the semantics of pCFGs w.r.t. the standard semantics of structured imperative probabilistic programs.
@article{AmtoftB20,
title = {A Theory of Slicing for Imperative Probabilistic Programs},
author = {Torben Amtoft and Anindya Banerjee},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {42},
number = {2},
year = {2020},
doi = {10.1145/3372895}
}