首页    期刊浏览 2024年12月02日 星期一
登录注册

文章基本信息

  • 标题:Continuation Passing Style for Effect Handlers
  • 本地全文:下载
  • 作者:Daniel Hillerstr{\"o}m ; Sam Lindley ; Robert Atkey
  • 期刊名称:LIPIcs : Leibniz International Proceedings in Informatics
  • 电子版ISSN:1868-8969
  • 出版年度:2017
  • 卷号:84
  • 页码:18:1-18:19
  • DOI:10.4230/LIPIcs.FSCD.2017.18
  • 出版社:Schloss Dagstuhl -- Leibniz-Zentrum fuer Informatik
  • 摘要:We present Continuation Passing Style (CPS) translations for Plotkin and Pretnar's effect handlers with Hillerström and Lindley's row-typed fine-grain call-by-value calculus of effect handlers as the source language. CPS translations of handlers are interesting theoretically, to explain the semantics of handlers, and also offer a practical implementation technique that does not require special support in the target language's runtime. We begin with a first-order CPS translation into untyped lambda calculus which manages a stack of continuations and handlers as a curried sequence of arguments. We then refine the initial CPS translation first by uncurrying it to yield a properly tail-recursive translation and second by making it higher-order in order to contract administrative redexes at translation time. We prove that the higher-order CPS translation simulates effect handler reduction. We have implemented the higher-order CPS translation as a JavaScript backend for the Links programming language.
  • 关键词:effect handlers; delimited control; continuation passing style
国家哲学社会科学文献中心版权所有