Morgan and McIver's weakest pre-expectation framework is one of the most well-established methods for deductive verification of probabilistic programs. Roughly, the idea is to generalize binary state assertions to real-valued expectations. While loop-free programs can be analyzed by mechanically transforming expectations, verifying loops usually requires finding an invariant expectation, a difficult task. We propose a new view of invariant expectation synthesis as a regression problem: given an input state, predict the average value of the post-expectation. Guided by this perspective, we develop the first data-driven invariant synthesis method for probabilistic programs. Unlike prior work on probabilistic invariant inference, our approach can learn piecewise continuous invariants without relying on template expectations, and also works when only given black-box access to the program. We implement our approach and demonstrate its effectiveness on a variety of benchmarks from the probabilistic programming literature.
翻译:Morgan和McIver最弱的预想前框架是计算概率程序参数核查的最既定方法之一。 大致上, 我们的想法是将二进制状态的主张概括为实际价值的预期。 虽然无环程序可以通过机械改变预期来分析, 核查循环通常需要找到一个无差别的预期, 这是一项困难的任务。 我们提出了一个新的观点, 将不定的预期合成作为一个回归问题: 给一个输入状态, 预测预想后的平均价值 。 根据这个观点, 我们为概率性程序开发了第一个数据驱动的变量合成方法 。 与先前关于概率性不定的推断的工作不同, 我们的方法可以不依赖模板预期, 而在只给黑盒访问程序时, 也可以工作。 我们实施我们的方法, 并展示它对于从概率性编程文献中得出的各种基准的有效性 。