On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control. Forster, Y.; Kammar, O.; Lindley, S.; and Pretnar, M. Journal of Functional Programming, 2019. ZSCC: NoCitationData[s0]
On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control [link]Paper  doi  abstract   bibtex   
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. 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.
@article{forster_expressive_2019,
	title = {On the expressive power of user-defined effects: {Effect} handlers, monadic reflection, delimited control},
	volume = {29},
	issn = {0956-7968, 1469-7653},
	shorttitle = {On the expressive power of user-defined effects},
	url = {http://www.cambridge.org/core/journals/journal-of-functional-programming/article/on-the-expressive-power-of-userdefined-effects-effect-handlers-monadic-reflection-delimited-control/3FFAA9AD05B58A1467E411F80EE4E076},
	doi = {10/gf9m3h},
	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. 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.},
	language = {en},
	urldate = {2019-10-08},
	journal = {Journal of Functional Programming},
	author = {Forster, Yannick and Kammar, Ohad and Lindley, Sam and Pretnar, Matija},
	year = {2019},
	note = {ZSCC: NoCitationData[s0]}
}
Downloads: 0