CoChat

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

Open access
Forster, Yannick, Kammar, Ohad, Lindley, Sam, Pretnar, Matija · 2017 · Proceedings of the ACM on Programming Languages
Cited by 35

The DOI matches its Crossref record; 5 of the 5 references it cites were found in a registry or an index.

Abstract

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 without answer-type-modification. 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 finitary 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.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/3110257

Cites

5 of 5 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 5 references

Cited by

  • Binders by day, labels by night: effect instances via lexically scoped handlers

    Biernacki, D., Piróg, M., Polesiuk, P., & Sieczkowski, F. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3371116 · Cited by 46

    “Indeed, effect handlers are closely related to the shift 0 /reset control operators [Forster et al. 2017; Piróg et al. 2019].”
    Background
  • Doo bee doo bee doo

    CONVENT, L., LINDLEY, S., MCBRIDE, C., & MCLAUGHLIN, C. (2020) · Journal of Functional Programming · doi:10.1017/s0956796820000039 · Cited by 39

    “Forster et al. (2017, 2019) compare effect handlers with monadic reflection and delimited control in a more abstract untyped setting; Piróg et al. (2019) extend this approach in order to compare effect handlers with delimited control in the presence of types, making essential use of polymorphism.”
    BackgroundSelf-citation
  • No value restriction is needed for algebraic effects and handlers

    KAMMAR, O., & PRETNAR, M. (2017) · Journal of Functional Programming · doi:10.1017/s0956796816000320 · Cited by 22

    Self-citation
  • Handling Polymorphic Algebraic Effects

    Sekiyama, T., & Igarashi, A. (2019) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-17184-1_13 · Cited by 9

    “[9] investigate the relationships between algebraic effect handlers and other mechanisms for user-defined effects—delimited control shift0 [19] and monadic reflection [7,8]—conjecturing that there would be no type-preserving translation from a language with delimited control or monadic reflection to one with algebraic…”
    Background

Metadata

Authors
Forster, Y., Kammar, O., Lindley, S., & Pretnar, M.
Venue
Proceedings of the ACM on Programming Languages
Published
2017-08-29
Volume
1
Issue
ICFP
Pages
1-29
ISSN
2475-1421 (ISSN-L)
OpenAlex
W2544085948
Cited by
35
References
5
FWCI
3.12
Type
journal article
Language
en
Open access
hybrid

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.