Formal reasoning about layered monadic interpreters

Author:

Yoon Irene1ORCID,Zakowski Yannick2ORCID,Zdancewic Steve1ORCID

Affiliation:

1. University of Pennsylvania, USA

2. Inria, France

Abstract

Monadic computations built by interpreting, or handling , operations of a free monad are a compelling formalism for modeling language semantics and defining the behaviors of effectful systems. The resulting layered semantics offer the promise of modular reasoning principles based on the equational theory of the underlying monads. However, there are a number of obstacles to using such layered interpreters in practice. With more layers comes more boilerplate and glue code needed to define the monads and interpreters involved. That overhead is compounded by the need to define and justify the relational reasoning principles that characterize the equivalences at each layer. This paper addresses these problems by significantly extending the capabilities of the Coq interaction trees (ITrees) library, which supports layered monadic interpreters. We characterize a rich class of interpretable monads ---obtained by applying monad transformers to ITrees---and show how to generically lift interpreters through them. We also introduce a corresponding framework for relational reasoning about "equivalence of monads up to a relation R". This collection of typeclasses, instances, new reasoning principles, and tactics greatly generalizes the existing theory of the ITree library, eliminating large amounts of unwieldy boilerplate code and dramatically simplifying proofs.

Funder

NSF

Office of Naval Research

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference52 articles.

1. A core calculus of dependency

2. Dijkstra monads for free

3. Amal Jamil Ahmed. 2004. Semantics of Types for Mutable State. Ph. D. Dissertation. USA. AAI3136691 Amal Jamil Ahmed. 2004. Semantics of Types for Mutable State. Ph. D. Dissertation. USA. AAI3136691

4. Heinrich Apfelmus . 2010. The Operational Monad Tutorial. The Monad.Reader , Issue 15 ( 2010 ). Heinrich Apfelmus. 2010. The Operational Monad Tutorial. The Monad.Reader, Issue 15 (2010).

5. An indexed model of recursive types for foundational proof-carrying code

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Algebraic Effects Meet Hoare Logic in Cubical Agda;Proceedings of the ACM on Programming Languages;2024-01-05

2. Calculating Compilers for Concurrency;Proceedings of the ACM on Programming Languages;2023-08-30

3. Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in Coq;Proceedings of the ACM on Programming Languages;2023-01-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3