skip to main content
research-article

Universal properties of impure programming languages

Published:23 January 2013Publication History
Skip Abstract Section

Abstract

We investigate impure, call-by-value programming languages. Our first language only has variables and let-binding. Its equational theory is a variant of Lambek's theory of multicategories that omits the commutativity axiom.

We demonstrate that type constructions for impure languages --- products, sums and functions --- can be characterized by universal properties in the setting of 'premulticategories', multicategories where the commutativity law may fail. This leads us to new, universal characterizations of two earlier equational theories of impure programming languages: the premonoidal categories of Power and Robinson, and the monad-based models of Moggi. Our analysis thus puts these earlier abstract ideas on a canonical foundation, bringing them to a new, syntactic level.

References

  1. M. Abadi, L. Cardelli, P.-L. Curien, and J.-J. Levy. Explicit substitutions. J. Funct. Program., 1(4):375--416, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  2. T. Altenkirch, J. Chapman, and T. Uustalu. Monads need not be endofunctors. In FOSSACS'10, pages 297--311, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. Atkey. What is a categorical model of arrows? In Proc. MSFP'08, pages 19--37, 2011.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. N. Benton and P. Wadler. Linear logic, monads and the lambda calculus. In Proc. LICS'96, pages 420--431, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Burroni. T-categories (categories dans un triple). Cahiers Topologie Geom. Differentielle, 12(3):215--312, 1971.Google ScholarGoogle Scholar
  6. A. Burroni. Higher dimensional word problem. In Proc. CTCS'91, pages 94--105, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P.-L. Curien. Operads, clones, and distributive laws. In Operads and Universal Algebra, 2010.Google ScholarGoogle Scholar
  8. J. Egger, R. E. Møgelberg, and A. Simpson. Enriching an effect calculus with linear types. In Proc. CSL'09, pages 240--254, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. P. Fiore. Semantic analysis of normalisation by evaluation for typed lambda calculus. In Proc. PPDP'02, pages 26--37, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan, A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In Proc. PLDI'93, pages 237--247, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. F. Foltz, C. Lair, and G. M. Kelly. Algebraic categories with few monoidal biclosed structures or none. J. Pure and Applied Algebra, 17:171--177, 1980.Google ScholarGoogle ScholarCross RefCross Ref
  12. C. Führmann. Direct models of the computational lambda-calculus. In Proc. MFPS XV, pages 147--172, 1999.Google ScholarGoogle ScholarCross RefCross Ref
  13. H. Herbelin. A lambda-calculus structure isomorphic to Gentzen-style sequent calculus structure. In Proc. CSL'94, pages 61--75, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Hermida. Representable multicategories. Advances in Mathematics, 151:164--225, 2000.Google ScholarGoogle ScholarCross RefCross Ref
  15. M. Hyland. Multicategories in and around algebra and logic. Invited talk, TACL'09. Slides available from the author's home page, 2009.Google ScholarGoogle Scholar
  16. B. Jacobs. Semantics of weakening and contraction. Annals of Pure and Applied Logic, 69(1):73--106, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  17. B. Jacobs and I. Hasuo. Freyd is Kleisli, for arrows. In Proc. MSFP'06, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Jeffrey. Premonoidal categories and a graphical view of programs. Unpublished, 1997.Google ScholarGoogle Scholar
  19. A. Kock. Monads on symmetric monoidal closed categories. Archiv der Math., 21:1--10, 1970.Google ScholarGoogle ScholarCross RefCross Ref
  20. Y. Lafont. Towards an algebraic theory of Boolean circuits. J. Pure Appl. Algebra, 184(2-3):257--310, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  21. J. Lambek. Deductive systems and categories II. In Category theory, homology theory and their applications, volume 86 of LNM, pages 76--122. Springer, 1969.Google ScholarGoogle Scholar
  22. T. Leinster. Higher operads, higher categories. CUP, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  23. P. B. Levy. Call-by-push-value. Springer, 2004.Google ScholarGoogle Scholar
  24. P. B. Levy, J. Power, and H. Thielecke. Modelling environments in call-by-value programming languages. Inform. Comput., 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. F. Linton. Autonomous equational categories. Indiana Univ. Math. J., 15:637--642, 1966.Google ScholarGoogle ScholarCross RefCross Ref
  26. G. McCusker. A fully abstract relational model of syntactic control of interference. In Proc. CSL'02, pages 247--261, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Melli`es and N. Tabareau. Linear continuations and duality. hal.archives-ouvertes.fr/hal-00339156, 2008.Google ScholarGoogle Scholar
  28. R. E. Møgelberg and S. Staton. Linearly-used state in models of callby-value. In CALCO'11, pages 298--313, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. E. Moggi. Computational lambda-calculus and monads. In LICS'89, pages 14--23, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. E. Moggi. Notions of computation and monads. Inform. Comput., 93 (1), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. P. W. O'Hearn. On bunched typing. J. Funct. Program., 13(4):747--796, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Power. Premonoidal categories as categories with algebraic structure. Theor. Comput. Sci., 278(1-2):303--321, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. Power and E. Robinson. Premonoidal categories and notions of computation. Math. Struct. Comput. Sci., 7(5):453--468, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. Power and H. Thielecke. Closed Freyd- and kappa-categories. In Proc. ICALP'99, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. U. S. Reddy. Global state considered unnecessary: An introduction to object-based semantics. Lisp and Symbolic Computation, 9(1):7--76, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  36. J. G. Stell. Modelling term rewriting systems by sesqui-categories. Technical Report TR94-02, Keele University, 1994.Google ScholarGoogle Scholar

Index Terms

  1. Universal properties of impure programming languages

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 48, Issue 1
        POPL '13
        January 2013
        561 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2480359
        Issue’s Table of Contents
        • cover image ACM Conferences
          POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
          January 2013
          586 pages
          ISBN:9781450318327
          DOI:10.1145/2429069

        Copyright © 2013 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 23 January 2013

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!