Hostname: page-component-848d4c4894-nr4z6 Total loading time: 0 Render date: 2024-04-30T11:03:44.325Z Has data issue: false hasContentIssue false

A category-theoretic account of program modules

Published online by Cambridge University Press:  04 March 2009

Eugenio Moggi
Affiliation:
LFCS, University of Edinburgh, EH9 3JZ Edinburgh, UK

Abstract

The type-theoretic explanation of modules proposed to date (for programming languages like ML) is unsatisfactory, because it does not capture that the evaluation of type-expressions is independent from the evaluation of program expressions. We propose a new explanation based on ‘programming languages as indexed categories’ and illustrate how ML can be extended to support higher order modules, by developing a category-theoretic semantics for a calculus of modules with dependent types. The paper also outlines a methodology, which may lead to a modular approach in the study of programming languages.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1991

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Benabou, J. (1985) Fibred categories and the foundation of naive category theory. J. Symb. Logic 50.CrossRefGoogle Scholar
Berardi, S. (1989) Type dependency and constructive mathematics. PhD thesis, Universitá di Torino.Google Scholar
Cardelli, L. (1988) Phase distinction in type theory. Draft 4/1/88, DEC SRC.Google Scholar
Cartmell, J. (1978) Generalized algebraic theories and contextual categories. PhD thesis, University of Oxford.Google Scholar
Coquand, T. and Huet, G. (1988) The calculus of constructions. Informat. Computat. 73(2/3).Google Scholar
Curien, P.-L. (1989) Alpha-conversion, conditions on variables and categorical logic. Studia Logica 3.Google Scholar
Ehrhard, T. (1988) A categorical semantics of constructions. In: 3rd LICS Conf. IEEE.Google Scholar
Harper, R. and Mitchell, J. (1988). The essence of ML. In 15th POPL. ACM.Google Scholar
Harper, R., MacQueen, D. and Milner, R. (1986) Standard ML. Technical Report ECS-LFCS-86–2, Edinburgh Univ., Dept. of Comp. Sci.Google Scholar
Harper, R., Mitchell, J. and Moggi, E. (1990) Higher-order modules and the phase distinction. In: 17 POPL, ACM.CrossRefGoogle Scholar
Hyland, J. M. E. and Pitts, A. M. (1989) The theory of constructions: Categorical semantics and topos-theoretic models. Contemp. Math. 92.CrossRefGoogle Scholar
Jacobs, B. (1990) Comprehension categories and the semantics of type dependency, June 90, Dept. of Computer Science, Univ. of Nijmegen.Google Scholar
Kelly, G. M. and Street, R. H. (1974) Review of the elements of 2-categories. In: Dold, A. and Eckmann, B., eds, Category Seminar, Springer Lecture Notes in Mathematics 420. Springer Verlag.CrossRefGoogle Scholar
Kock, A. and Reyes, G. E. (1977) Doctrines in categorical logic. In: Barwise, J., ed., Handbook of Mathematical Logic, vol. 90 of Studies in Logic. North-Holland.Google Scholar
MacLane, S. (1971) Categories for the Working Mathematician. Springer Verlag.Google Scholar
MacQueen, D. (1985) Modules for standard ML. Polymorphism 2.Google Scholar
MacQueen, D. (1986) Using dependent types to express modular structures. In: 13th POPL. ACM.CrossRefGoogle Scholar
Milner, R., Tofte, M. and Harper, R. (1990) The Definition of Standard ML. MIT.Google Scholar
Mitchell, J. C. and Plotkin, G. D. (1988) Abstract types have existential type. ACM Trans, on Progr, Lang, and Sys. 10(3).CrossRefGoogle Scholar
Moggi, E. (1989a) A category-theoretic account of program modules. In: Proc. Conf. on Category Theory and Computer Science, Manchester, UK, Sept. 1989, Springer Lecture Notes in Computer Science 389. Springer Verlag.Google Scholar
MacQueen, D. (1989b) Computational lambda-calculus and monads. In: 4th LICS Conf. IEEE.Google Scholar
MacQueen, D. (1990) Notions of computations as monads. Informat. Computat.Google Scholar
Mohring, C. (1989) Extracting Fw’s programs for proofs in the calculus of constructions. In: 16th POPL. ACM.Google Scholar
Pare, R. and Schumacher, D. (1978) Abstract families and the adjoint functor theorems. In: Johnstone, P. T. and Pare, R., eds, Indexed Categories and their Applications, Springer Lecture Notes in Mathematics 661. Springer Verlag.CrossRefGoogle Scholar
Pitts, A. M. (1989) Categorical semantics of dependent types. Talk given at SRI Menlo Park and at the Logic Colloquium in Berlin.Google Scholar
Pitts, A. M. (1990) Categorical logic. In: Abramsky, Samson, Gabbay, Dov M. and Maibaum, Tom S. E., eds, Handbook of Logic in Computer Science, Vol. III, ch. 3.10. Oxford University Press.Google Scholar
Seely, R. A. G. (1983) Hyperdoctrines, natural deduction and the Beck condition. Zeitschr.f math. Logik und Grundlagen d. Math. 29.Google Scholar
Seely, R. A. G. (1984) Locally cartesian closed categories and type theory. Math. Proc. Camb. Phil. Soc. 95.CrossRefGoogle Scholar
Seely, R. A. G. (1987) Categorical semantics for higher order polymorphic lambda calculus. J. Symb. Logic 52(2).CrossRefGoogle Scholar
Street, R. (1972) The formal theory of monads. J. Pure Appl. Algebra 2.CrossRefGoogle Scholar
Street, R. (1973) Fibrations and Yoneda’s lemma in a 2-category. In: Category Seminar, Springer Lecture Notes in Mathematics 420. Springer Verlag.CrossRefGoogle Scholar
Streicher, T. (1988) Correctness and completeness of a semantics of the calculus of constructions with respect to interpretation in doctrines of constructions. PhD thesis, University of Passau.Google Scholar
Taylor, P. (1987) Recursive domains, indexed category theory and polymorphism. PhD thesis, University of Cambridge.Google Scholar