On the expressive power of user-defined effects: effect handlers, monadic reflection, delimited control
Open accessThe 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.
Integrity signals
Registry
Cites
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.
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
Algebraic Operations and Generic Effects
Plotkin, G., & Power, J. (2003) · Applied Categorical Structures · doi:10.1023/a:1023064908962 · Cited by 250
Plotkin, G., & Pretnar, M. (2009) · Lecture Notes in Computer Science · doi:10.1007/978-3-642-00590-9_7 · Cited by 225 · cited 2×
“Spivey [1990] and Wadler [1990] introduce programming abstractions based on monads, allowing new effects to be declared and used as if they are native.”
Self-citationType directed compilation of row-typed algebraic effects
Leijen, D. (2017) · Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages · doi:10.1145/3009837.3009872 · Cited by 98
Liberating effects with rows and handlers
Hillerström, D., & Lindley, S. (2016) · Proceedings of the 1st International Workshop on Type-Driven Development · doi:10.1145/2976022.2976033 · Cited by 68 · cited 3×
“3 EFFECT HANDLERS: eff Algebraic effects and handlers provide a basis for modular programming with user-defined effects [Kammar et al. 2013; Kiselyov et al. 2013; Bauer and Pretnar 2015; Hillerström and Lindley 2016; Leijen 2017; Lindley et al. 2017].”
BackgroundSelf-citationNo 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
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].”
BackgroundCONVENT, 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-citationNo 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-citationHandling 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.