License:
Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.FSCD.2017.18
URN: urn:nbn:de:0030-drops-77394
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2017/7739/
Hillerström, Daniel ;
Lindley, Sam ;
Atkey, Robert ;
Sivaramakrishnan, K. C.
Continuation Passing Style for Effect Handlers
Abstract
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.
BibTeX - Entry
@InProceedings{hillerstrm_et_al:LIPIcs:2017:7739,
author = {Daniel Hillerstr{\"o}m and Sam Lindley and Robert Atkey and K. C. Sivaramakrishnan},
title = {{Continuation Passing Style for Effect Handlers}},
booktitle = {2nd International Conference on Formal Structures for Computation and Deduction (FSCD 2017)},
pages = {18:1--18:19},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-047-7},
ISSN = {1868-8969},
year = {2017},
volume = {84},
editor = {Dale Miller},
publisher = {Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
address = {Dagstuhl, Germany},
URL = {http://drops.dagstuhl.de/opus/volltexte/2017/7739},
URN = {urn:nbn:de:0030-drops-77394},
doi = {10.4230/LIPIcs.FSCD.2017.18},
annote = {Keywords: effect handlers, delimited control, continuation passing style}
}
Keywords: |
|
effect handlers, delimited control, continuation passing style |
Collection: |
|
2nd International Conference on Formal Structures for Computation and Deduction (FSCD 2017) |
Issue Date: |
|
2017 |
Date of publication: |
|
30.08.2017 |