Skip to main content

A category-theoretic account of program modules

  • Conference paper
  • First Online:
Category Theory and Computer Science

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 389))

Abstract

The type-theoretic explanation of modules proposed to date (for programming languages like ML) is unsatisfactory, in that it fails to reflect the distinction between compile-time, when type-expressions are evaluated, and run-time, when value-expressions are evaluated. This paper proposes a new explanation based on “programming languages as indexed categories” and illustrates, as an application, how ML should be extended to support higher order modules. The paper also outlines a methodology for a modular approach to programming languages, where programming languages (of a certain kind) are identified with objects in a 2-category and features are viewed as 2-categorical notions.

(on leave from Università di Pisa)

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Benabou. Fibred categories and the foundation of naive category theory. Journal of Symbolic Logic, 50, 1985.

    Google Scholar 

  2. K. Bruce, A. Meyer, and J. Mitchell. The semantics of second order polymorphic lambda calculus. Information and Comutation, 73(2/3), 1988.

    Google Scholar 

  3. J. Cartmell. Generalized Algebraic Theories and Contextual Categories. PhD thesis, University of Oxford, 1978.

    Google Scholar 

  4. L. Cardelli. Phase distinction in type theory. Draft 4/1/88, DEC SRC, 1988.

    Google Scholar 

  5. T. Erhard. A categorical semantics of constructions. In 3rd LICS Conf. IEEE, 1988.

    Google Scholar 

  6. R. Harper and J. Mitchell. The essence of ML. In 15th POPL. ACM, 1988.

    Google Scholar 

  7. R. Harper, D. MacQueen, and R. Milner. Standard ML. Technical Report ECS-LFCS-86-2, Edinburgh Univ., Dept. of Comp. Sci., 1986.

    Google Scholar 

  8. R. Harper, R. Milner, and M. Tofte. The semantics standard ML. Technical Report ECS-LFCS-87-36, Edinburgh Univ., Dept. of Comp. Sci., 1987.

    Google Scholar 

  9. J.M.E. Hyland and A.M. Pitts. The theory of constructions: Categorical semantics and topos-theoretic models. In Proc. AMS Conf. on Categories in Comp. Sci. and Logic (Boulder 1987), 1987.

    Google Scholar 

  10. G.M. Kelly. Basic Concepts of Enriched Category Theory. Cambridge University Press, 1982.

    Google Scholar 

  11. S. MacLane. Categories for the Working Mathematician. Springer Verlag, 1971.

    Google Scholar 

  12. D. MacQueen. Modules for standard ML. Polymorphism, 2, 1985.

    Google Scholar 

  13. D. MacQueen. Using dependent types to express modular structures. In 13th POPL. ACM, 1986.

    Google Scholar 

  14. E. Moggi. The cartesian closed category of signatures and functors and its description in Martin-Löf type theory. Manuscript, Bell Laboratories, 1986.

    Google Scholar 

  15. E. Moggi. Computational lambda-calculus and monads. In 4th LICS Conf. IEEE, 1989.

    Google Scholar 

  16. J.C. Mitchell and G.D. Plotkin. Abstract types have existential type. ACM Trans. on Progr. Lang. and Sys., 10(3), 1988.

    Google Scholar 

  17. R. Pare and D. Schumacher. Abstract families and the adjoint functor theorems. In P.T. Johnstone and R. Pare, editors, Indexed Categories and their Applications, volume 661 of Lecture Notes in Mathematics. Springer Verlag, 1978.

    Google Scholar 

  18. R.A.G. Seely. Hyperdoctrines, natural deduction and the beck condition. Zeitschr. f. math. Logik und Grundlagen d. Math., 29, 1983.

    Google Scholar 

  19. R.A.G. Seely. Locally cartesian closed categories and type theory. Math. Proc. Camb. Phil. Soc., 95, 1984.

    Google Scholar 

  20. R.A.G. Seely. Categorical semantics for higher order polymorphic lambda calculus. Journal of Symbolic Logic, 52(2), 1987.

    Google Scholar 

  21. R. Street. The formal theory of monads. Journal of Pure and Applied Algebra, 2, 1972.

    Google Scholar 

  22. P. Taylor. Recursive Domains, Indexed Category Theory and Polymorphism. PhD thesis, University of Cambridge, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

David H. Pitt David E. Rydeheard Peter Dybjer Andrew M. Pitts Axel Poigné

Rights and permissions

Reprints and permissions

Copyright information

© 1989 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Moggi, E. (1989). A category-theoretic account of program modules. In: Pitt, D.H., Rydeheard, D.E., Dybjer, P., Pitts, A.M., Poigné, A. (eds) Category Theory and Computer Science. Lecture Notes in Computer Science, vol 389. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0018347

Download citation

  • DOI: https://doi.org/10.1007/BFb0018347

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-51662-0

  • Online ISBN: 978-3-540-46740-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics