Probabilistic couplings are the foundation for many probabilistic relational program logics and arise when relating random sampling statements across two programs. In relational program logics, this manifests as dedicated coupling rules that, e.g., say we may reason as if two sampling statements return the same value. However, this approach fundamentally requires aligning or "synchronizing" the sampling statements of the two programs which is not always possible. In this paper, we develop Clutch, a higher-order probabilistic relational separation logic that addresses this issue by supporting asynchronous probabilistic couplings. We use Clutch to develop a logical step-indexed logical relational to reason about contextual refinement and equivalence of higher-order programs written in a rich language with higher-order local state and impredicative polymorphism. Finally, we demonstrate the usefulness of our approach on a number of case studies. All the results that appear in the paper have been formalized in the Coq proof assistant using the Coquelicot library and the Iris separation logic framework.
翻译:概率结合是许多概率关系方案逻辑的基础,在将两个方案随机抽样说明联系起来时会出现这种逻辑。在关系方案逻辑方面,这表现为专门的混合规则,例如,我们可以说,我们有理由认为两个抽样说明返回了相同价值。然而,这一方法从根本上要求统一或“同步”这两个方案的抽样说明,而这并非总有可能。在本文中,我们开发了一个更高等级的概率分离逻辑,即克卢奇,它通过支持非同步性概率合并来解决这个问题。我们利用克卢奇开发一个逻辑的分级逻辑关系,以逻辑为基础,对以较高顺序的当地状态和不可调和多形态主义的丰富语言编写的较高顺序方案的背景完善和等同性进行解释。最后,我们展示了我们在若干案例研究中的做法的有用性。本文中出现的所有结果都已在使用Coquelicot图书馆和Iris分离逻辑框架的Coq证据助理中正式化。