skip to main content
article

A modular module system

Published: 01 May 2000 Publication History

Abstract

A simple implementation of an SML-like module system is presented as a module parameterized by a base language and its type-checker. This implementation is useful both as a detailed tutorial on the Harper–Lillibridge–Leroy module system and its implementation, and as a constructive demonstration of the applicability of that module system to a wide range of programming languages.

References

[1]
Ancona, D. and Zucca, E. (1998) A theory of mixin modules: Basic and derived operators. Mathematical Structures in Computer Sci. 8(4), 401-446.
[2]
Ancona, D. and Zucca, E. (1999) A primitive calculus for module systems. In: Nadathur, G. (editor), PPDP'99 - International conference on Principles and Practice of Declarative Programming: Lecture Notes in Computer Science, 1702, pp. 62-79. Springer-Verlag.
[3]
Bracha, G. (1992) The programming language Jigsaw: Mixins, modularity and multiple inheritance . PhD thesis, University of Utah.
[4]
Cardelli, L. (1987) Basic polymorphic typechecking. Science of Computer Programming, 8(2), 147-172.
[5]
Cardelli, L. (1988) Structural subtyping and the notion of power type. 15th Symposium on the Principles of Programming Languages, pp. 70-79. ACM Press.
[6]
Cardelli, L. (1989) Typeful programming. In: Neuhold, E. J. and Paul, M. (editors), Formal Description of Programming Concepts, pp. 431-507. Springer-Verlag.
[7]
Cardelli, L. (1990) The Quest implementation. Software and documentation available on ftp://gatekeeper.dec.com/pub/DEC/Quest.
[8]
Cardelli, L. (1997) Program fragments, linking, and modularization. 24th Symposium on the Principles of Programming Languages, pp. 266-277. ACM Press.
[9]
Courant, J. (1997a) An applicative module calculus. In: Bidoit, M. and Dauchet, M. (editors), TAPSOFT '97: Theory and Practice of Software Development: Lecture Notes in Computer Science, 1214, pp. 622-636. Springer-Verlag.
[10]
Courant, J. (1997b) A module calculus for Pure Type Systems. Typed Lambda Calculi and Applications 97: Lecture Notes in Computer Science, 1210, pp. 112-128. Springer-Verlag.
[11]
Crary, K., Harper, R. and Puri, S. (1999) What is a recursive module? Programming Language Design and Implementation, pp. 50-63. ACM Press.
[12]
Crégut, P. and MacQueen, D. B. (1994) An implementation of higher-order functors. Proc. 1994 Workshop on ML and its Applications, pp. 13-21. (Rapport de recherche 2265, INRIA, France.).
[13]
Curtis, P. and Rauen, J. (1990) A module system for Scheme. Lisp and Functional Programming, pp. 13-19. ACM Press.
[14]
Duggan, D. and Sourelis, C. (1996) Mixin modules. International Conference on Functional Programming, pp. 262-273. ACM Press.
[15]
Elsman, M. (1999) Program modules, separate compilation, and intermodule optimisation. PhD thesis, Department of Computer Science, University of Copenhagen.
[16]
Fisher, K. and Reppy, J. H. (1999) The design of a class mechanism for Moby. Programming Language Design and Implementation, pp. 37-49. ACM Press.
[17]
Flatt, M. and Felleisen, M. (1998) Units: cool modules for HOT languages. Programming Language Design and Implementation, pp. 236-248. ACM Press.
[18]
Glew, N. and Morrisett, G. (1999) Type-safe linking and modular assembly language. 26th Symposium on the Principles of Programming Languages, pp. 250-261. ACM Press.
[19]
Guttag, J. V. and Horning, J. J. (1993) Larch: languages and tools for formal specification. Springer-Verlag.
[20]
Harper, R. and Lillibridge, M. (1994) A type-theoretic approach to higher-order modules with sharing. 21st Symposium on the Principles of Programming Languages, pp. 123-137. ACM Press.
[21]
Harper, R. and Stone, C. (1998) A type-theoretic interpretation of Standard ML. In: Plotkin, G., Stirling, C. and Tofte, M. (editors), Robin Milner Festschrifft. MIT Press. (Available as technical report CMU-CS-97-147, Carnegie Mellon University.).
[22]
Harper, R., Mitchell, J. C. and Moggi, E. (1990) Higher-order modules and the phase distinction. 17th Symposium on the Principles of Programming Languages, pp. 341-354. ACM Press.
[23]
Leroy, X. (1992) Unboxed objects and polymorphic typing. 19th Symposium on the Principles of Programming Languages, pp. 177-188. ACM Press.
[24]
Leroy, X. (1994) Manifest types, modules, and separate compilation. 21st Symposium on the Principles of Programming Languages, pp. 109-122. ACM Press.
[25]
Leroy, X. (1995) Applicative functors and fully transparent higher-order modules. 22nd Symposium Principles of Programming Languages, pp. 142-153. ACM Press.
[26]
Leroy, X. (1996) A syntactic theory of type generativity and sharing. J. Functional Programming , 6(5), 667-698.
[27]
Leroy, X., Vouillon, J. and Doligez, D. (1996) The Objective Caml system. Software and documentation available on the Web, http://caml.inria.fr/ocaml/.
[28]
Lillibridge, M. (1997) Translucent sums: a foundation for higher-order module systems. PhD thesis, School of Computer Science, Carnegie Mellon University.
[29]
MacQueen, D. B. (1986) Modules for Standard ML. In: Harper, R., MacQueen, D. B. and Milner, R. (editors), Standard ML. Technical report ECS LFCS 86-2, University of Edinburgh.
[30]
MacQueen, D. B. (1988). The implementation of Standard ML modules. Lisp and Functional Programming, pp. 212-223. ACM Press.
[31]
MacQueen, D. B. and Tofte, M. (1994) A semantics for higher-order functors. In: Sannella, D. (editor), Programming languages and systems - ESOP '94: Lecture Notes in Computer Science, 788, pp. 409-423. Springer-Verlag.
[32]
Mauny, M. and de Rauglaudre, D. (1994) A complete and realistic implementation of quotations in ML. Proc. 1994 Workshop on ML and its Applications, pp. 70-78. (Research report 2265, INRIA, France.).
[33]
Milner, R., Tofte, M., Harper, R. and MacQueen, D. (1997) The Definition of Standard ML (revised). The MIT Press.
[34]
Nelson, G. (editor) (1991) Systems Programming in Modula-3. Prentice-Hall.
[35]
Nowak, D., Talpin, J.-P., Gautier, T. and Le Guernic, P. (1997) An ML-like module system for the synchronous language Signal. Euro. Conference on Parallel Processing (Euro-Par'97): Lecture Notes in Computer Science, 1300, pp. 1244-1253. Springer-Verlag.
[36]
Parnas, D. L. (1972) On the criteria to be used in decomposing systems into modules. Comm. ACM, 15(12), 1053-1058.
[37]
Peyton-Jones, S. L. (1987) The Implementation of Functional Programming Languages. Prentice-Hall.
[38]
Peyton-Jones, S. L. and Launchbury, J. (1991) Unboxed values as first-class citizens in a nonstrict functional language. Functional Programming Languages and Computer Architecture: Lecture Notes in Computer Science, 523, pp. 636-666. Springer-Verlag.
[39]
Rémy, D. (1992) Extending ML type system with a sorted equational theory. Research report 1766, INRIA, France.
[40]
Russo, C. V. (1998) Types for modules. PhD thesis, LFCS, University of Edinburgh.
[41]
Sannella, D. T. and Wallen, L. A. (1992) A calculus for the construction of modular Prolog programs. J. Logic Programming, 12, 147-177.
[42]
Sannella, D. and Tarlecki, A. (1991) Extended ML: past, present and future. Technical report ECS-LFCS-91-138, Laboratory for Foundations of Computer Science, University of Edinburgh.
[43]
Tarditi, D., Morrisett, G., Cheng, P., Stone, C., Harper, R. and Lee, P. (1996) TIL: a type-directed optimizing compiler for ML. Programming Language Design and Implementation, pp. 181-192. ACM Press.
[44]
Vouillon, J. (1998) Using modules as classes. Informal Proceedings of the FOOL'5 Workshop.
[45]
Weis, P. and Leroy, X. (1999) Le langage Caml. Dunod.
[46]
Wirsing, M. (1990) Algebraic specifications. In: van Leeuwen, J. (editor), Handbook of Theoretical Computer Science, Vol. B, pp. 675-788. MIT Press/Elsevier.
[47]
Wright, A. K. (1995) Simple imperative polymorphism. Lisp and Symbolic Computation, 8(4), 343-356.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Journal of Functional Programming
Journal of Functional Programming  Volume 10, Issue 3
May 2000
91 pages

Publisher

Cambridge University Press

United States

Publication History

Published: 01 May 2000

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 27 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media