Programming with algebraic effects and handlers

Abstract Eff is a programming language based on the algebraic approach to computational effects, in which effects are viewed as algebraic operations and effect handlers as homomorphisms from free algebras. Eff supports first-class effects and handlers through which we may easily define new computational effects, seamlessly combine existing ones, and handle them in novel ways. We give a denotational semantics of Eff and discuss a prototype implementation based on it. Through examples we demonstrate how the standard effects are treated in Eff , and how Eff supports programming techniques that use various forms of delimited continuations, such as backtracking, breadth-first search, selection functionals, cooperative multi-threading, and others.

[1]  Philip Wadler Monads for Functional Programming , 1995, Advanced Functional Programming.

[2]  Gordon D. Plotkin,et al.  Algebraic Operations and Generic Effects , 2003, Appl. Categorical Struct..

[3]  Robin Milner,et al.  Definition of standard ML , 1990 .

[4]  Gordon D. Plotkin,et al.  Notions of Computation Determine Monads , 2002, FoSSaCS.

[5]  Matija Pretnar,et al.  Logic and handling of algebraic effects , 2010 .

[6]  Gordon D. Plotkin,et al.  Combining algebraic effects with continuations , 2007, Theor. Comput. Sci..

[7]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[8]  Gordon D. Plotkin,et al.  Tensors of Comodels and Models for Operational Semantics , 2008, MFPS.

[9]  Martín Hötzel Escardó,et al.  Selection functions, bar recursion and backward induction , 2010, Mathematical Structures in Computer Science.

[10]  Johan Jeuring,et al.  Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text , 1995 .

[11]  Gordon D. Plotkin,et al.  Adequacy for Algebraic Effects , 2001, FoSSaCS.

[12]  Damien Doligez,et al.  The OCaml system release 4.07: Documentation and user's manual , 2013 .

[13]  Nick Benton,et al.  Monads and Effects , 2000, APPSEM.

[14]  Gordon D. Plotkin,et al.  Handlers of Algebraic Effects , 2009, ESOP.

[15]  Hayo Thielecke,et al.  Modelling environments in call-by-value programming languages , 2003, Inf. Comput..

[16]  Andrew M. Pitts,et al.  A New Approach to Abstract Syntax with Variable Binding , 2002, Formal Aspects of Computing.

[17]  Gordon D. Plotkin,et al.  Logic for Computational Effects: Work in Progress , 2003, IWFM.

[18]  Andrew K. Wright Simple imperative polymorphism , 1995, LISP Symb. Comput..

[19]  John Power,et al.  From Comodels to Coalgebras: State and Arrays , 2004, CMCS.

[20]  Gordon D. Plotkin,et al.  A Logic for Algebraic Effects , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[21]  Gordon D. Plotkin,et al.  Combining effects: Sum and tensor , 2006, Theor. Comput. Sci..

[22]  Olivier Danvy,et al.  Representing Control: a Study of the CPS Transformation , 1992, Mathematical Structures in Computer Science.

[23]  John C. Reynolds,et al.  The Meaning of Types From Intrinsic to Extrinsic Semantics , 2000 .

[24]  Peter Kulchyski and , 2015 .