Shallow Effect Handlers

Daniel Hillerström, Sam Lindley

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Citations (Scopus)

Abstract

Plotkin and Pretnar’s effect handlers offer a versatile abstraction for modular programming with user-defined effects. Traditional deep handlers are defined by folds over computation trees. In this paper we study shallow handlers, defined instead by case splits over computation trees. We show that deep and shallow handlers can simulate one another up to specific notions of administrative reduction. We present the first formal accounts of an abstract machine for shallow handlers and a Continuation Passing Style (CPS) translation for shallow handlers taking special care to avoid memory leaks. We provide implementations in the Links web programming language and empirically verify that neither implementation introduces unwarranted memory leaks.

Original languageEnglish
Title of host publicationProgramming Languages and Systems
Subtitle of host publicationAPLAS 2018
EditorsSukyoung Ryu
PublisherSpringer
Pages415-435
Number of pages21
ISBN (Electronic)9783030027681
ISBN (Print)9783030027674
DOIs
Publication statusPublished - 2018
Event16th Asian Symposium on Programming Languages and Systems 2018 - Wellington, New Zealand
Duration: 2 Dec 20186 Dec 2018

Publication series

NameLecture Notes in Computer Science
Volume11275
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference16th Asian Symposium on Programming Languages and Systems 2018
Abbreviated titleAPLAS 2018
CountryNew Zealand
CityWellington
Period2/12/186/12/18

Keywords

  • Abstract machines
  • Continuation passing
  • Effect handlers

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint Dive into the research topics of 'Shallow Effect Handlers'. Together they form a unique fingerprint.

  • Cite this

    Hillerström, D., & Lindley, S. (2018). Shallow Effect Handlers. In S. Ryu (Ed.), Programming Languages and Systems: APLAS 2018 (pp. 415-435). (Lecture Notes in Computer Science; Vol. 11275). Springer. https://doi.org/10.1007/978-3-030-02768-1_22