arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1608.06499cs.PL
收藏

Dijkstra Monads免费

Dijkstra Monads for Free

Danel Ahman, Catalin Hritcu, Kenji Maillard, Guido Martinez, Gordon Plotkin, Jonathan Protzenko, Aseem Rastogi, Nikhil Swamy

摘要:

Dijkstra monad支持通过最弱的前提条件指定和验证有效的代码,从而增强了依赖类型论。与它们密切相关的对应物Hoare monads一起,它们提供了构建F*,Hoare类型论(HTT)和Ynot等验证工具的基础。我们表明,Dijkstra单子可以推导出“免费”通过应用连续传递风格(CPS)的翻译标准的一元定义的基础计算效果。以这种方式自动导出Dijkstra单子提供了一种正确的构造和有效的方式来推理依赖类型论中的用户定义的效果。我们证明了这些想法EMF*,一个新的依赖类型的演算,验证它通过正式的证明和F* 内的原型实现。除了为F* 配备更统一和可扩展的效果系统外,EMF* 还可以在F* 中实现内部和外部证明的新混合。

英文摘要:

Dijkstra monads enable a dependent type theory to be enhanced with support for specifying and verifying effectful code via weakest preconditions. Together with their closely related counterparts, Hoare monads, they provide the basis on which verification tools like F*, Hoare Type Theory (HTT), and Ynot are built. We show that Dijkstra monads can be derived "for free" by applying a continuation-passing style (CPS) translation to the standard monadic definitions of the underlying computational effects. Automatically deriving Dijkstra monads in this way provides a correct-by-construction and efficient way of reasoning about user-defined effects in dependent type theories. We demonstrate these ideas in EMF*, a new dependently typed calculus, validating it via both formal proof and a prototype implementation within F*. Besides equipping F* with a more uniform and extensible effect system, EMF* enables a novel mixture of intrinsic and extrinsic proofs within F*.

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

↑