当前位置: X-MOL 学术ACM Trans. Program. Lang. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A Theory of Slicing for Imperative Probabilistic Programs
ACM Transactions on Programming Languages and Systems ( IF 1.3 ) Pub Date : 2020-05-04 , DOI: 10.1145/3372895
Torben Amtoft 1 , Anindya Banerjee 2
Affiliation  

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.

中文翻译:

命令式概率程序的切片理论

献给塞巴斯蒂安·丹尼奇的记忆。我们提出了一种对包含随机分配和“观察”条件语句的命令式概率程序进行切片的理论。我们将此类程序表示为概率控制流图 (pCFG),其节点修改概率分布。这允许将标准机制(例如数据依赖性、后支配者、相关变量等)直接适应概率设置。我们将切片的规范与其实现分开:(1)首先,我们开发切片必须满足的句法条件(它们涉及另一个不相交切片的存在,使得两个切片的变量是概率独立彼此的); (2) 接下来,我们证明任何这样的切片在语义上都是正确的;(3) 最后,我们给出了一种计算最小切片的算法。为了生成更小的切片,我们还可以利用某些循环将(几乎)总是终止的知识。我们的结果延续到切片结构化的Hur 等人最近的工作中处理的命令式概率程序。对于这样的程序,我们可以定义它的切片,它与原始程序具有相同的“规范化”语义;该属性的证明基于证明 pCFG 语义与结构化命令式概率程序的标准语义的充分性的结果。
更新日期:2020-05-04
down
wechat
bug