Using parameterized signatures to express modular structure

Module systems are a powerful, practical tool for managing the complexity of large software systems. Previous attempts to formulate a type-theoretic foundation for modular programming have been based on existential, dependent, or manifest types. These approaches can be distinguished by their use of different quantifiers to package the operations that a module exports together with appropriate implementation types. In each case, the underlying type theory is simple and elegant, but significant and sometimes complex extensions are needed to account for features that are important in practical systems, such as separate compilation and propagation of type information between modules.This paper presents a simple type-theoretic framework for modular programming using parameterized signatures. The use of quantifiers is treated as a necessary, but independent concern. Using familiar concepts of polymorphism, the resulting module system is easy to understand and admits true separate compilation. It is also very powerful, supporting high-order, polymorphic, and first-class modules without further extension.

[1]  Mark P. Jones,et al.  A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[2]  Mads Tofte,et al.  Principal signatures for higher-order program modules , 1992, POPL '92.

[3]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[4]  Mark P. Jones A system of constructor classes: overloading and implicit higher-order polymorphism , 1993, FPCA '93.

[5]  John C. Mitchell,et al.  An extension of standard ML modules with subtyping and inheritance , 1991, POPL '91.

[6]  Philip Wadler,et al.  The essence of functional programming (Invited talk) , 1997 .

[7]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[8]  Thomas Johnsson,et al.  Lambda Lifting: Treansforming Programs to Recursive Equations , 1985, FPCA.

[9]  Mads Tofte,et al.  A Semantics for Higher-Order Functors , 1994, ESOP.

[10]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[11]  Stefan Kahrs,et al.  First-Class Polymorphism for ML , 1994, ESOP.

[12]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[13]  Andrew W. Appel,et al.  Separate compilation for Standard ML , 1994, PLDI '94.

[14]  Sandip K. Biswas Higher-order functors with transparent signatures , 1995, POPL '95.

[15]  P. Martin-Lof,et al.  Constructive mathematics and computer programming , 1984, Philosophical Transactions of the Royal Society of London. Series A, Mathematical and Physical Sciences.

[16]  Robin Milner,et al.  Definition of standard ML , 1990 .

[17]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[18]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[19]  Mark P. Jones Qualified Types: Theory and Practice , 1994 .

[20]  Luca Cardelli,et al.  Abstract Types and the Dot Notation , 1990, Programming Concepts and Methods.

[21]  David B. MacQueen Using dependent types to express modular structure , 1986, POPL '86.

[22]  Andrew W. Appel,et al.  Smartest recompilation , 1993, POPL '93.

[23]  John C. Mitchell,et al.  Higher-order modules and the phase distinction , 1989, POPL '90.

[24]  Xavier Leroy,et al.  A syntactic theory of type generativity and sharing , 1996, Journal of Functional Programming.

[25]  Simon Peyton Jones,et al.  The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science) , 1987 .

[26]  Per Martin-Löf,et al.  Constructive mathematics and computer programming , 1984 .

[27]  Maria-Virginia Aponte Extending record typing to type parametric modules with sharing , 1993, POPL '93.

[28]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[29]  Eugenio Moggi,et al.  A category-theoretic account of program modules , 1989, Mathematical Structures in Computer Science.

[30]  Xavier Leroy,et al.  Applicative functors and fully transparent higher-order modules , 1995, POPL '95.

[31]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..