Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Combining algebraic effects with continuations

Published: 20 April 2007 Publication History

Abstract

We consider the natural combinations of algebraic computational effects such as side-effects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor extend, with effort, to include commonly used combinations of the various algebraic effects with continuations. Continuations also give rise to a third sort of combination, that given by applying the continuations monad transformer to an algebraic effect. We investigate the extent to which sum and tensor extend from algebraic effects to arbitrary monads, and the extent to which Felleisen et al.'s C operator extends from continuations to its combination with algebraic effects. To do all this, we use Dubuc's characterisation of strong monads in terms of enriched large Lawvere theories.

References

[1]
Abelson, H., Dybvig, R.K., Haynes, C.T., Rozas, G.J., Adams, N.I., Friedman, D.P., Kohlbecker, E., Steele, G.L., Bartley, D.H., Halstead, R., Oxley, D., Sussman, G.J., Brooks, G., Hanson, C., Pitman, K.M. and Wand, M., Revised report on the algorithmic language scheme. Higher-Order Symb. Comput. v11 i1. 7-105.
[2]
Adámek, J. and Rosický, J., . In: London Mathematical Society Lecture Note Series, vol. 189. CUP.
[3]
Ariola, Z.M., Herbelin, H. and Sabry, Amr, A type-theoretic foundation of continuations and prompts. In: Okasaki, C., Fisher, K. (Eds.), Proc. Ninth ACM SIGPLAN Int. Con. on Functional Programming, ACM. pp. 40-53.
[4]
Barr, M. and Wells, C., Toposes, Triples and Theories. 1985. Springer-Verlag.
[5]
Benton, N., Hughes, J. and Moggi, E., Monads and effects. In: LNCS, vol. 2395. pp. 42-122.
[6]
P. Cenciarelli, E. Moggi, A Syntactic Approach to Modularity in Denotational Semantics, in: Proc. 5th CTCS, CWI Technical report, 1993
[7]
Curien, P.-L. and Herbelin, H., The duality of computation. In: SIGPLAN Notices, vol. 35 (9). ACM Press. pp. 233-243.
[8]
Duba, B., Harper, R. and MacQueen, D., Typing first-class continuations in ML. J. Funct. Programming. v3 i4. 465-484.
[9]
Dubuc, E.J., Kan extensions in enriched category theory. In: Lecture Notes in Mathematics, vol. 145. Springer-Verlag.
[10]
Felleisen, M. and Friedman, D., Control operators, the SECD machine, and the --calculus. In: Wirsing, M. (Ed.), Formal Description of Programming Concepts III, North-Holland. pp. 193-217.
[11]
Felleisen, M., Friedman, D.P., Kohlbecker, E.E. and Duba, B.F., Reasoning with continuations. In: Proc. 1st. LICS, IEEE Press. pp. 131-141.
[12]
A. Filinski, Representing monads, in: Proc. 21st. POPL, 1994, pp. 446-457
[13]
A. Filinski, Representing layered monads, in: Proc. 26th. POPL, 1999, pp. 175-188
[14]
Führmann, C. and Thielecke, H., On the call-by-value CPS transform and its semantics. Inform. and Comput. v188 i2. 241-283.
[15]
T. Griffin, A formulae-as-types notion of control, in: Proc. 17th. POPL, 1990, pp. 47-58
[16]
Hasegawa, M. and Kakutani, Y., Axioms for recursion in call-by-value. Higher-Order Symb. Comput. v15 i2-3. 235-264.
[17]
Hofmann, M., Sound and complete axiomatisations of call-by-value control operators. Math. Struct. Comp. Science. v5 i4. 461-482.
[18]
Hyland, J.M.E., Plotkin, G.D. and Power, A.J., Combining effects: Sum and tensor. Theoret. Comput. Sci. v357 i1-3. 70-99.
[19]
Pseudo-commutative monads. In: ENTCS, vol. 45. Elsevier.
[20]
Hyland, J.M.E. and Power, A.J., Pseudo-commutative monads and pseudo-closed 2-categories. J. Pure Appl. Algebra. v175. 141-185.
[21]
Kelly, G.M., A unified treatment of transfinite constructions for free algebras, free monoids, colimits, associated sheaves, and so on. Bull. Austral. Math. Soc. v22. 1-83.
[22]
Kelly, G.M., Basic Concepts of Enriched Category Theory. 1982. Cambridge University Press.
[23]
Kelly, G.M., Structures defined by finite limits in the enriched context I. Cah. Topol. Géom. Différ. v23 i1. 3-42.
[24]
Kelly, G.M. and Power, A.J., Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads. J. Pure Appl. Algebra. v89. 163-179.
[25]
Higher-Order Symb. Comput. v11. 7-105.
[26]
Kock, A., Monads on symmetric monoidal closed categories. Arch. Math. v21. 1-10.
[27]
Laird, J., Exceptions, continuations and macro-expressiveness. In: LNCS, vol. 2305. Springer-Verlag. pp. 133-146.
[28]
Levy, P.B., Call-by-push-value: A functional/imperative synthesis. In: Semantic Structures in Computation, vol. 2. Springer.
[29]
Levy, P.B., Monads and adjunctions for global exceptions. In: ENTCS, vol. 158. Elsevier. pp. 261-287.
[30]
Modelling environments in call-by-value programming languages. Inform. and Comput. v185. 182-210.
[31]
Luth, C. and Ghani, N., Composing monads using coproducts. In: Proc. ICFP -02, ACM Press. pp. 133-144.
[32]
Manes, E.G., . In: Graduate Texts in Mathematics, vol. 26. Springer-Verlag.
[33]
Moggi, E., Computational lambda-calculus and monads. In: Proc. 3rd. LICS, IEEE Press. pp. 14-23.
[34]
Moggi, E., Notions of computation and monads. Inform. and Comput. v93 i1. 55-92.
[35]
Ong, C.-H.L. and Stewart, C.A., A curry-howard foundation for functional computation with control. In: Proc. 24th. POPL, ACM Press. pp. 215-227.
[36]
Parigot, M., Lambda-mu-calculus: An algorithmic interpretation of classical natural deduction. In: Voronkov, A. (Ed.), LNCS, vol. 624. Springer-Verlag. pp. 190-201.
[37]
Plotkin, G.D., Some varieties of equational logic (extended abstract). In: Futatsugi, K., Jouannaud, J.-P., Meseguer, J. (Eds.), LNCS, vol. 4060. Springer-Verlag. pp. 150-156.
[38]
Plotkin, G.D., Call-by-name, call-by-value and the --calculus. Theoret. Comput. Sci. v1. 125-154.
[39]
Plotkin, G.D. and Power, A.J., Adequacy for algebraic effects. In: Honsell, F., Miculan, M. (Eds.), LNCS, vol. 2030. Springer-Verlag. pp. 1-24.
[40]
Plotkin, G.D. and Power, A.J., Notions of computation determine monads. In: LNCS, vol. 2303. Springer-Verlag. pp. 342-356.
[41]
Plotkin, G.D. and Power, A.J., Algebraic operations and generic effects. Appl. Categ. Structures. v11 i1. 69-94.
[42]
Plotkin, G.D. and Power, A.J., Computational effects and operations: an overview. In: Escardó, M., Jung, A. (Eds.), ENTCS, vol. 73. Elsevier. pp. 149-163.
[43]
Enriched Lawvere theories. Theory Appl. Categ. v6. 83-93.
[44]
Power, A.J., Models for the computational lambda calculus. In: Hurley, T., Mac an Airchinnigh, M., Schellekens, M., Seda, A.K. (Eds.), ENTCS, vol. 40. Elsevier, Amsterdam.
[45]
Power, A.J. and Shkaravska, O., From comodels to coalgebras: State and arrays. In: Adámek, J., Milius, S. (Eds.), ENTCS, vol. 106. Elsevier. pp. 297-314.
[46]
Rees, J. and Clinger, W., Revised3 report on the algorithmic language scheme. ACM SIGPLAN Not. v21 i12. 37-79.
[47]
Reynolds, J.C., GEDANKEN - a simple typeless language based on the principle of completeness and the reference concept. Commun. ACM. v13 i5. 308-319.
[48]
Reynolds, J.C., Definitional interpreters for higher-order programming languages. In: Proc. 2nd ACM Annual Conference, ACM. pp. 717-740.
[49]
Reynolds, J.C., On the relation between direct and continuation semantics. In: Loeckx, J. (Ed.), LNCS, vol. 14. Springer-Verlag. pp. 141-156.
[50]
Reynolds, J.C., Semantics of the domain of flow diagrams. J. ACM. v24 i3. 484-503.
[51]
Reynolds, J.C., Definitional interpreters revisited. Higher-Order Symb. Comput. v11 i4. 355-361.
[52]
Reynolds, J.C., The discoveries of continuations. Lisp Symb. Comput. v6 i3-4. 233-248.
[53]
Reynolds, J.C., Theories of Programming Languages. 1998. Cambridge University Press.
[54]
Riecke, J.G. and Thielecke, H., Typed exceptions and continuations cannot macro-express each other. In: Wiedermann, J., van Emde Boas, P., Nielsen, M. (Eds.), LNCS, vol. 1644. pp. 635-644.
[55]
Thielecke, H., On exceptions versus continuations in the presence of state. In: Smolka, G. (Ed.), LNCS, vol. 1782. pp. 397-411.
[56]
Thielecke, H., Comparing control constructs by double-barrelled CPS. Higher-Order Symb. Comput. v15. 141-160.
[57]
Wozencraft, J.M. and Evans, A., Notes on Programming Linguistics. 1971. M.I.T. Department of Electrical Engineering.

Cited By

View all
  • (2024)Algebraic Effects Meet Hoare Logic in Cubical AgdaProceedings of the ACM on Programming Languages10.1145/36328988:POPL(1663-1695)Online publication date: 5-Jan-2024
  • (2020)Toward a Uniform Theory of Effectful State MachinesACM Transactions on Computational Logic10.1145/337288021:3(1-63)Online publication date: 13-Mar-2020
  • (2019)Dijkstra monads for allProceedings of the ACM on Programming Languages10.1145/33417083:ICFP(1-29)Online publication date: 26-Jul-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

Publisher

Elsevier Science Publishers Ltd.

United Kingdom

Publication History

Published: 20 April 2007

Author Tags

  1. Computational effect
  2. Lawvere theory
  3. Modularity
  4. Monad

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Algebraic Effects Meet Hoare Logic in Cubical AgdaProceedings of the ACM on Programming Languages10.1145/36328988:POPL(1663-1695)Online publication date: 5-Jan-2024
  • (2020)Toward a Uniform Theory of Effectful State MachinesACM Transactions on Computational Logic10.1145/337288021:3(1-63)Online publication date: 13-Mar-2020
  • (2019)Dijkstra monads for allProceedings of the ACM on Programming Languages10.1145/33417083:ICFP(1-29)Online publication date: 26-Jul-2019
  • (2019)A Sound and Complete Logic for Algebraic EffectsFoundations of Software Science and Computation Structures10.1007/978-3-030-17127-8_22(382-399)Online publication date: 8-Apr-2019
  • (2016)Quantitative Algebraic ReasoningProceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science10.1145/2933575.2934518(700-709)Online publication date: 5-Jul-2016
  • (2015)A Fibrational Account of Local StatesProceedings of the 2015 30th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)10.1109/LICS.2015.45(402-413)Online publication date: 6-Jul-2015
  • (2015)Stateful Runners of Effectful ComputationsElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2015.12.024319:C(403-421)Online publication date: 21-Dec-2015
  • (2013)Hoare-style reasoning with (algebraic) continuationsACM SIGPLAN Notices10.1145/2544174.250059348:9(363-376)Online publication date: 25-Sep-2013
  • (2013)Hoare-style reasoning with (algebraic) continuationsProceedings of the 18th ACM SIGPLAN international conference on Functional programming10.1145/2500365.2500593(363-376)Online publication date: 25-Sep-2013
  • (2013)A coinductive calculus for asynchronous side-effecting processesInformation and Computation10.1016/j.ic.2013.08.012231(204-232)Online publication date: 1-Oct-2013
  • Show More Cited By

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media