Abstract
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.
Supplemental Material
- Martín Abadi. Access control in a core calculus of dependency. In ICFP, 2006. Google Scholar
Digital Library
- Robert Atkey. Parameterised notions of computation. JFP, 19:335--376, July 2009. Google Scholar
Digital Library
- Nick Benton, John Hughes, and Eugenio Moggi. Monads and effects. In International Summer School on Applied Semantics, 2000. Google Scholar
Digital Library
- Olivier Danvy and Andrzej Filinski. A functional abstraction of typed contexts. Technical report, University of Copenhagen, 1989.Google Scholar
- Andrzej Filinski. Representing layered monads. In POPL, 1999. Google Scholar
Digital Library
- Andrzej Filinski. Monads in action. In POPL, 2010. Google Scholar
Digital Library
- Roger Godement. Topologie Algébrique et Théorie des Faisceaux. Hermann, 1958.Google Scholar
- John Hughes. Generalising monads to arrows. Science of Computer Programming, 37(1--3):67--111, May 2000. Google Scholar
Digital Library
- Martin Hyland, Gordon Plotkin, and John Power. Combining effects: Sum and tensor. Theoretical Computer Science, 357(1):70--99, 2006. Google Scholar
Digital Library
- Bart Jacobs, Chris Heunen, and Ichiro Hasuo. Categorical semantics for arrows. JFP, 19:403--438, 2009. Google Scholar
Digital Library
- Mark P. Jones and Luc Duponcheel. Composing monads. Technical report, Yale University, New Haven, CT, USA, December 1993.Google Scholar
- Simon Peyton Jones and Philip Wadler. Imperative functional programming. In POPL, 1993. Google Scholar
Digital Library
- Richard B. Kieburtz. Taming effects with monadic typing. In ICFP, 1998. Google Scholar
Digital Library
- David J. King and Philip Wadler. Combining monads. In ETAPS, 1992.Google Scholar
- Tom Leinster. Higher Operads, Higher Categories. Cambridge University Press, 2004.Google Scholar
- Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In POPL, 1995. Google Scholar
Digital Library
- John M. Lucassen and David K. Gifford. Polymorphic effect systems. In POPL, 1988. Google Scholar
Digital Library
- Christoph Lüth and Neil Ghani. Composing monads using coproducts. ACM SIGPLAN Notices, 37(9):133--144, 2002. Google Scholar
Digital Library
- Daniel Marino and Todd Millstein. A generic type-and-effect system. In TLDI, 2009. Google Scholar
Digital Library
- Eugenio Moggi. Computational lambda-calculus and monads. In LICS, 1989. Google Scholar
Digital Library
- Iulian Neamtiu, Michael Hicks, Jeffrey S. Foster, and Polyvios Pratikakis. Contextual effects for version-consistent dynamic software updating and safe concurrent programming. In POPL, 2008. Google Scholar
Digital Library
- Flemming Nielson and Hanne Riis Nielson. Type and effect systems. In ACM Computing Surveys, 1999.Google Scholar
- Hanne Riis Nielson, Flemming Nielson, and Torben Amtoft. Polymorphic subtyping for effect analysis: The static semantics. In LOMAPS, 1997.Google Scholar
Cross Ref
- Gordon Plotkin and John Power. Notions of computation determine monads. In FoSSaCS, 2002. Google Scholar
Digital Library
- John Power and Edmund Robinson. Premonoidal categories and notions of computation. Mathematical Structures in Computer Science, 7:453--468, October 1997. Google Scholar
Digital Library
- John Power and Hayo Thielecke. Environments, continuation semantics and indexed categories. In TACS, 1997. Google Scholar
Digital Library
- John Power and Hayo Thielecke. Closed Freyd- and κ-categories. In ICAL, 1999. Google Scholar
Digital Library
- John C. Reynolds. Using category theory to design implicit conversions and generic operators. LNCS, 94:211--258, 1980. Google Scholar
Digital Library
- Nikhil Swamy, Nataliya Guts, Daan Leijen, and Michael Hicks. Lightweight monadic programming in ML. Technical report, Microsoft Research, 2011.Google Scholar
- Jean-Pierre Talpin. Theoretical and Practical Aspects of Type and Effect Inference. PhD thesis, École des Mines de Paris and University Paris VI, Paris, France, 1993.Google Scholar
- Jean-Pierre Talpin and Pierre Jouvelot. Polymorphic type, region and effect inference. JFP, 2:245--271, 1992.Google Scholar
Cross Ref
- Jean-Pierre Talpin and Pierre Jouvelot. The type and effect discipline. Information and Computation, 111(2):245--296, 1994. Google Scholar
Digital Library
- Ross Tate. The sequential semantics of producer effect systems. Technical report, Cornell University, 2012.Google Scholar
- Andrew P. Tolmach. Optimizing ML using a hierarchy of monadic types. In Types in Compilation, 1998. Google Scholar
Digital Library
- Philip Wadler. Comprehending monads. In LISP and Functional Programming, 1990. Google Scholar
Digital Library
- Philip Wadler. The essence of functional programming. In POPL, 1992. Google Scholar
Digital Library
- Philip Wadler. Monads and composable continuations. LISP and Symbolic Computation, 7:39--56, January 1994. Google Scholar
Digital Library
- Philip Wadler and Peter Thiemann. The marriage of effects and monads. Transactions on Computational Logic, 4(1):1--32, 2003. Google Scholar
Digital Library
- Andrew K. Wright. Simple imperative polymorphism. LISP and Symbolic Computation, 8(4):343--355, 1995. Google Scholar
Digital Library
Index Terms
The sequential semantics of producer effect systems
Recommendations
Parametric effect monads and semantics of effect systems
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesWe study fundamental properties of a generalisation of monad called parametric effect monad, and apply it to the interpretation of general effect systems whose effects have sequential composition operators. We show that parametric effect monads admit ...
The sequential semantics of producer effect systems
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesEffects 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. ...
Combining effects and coeffects via grading
ICFP '16Effects and coeffects are two general, complementary aspects of program behaviour. They roughly correspond to computations which change the execution context (effects) versus computations which make demands on the context (coeffects). Effectful ...







Comments