计算机科学 > 程序设计语言
[提交于 2013年6月26日 (v1),最后修订于 2014年10月16日 (此版本, v2)]
标题:An Effect System for Algebraic Effects and Handlers
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We present an effect system for core Eff, a simplified variant of Eff, which is an ML-style programming language with first-class algebraic effects and handlers. We define an expressive effect system and prove safety of operational semantics with respect to it. Then we give a domain-theoretic denotational semantics of core Eff, using Pitts's theory of minimal invariant relations, and prove it adequate. We use this fact to develop tools for finding useful contextual equivalences, including an induction principle. To demonstrate their usefulness, we use these tools to derive the usual equations for mutable state, including a general commutativity law for computations using non-interfering references. We have formalized the effect system, the operational semantics, and the safety theorem in Twelf.