arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1907.05244cs.PLcs.CRcs.LO
收藏

下一个700个关系程序逻辑

The Next 700 Relational Program Logics

Kenji Maillard, Catalin Hritcu, Exequiel Rivas, Antoine Van Muylder

摘要:

我们提出了第一个框架,定义关系程序逻辑的任意一元效应。该框架是嵌入在一个关系依赖类型论,是高度表达。在语义层面上,我们提供了一个代数表示的关系规范作为一类相对单子,并通过引入关系效果的观察,映射对单子计算关系规范的方式,尊重代数结构的链接计算和规范。对于任意的关系效果观察,我们一般定义了一个健全的关系程序逻辑的核心,并解释了如何完成它的一元效果在手的一个成熟的逻辑。我们表明,这个通用的框架可以用来定义关系程序逻辑的影响,不同的状态,输入输出,非确定性,和离散概率。此外,我们表明,通过实例化我们的框架与状态和无界迭代,我们可以嵌入本顿的关系霍尔逻辑的变体,也勾画了如何重建关系Hoare类型论。最后,我们确定并克服概念上的挑战,防止以前的关系程序逻辑正确处理控制效果,是第一个提供一个关系程序逻辑异常。

英文摘要:

We propose the first framework for defining relational program logics for arbitrary monadic effects. The framework is embedded within a relational dependent type theory and is highly expressive. At the semantic level, we provide an algebraic presentation of relational specifications as a class of relative monads, and link computations and specifications by introducing relational effect observations, which map pairs of monadic computations to relational specifications in a way that respects the algebraic structure. For an arbitrary relational effect observation, we generically define the core of a sound relational program logic, and explain how to complete it to a full-fledged logic for the monadic effect at hand. We show that this generic framework can be used to define relational program logics for effects as diverse as state, input-output, nondeterminism, and discrete probabilities. We, moreover, show that by instantiating our framework with state and unbounded iteration we can embed a variant of Benton's Relational Hoare Logic, and also sketch how to reconstruct Relational Hoare Type Theory. Finally, we identify and overcome conceptual challenges that prevented previous relational program logics from properly dealing with control effects, and are the first to provide a relational program logic for exceptions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑