Programming languages with algebraic effects often rely on effect annotations to track algebraic operations in a computation. This is particularly important in the presence of effect handlers, where handling of an effect may remove it from the annotation in the computation's type. In this paper we view the algebraic effect theory of a computation as a variable context, and track the effects directly in computation's modal type with ECMTT, a novel calculus for algebraic effects and handlers. Our calculus supports computations with effects and derives from Contextual Modal Type Theory (CMTT), from which it inherits a number of important logical properties. In contrast to type-and-effect systems, where effects are attached as annotations to a prior computational language, ECMMT tracks effects by a contextualized variant of the modal $\Box$ (necessity) operator of the intuitionistic modal logic of CMTT. In programming, the effect annotations are explicitly managed by the dedicated term constructors corresponding to the logical introduction and elimination forms for the modality. The modal foundation leads to customary logical properties of local soundness and completeness, and determines the operational semantics of ECMTT directly by $\beta$-reduction. In addition, effect handlers become a generalization of explicit substitutions, which in CMTT serve to reach one context from another. To the best of our knowledge, ECMTT is the first system to relate algebraic effects to modal types. We also see it as a step towards providing a correspondence in the style of Curry and Howard that may transfer a number of results from the fields of modal logic and modal type theory to that of algebraic effects.


翻译:具有代数效果的编程语言往往依赖效果说明来跟踪计算中的代数操作。 这在效果处理器的存在中特别重要, 效果处理可以将效果从计算类型中的批注中去除。 在本文中, 我们将计算结果的代数效应理论视为变量背景, 直接跟踪计算模式类型的影响, 与 ECMTT 是一种用于代数效应和处理者的新型计算计算。 我们的计算效果支持效果的计算, 并来自Conteracial Modal 类型( CMTT), 它从中继承了一些重要的逻辑属性。 与类型和效果系统相比, 将效果作为先前计算语言的批注, ECMT 跟踪效果, 由计算模型的缩略式模式( QMTT) 和处理器的缩略图( QMTF) 的缩略图( CMTF), 其效果由专门的术语构建者明确管理, 与该模式的逻辑引入和删除格式的表格。 模式的缩略图基础, 将Oralalalalalalalalal moal model model model moal moal model model model le del le del 和 del del del ex ex 。

0
下载
关闭预览

相关内容

注意力机制综述
专知会员服务
198+阅读 · 2021年1月26日
最新《图理论》笔记书,98页pdf
专知会员服务
74+阅读 · 2020年12月27日
自然语言处理顶会COLING2020最佳论文出炉!
专知会员服务
23+阅读 · 2020年12月12日
知识图谱推理,50页ppt,Salesforce首席科学家Richard Socher
专知会员服务
105+阅读 · 2020年6月10日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
17篇必看[知识图谱Knowledge Graphs] 论文@AAAI2020
已删除
将门创投
6+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
LibRec 精选:推荐系统的论文与源码
LibRec智能推荐
14+阅读 · 2018年11月29日
自然语言处理顶会EMNLP2018接受论文列表!
专知
87+阅读 · 2018年8月26日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年4月28日
Arxiv
0+阅读 · 2021年4月27日
Arxiv
0+阅读 · 2021年4月25日
Arxiv
0+阅读 · 2021年4月23日
VIP会员
相关VIP内容
注意力机制综述
专知会员服务
198+阅读 · 2021年1月26日
最新《图理论》笔记书,98页pdf
专知会员服务
74+阅读 · 2020年12月27日
自然语言处理顶会COLING2020最佳论文出炉!
专知会员服务
23+阅读 · 2020年12月12日
知识图谱推理,50页ppt,Salesforce首席科学家Richard Socher
专知会员服务
105+阅读 · 2020年6月10日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
17篇必看[知识图谱Knowledge Graphs] 论文@AAAI2020
已删除
将门创投
6+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
LibRec 精选:推荐系统的论文与源码
LibRec智能推荐
14+阅读 · 2018年11月29日
自然语言处理顶会EMNLP2018接受论文列表!
专知
87+阅读 · 2018年8月26日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员