Advertisement

Linearly-Used State in Models of Call-by-Value

  • Rasmus Ejlers Møgelberg
  • Sam Staton
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6859)

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.

Keywords

Operational Semantic Computation Type Algebraic Operation Source Language Typing Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Day, B.: On closed categories of functors. Lect. Notes Math., vol. 137, pp. 1–38. Springer, Heidelberg (1970)Google Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
    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)CrossRefGoogle Scholar
  4. 4.
    Egger, J., Møgelberg, R., Simpson, A.: The enriched effect calculus (2011) (in preparation)Google Scholar
  5. 5.
    Fiore, M.P.: Enrichment and representation theorems for categories of domains and continuous functions (March 1996) (unpublished manuscript)Google Scholar
  6. 6.
    Gordon, R., Power, A.: Enrichment through variation. J. Pure Appl. Algebra 120, 167–185 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Janelidze, G., Kelly, G.: A note on actions of a monoidal category. Theory Appl. of Categ. 9(4), 61–91 (2001)MathSciNetzbMATHGoogle Scholar
  8. 8.
    Kelly, G.M.: Adjunction for enriched categories. Lect. Notes Math., vol. 106, pp. 166–177. Springer, Heidelberg (1969)Google Scholar
  9. 9.
    Kelly, G.M.: Basic Concepts of Enriched Category Theory. Cambridge University Press, Cambridge (1982)zbMATHGoogle Scholar
  10. 10.
    Levy, P.B.: Call By Push Value. Kluwer, Dordrecht (2003)zbMATHGoogle Scholar
  11. 11.
    Levy, P., Power, J., Thielecke, H.: Modelling environments in call-by-value programming languages. Inform. and Comput. 185 (2003)Google Scholar
  12. 12.
    Moggi, E.: Notions of computation and monads. Inform. and Comput. 93, 55–92 (1991)MathSciNetzbMATHCrossRefGoogle Scholar
  13. 13.
    O’Hearn, P.W., Reynolds, J.C.: From Algol to polymorphic linear lambda-calculus. J. ACM 47 (2000)Google Scholar
  14. 14.
    Plotkin, G.: Call-by-name, call-by-value, and the λ-calculus. Theoret. Comp. Sci. 1, 125–159 (1975)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    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)Google Scholar
  16. 16.
    Plotkin, G., Pretnar, M.: A logic for algebraic effects. In: Proc. LICS 2008. IEEE Press, Los Alamitos (2008)Google Scholar
  17. 17.
    Plotkin, G., Pretnar, M.: Handlers of algebraic effects. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 80–94. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  18. 18.
    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)CrossRefGoogle Scholar
  19. 19.
    Plotkin, G.D., Power, J.: Algebraic operations and generic effects. Appl. Categ. Structures 11(1), 69–94 (2003)MathSciNetzbMATHCrossRefGoogle Scholar
  20. 20.
    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)CrossRefGoogle Scholar
  21. 21.
    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)Google Scholar
  22. 22.
    Power, J.: Generic models for computational effects. Theoret. Comput. Sci. 364(2), 254–269 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  23. 23.
    Power, J., Robinson, E.: Premonoidal categories and notions of computation. Math. Structures Comput. Sci. 7(5), 453–468 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  24. 24.
    Scott, D.: Mathematical concepts in programming language semantics. In: Proceedings of the Spring Joint Computer Conference, pp. 225–234. ACM, New York (1972)Google Scholar
  25. 25.
    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)Google Scholar
  26. 26.
    Street, R.: The formal theory of monads. J. Pure Appl. Algebra 2(2), 149–168 (1972)MathSciNetzbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Rasmus Ejlers Møgelberg
    • 1
  • Sam Staton
    • 2
  1. 1.IT University of CopenhagenDenmark
  2. 2.Computer LaboratoryUniversity of CambridgeUK

Personalised recommendations