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)
Preview
Unable to display preview. Download preview PDF.
References
J. Benabou. Fibred categories and the foundation of naive category theory. Journal of Symbolic Logic, 50, 1985.
K. Bruce, A. Meyer, and J. Mitchell. The semantics of second order polymorphic lambda calculus. Information and Comutation, 73(2/3), 1988.
J. Cartmell. Generalized Algebraic Theories and Contextual Categories. PhD thesis, University of Oxford, 1978.
L. Cardelli. Phase distinction in type theory. Draft 4/1/88, DEC SRC, 1988.
T. Erhard. A categorical semantics of constructions. In 3rd LICS Conf. IEEE, 1988.
R. Harper and J. Mitchell. The essence of ML. In 15th POPL. ACM, 1988.
R. Harper, D. MacQueen, and R. Milner. Standard ML. Technical Report ECS-LFCS-86-2, Edinburgh Univ., Dept. of Comp. Sci., 1986.
R. Harper, R. Milner, and M. Tofte. The semantics standard ML. Technical Report ECS-LFCS-87-36, Edinburgh Univ., Dept. of Comp. Sci., 1987.
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.
G.M. Kelly. Basic Concepts of Enriched Category Theory. Cambridge University Press, 1982.
S. MacLane. Categories for the Working Mathematician. Springer Verlag, 1971.
D. MacQueen. Modules for standard ML. Polymorphism, 2, 1985.
D. MacQueen. Using dependent types to express modular structures. In 13th POPL. ACM, 1986.
E. Moggi. The cartesian closed category of signatures and functors and its description in Martin-Löf type theory. Manuscript, Bell Laboratories, 1986.
E. Moggi. Computational lambda-calculus and monads. In 4th LICS Conf. IEEE, 1989.
J.C. Mitchell and G.D. Plotkin. Abstract types have existential type. ACM Trans. on Progr. Lang. and Sys., 10(3), 1988.
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.
R.A.G. Seely. Hyperdoctrines, natural deduction and the beck condition. Zeitschr. f. math. Logik und Grundlagen d. Math., 29, 1983.
R.A.G. Seely. Locally cartesian closed categories and type theory. Math. Proc. Camb. Phil. Soc., 95, 1984.
R.A.G. Seely. Categorical semantics for higher order polymorphic lambda calculus. Journal of Symbolic Logic, 52(2), 1987.
R. Street. The formal theory of monads. Journal of Pure and Applied Algebra, 2, 1972.
P. Taylor. Recursive Domains, Indexed Category Theory and Polymorphism. PhD thesis, University of Cambridge, 1987.
Author information
Authors and Affiliations
Editor information
Rights 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