...
首页> 外文期刊>Journal of Functional Programming >On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control
【24h】

On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control

机译:用户定义效果的表达能力:效果处理程序,单声反射,定界控制

获取原文
获取原文并翻译 | 示例

摘要

We compare the expressive power of three programming abstractions for user-defined computational effects: Plotkin and Pretnar's effect handlers, Filinski's monadic reflection, and delimited control. This comparison allows a precise discussion about the relative expressiveness of each programming abstraction. It also demonstrates the sensitivity of the relative expressiveness of user-defined effects to seemingly orthogonal language features. We present three calculi, one per abstraction, extending Levy's call-by-push-value. For each calculus, we present syntax, operational semantics, a natural type-and-effect system, and, for effect handlers and monadic reflection, a set-theoretic denotational semantics. We establish their basic metatheoretic properties: safety, termination, and, where applicable, soundness and adequacy. Using Felleisen's notion of a macro translation, we show that these abstractions can macro express each other, and show which translations preserve typeability. We use the adequate unitary set-theoretic denotational semantics for the monadic calculus to show that effect handlers cannot be macro expressed while preserving typeability either by monadic reflection or by delimited control. Our argument fails with simple changes to the type system such as polymorphism and inductive types. We supplement our development with a mechanised Abella formalisation.
机译:我们比较了三种编程抽象对用户定义的计算效果的表达能力:Plotkin和Pretnar的效果处理程序,Filinski的单子反射和定界控制。这种比较允许对每种编程抽象的相对表现力进行精确的讨论。它还说明了用户定义效果的相对表达对于看似正交的语言功能的敏感性。我们提出三种计算,每种抽象一种,扩展了Levy的按推值调用。对于每个演算,我们提供语法,操作语义,自然的类型和效果系统,以及对于效果处理程序和单子反射,提供集合理论的指称语义。我们建立了它们的基本元理论属性:安全性,终止性,以及在适当情况下的健全性和充分性。使用Felleisen的宏翻译概念,我们表明这些抽象可以相互宏表达,并表明哪些翻译保留了可打字性。我们对单子演算使用适当的unit集理论的指称语义,以表明效果处理程序不能通过宏表示,而通过单子反射或定界控制来保持可键入性。我们的论断以类型系统的简单更改而失败,例如多态和归纳类型。我们以机械化的Abella形式化补充了我们的发展。

著录项

  • 来源
    《Journal of Functional Programming 》 |2019年第2019期| e15.1-e15.43| 共43页
  • 作者单位

    Saarland Univ Dept Comp Sci Saarbrucken Germany|Univ Cambridge Comp Lab Cambridge England;

    Univ Cambridge Comp Lab Cambridge England|Univ Edinburgh Sch Informat Edinburgh Midlothian Scotland|Univ Oxford Balliol Coll Dept Comp Sci Oxford England;

    Univ Edinburgh Sch Informat Edinburgh Midlothian Scotland|Imperial Coll Dept Comp London England;

    Univ Ljubljana Fac Math & Phys Ljubljana Slovenia;

  • 收录信息 美国《科学引文索引》(SCI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号