The sequential semantics of producer effect systems

Effects are fundamental to programming languages. Even the lambda calculus has effects, and consequently the two famous evaluation strategies produce different semantics. As such, much research has been done to improve our understanding of effects. Since Moggi introduced monads for his computational lambda calculus, further generalizations have been designed to formalize increasingly complex computational effects, such as indexed monads followed by layered monads followed by parameterized monads. This succession prompted us to determine the most general formalization possible. In searching for this formalization we came across many surprises, such as the insufficiencies of arrows, as well as many unexpected insights, such as the importance of considering an effect as a small component of a whole system rather than just an isolated feature. In this paper we present our semantic formalization for producer effect systems, which we call a productor, and prove its maximal generality by focusing on only sequential composition of effectful computations, consequently guaranteeing that the existing monadic techniques are specializations of productors.

[1]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

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

[3]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[4]  Daniel Marino,et al.  A generic type-and-effect system , 2009, TLDI '09.

[5]  Flemming Nielson,et al.  Polymorphic Subtyping for Effect Analysis: The Static Semantics , 1996, LOMAPS.

[6]  Richard B. Kieburtz Taming effects with monadic typing , 1998, ICFP '98.

[7]  Christoph Lüth,et al.  Composing monads using coproducts , 2002, ICFP '02.

[8]  Hayo Thielecke,et al.  Environments, Continuation Semantics and Indexed Categories , 1997, TACS.

[9]  Tom Leinster Higher Operads, Higher Categories , 2003 .

[10]  Hayo Thielecke,et al.  Closed Freyd-and -categories , 1999 .

[11]  Access control in a core calculus of dependency , 2006, ICFP '06.

[12]  Pierre Jouvelot,et al.  The type and effect discipline , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[13]  Michael Hicks,et al.  Contextual effects for version-consistent dynamic software updating and safe concurrent programming , 2008, POPL '08.

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

[15]  Philip Wadler,et al.  Combining Monads , 1992 .

[16]  Andrzej Filinski,et al.  Representing layered monads , 1999, POPL '99.

[17]  Olivier Danvy,et al.  A Functional Abstraction of Typed Contexts , 1989 .

[18]  Andrew P. Tolmach,et al.  Optimizing ML Using a Hierarchy of Monadic Types , 1998, Types in Compilation.

[19]  Philip Wadler,et al.  Comprehending monads , 1990, LISP and Functional Programming.

[20]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

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

[22]  Robert Atkey,et al.  Parameterised notions of computation , 2006, J. Funct. Program..

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

[24]  Michael Hicks,et al.  Lightweight monadic programming in ML , 2011, ICFP.

[25]  Pierre Jouvelot,et al.  Polymorphic type, region and effect inference , 1992, Journal of Functional Programming.

[26]  John C. Reynolds,et al.  Using category theory to design implicit conversions and generic operators , 1980, Semantics-Directed Compiler Generation.

[27]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[28]  Hayo Thielecke,et al.  Closed Freyd- and kappa-categories , 1999, ICALP.

[29]  Andrzej Filinski Monads in action , 2010, POPL '10.

[30]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[31]  Philip Wadler,et al.  Monads and composable continuations , 1994, LISP Symb. Comput..

[32]  Flemming Nielson,et al.  Type and Effect Systems , 1999, Correct System Design.

[33]  Uday S. Reddy,et al.  Imperative functional programming , 1996, CSUR.

[34]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[35]  Bart Jacobs,et al.  Under Consideration for Publication in J. Functional Programming Categorical Semantics for Arrows , 2022 .