Abstract
We investigate the phenomenon that every monad is a linear state monad. We do this by studying a fully-complete state-passing translation from an impure call-by-value language to a new linear type theory: the enriched call-by-value calculus. The results are not specific to store, but can be applied to any computational effect expressible using algebraic operations, even to effects that are not usually thought of as stateful. There is a bijective correspondence between generic effects in the source language and state access operations in the enriched call-by-value calculus.
From the perspective of categorical models, the enriched call-by-value calculus suggests a refinement of the traditional Kleisli models of effectful call-by-value languages. The new models can be understood as enriched adjunctions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Day, B.: On closed categories of functors. Lect. Notes Math., vol. 137, pp. 1–38. Springer, Heidelberg (1970)
Egger, J., Møgelberg, R., Simpson, A.: Enriching an effect calculus with linear types. In: Grädel, E., Kahle, R. (eds.) CSL 2009. LNCS, vol. 5771, pp. 240–254. Springer, Heidelberg (2009)
Egger, J., Møgelberg, R., Simpson, A.: Linearly-used continuations in the enriched effect calculus. In: Ong, L. (ed.) FOSSACS 2010. LNCS, vol. 6014, pp. 18–32. Springer, Heidelberg (2010)
Egger, J., Møgelberg, R., Simpson, A.: The enriched effect calculus (2011) (in preparation)
Fiore, M.P.: Enrichment and representation theorems for categories of domains and continuous functions (March 1996) (unpublished manuscript)
Gordon, R., Power, A.: Enrichment through variation. J. Pure Appl. Algebra 120, 167–185 (1997)
Janelidze, G., Kelly, G.: A note on actions of a monoidal category. Theory Appl. of Categ. 9(4), 61–91 (2001)
Kelly, G.M.: Adjunction for enriched categories. Lect. Notes Math., vol. 106, pp. 166–177. Springer, Heidelberg (1969)
Kelly, G.M.: Basic Concepts of Enriched Category Theory. Cambridge University Press, Cambridge (1982)
Levy, P.B.: Call By Push Value. Kluwer, Dordrecht (2003)
Levy, P., Power, J., Thielecke, H.: Modelling environments in call-by-value programming languages. Inform. and Comput. 185 (2003)
Moggi, E.: Notions of computation and monads. Inform. and Comput. 93, 55–92 (1991)
O’Hearn, P.W., Reynolds, J.C.: From Algol to polymorphic linear lambda-calculus. J. ACM 47 (2000)
Plotkin, G.: Call-by-name, call-by-value, and the λ-calculus. Theoret. Comp. Sci. 1, 125–159 (1975)
Plotkin, G., Power, J.: Tensors of comodels and models for operational semantics. In: Proc. MFPS XXIV. Electr. Notes Theor. Comput. Sci., vol. 218, pp. 295–311. Elsevier, Amsterdam (2008)
Plotkin, G., Pretnar, M.: A logic for algebraic effects. In: Proc. LICS 2008. IEEE Press, Los Alamitos (2008)
Plotkin, G., Pretnar, M.: Handlers of algebraic effects. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 80–94. Springer, Heidelberg (2009)
Plotkin, G.D., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, p. 342. Springer, Heidelberg (2002)
Plotkin, G.D., Power, J.: Algebraic operations and generic effects. Appl. Categ. Structures 11(1), 69–94 (2003)
Power, J., Thielecke, H.: Closed freyd- and κ-categories. In: Wiedermann, J., Van Emde Boas, P., Nielsen, M. (eds.) ICALP 1999. LNCS, vol. 1644, p. 625. Springer, Heidelberg (1999)
Power, A.J., Shkaravska, O.: From comodels to coalgebras: State and arrays. In: Proc. CMCS 2004. Electr. Notes Theor. Comput. Sci., vol. 106, pp. 297–314. Elsevier, Amsterdam (2004)
Power, J.: Generic models for computational effects. Theoret. Comput. Sci. 364(2), 254–269 (2006)
Power, J., Robinson, E.: Premonoidal categories and notions of computation. Math. Structures Comput. Sci. 7(5), 453–468 (1997)
Scott, D.: Mathematical concepts in programming language semantics. In: Proceedings of the Spring Joint Computer Conference, pp. 225–234. ACM, New York (1972)
Strachey, C.: The varieties of programming language. In: Proc. International Computing Symposium, pp. 222–233. Cini Foundation, Venice (1972); Also Tech. Monograph PRG-10, Univ. Oxford (1973)
Street, R.: The formal theory of monads. J. Pure Appl. Algebra 2(2), 149–168 (1972)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Møgelberg, R.E., Staton, S. (2011). Linearly-Used State in Models of Call-by-Value. In: Corradini, A., Klin, B., Cîrstea, C. (eds) Algebra and Coalgebra in Computer Science. CALCO 2011. Lecture Notes in Computer Science, vol 6859. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22944-2_21
Download citation
DOI: https://doi.org/10.1007/978-3-642-22944-2_21
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22943-5
Online ISBN: 978-3-642-22944-2
eBook Packages: Computer ScienceComputer Science (R0)