A calculus of module systems

被引:42
作者
Ancona, D [1 ]
Zucca, E [1 ]
机构
[1] Dipartimento Informat & Sci Informaz, I-16146 Genoa, Italy
关键词
D O I
10.1017/S0956796801004257
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present CMS, a simple and powerful calculus of modules supporting mutual recursion and higher order features, which can be instantiated over an arbitrary core calculus satisfying standard assumptions. The calculus allows expression of a large variety of existing mechanisms for combining software components, including parameterized modules similar to ML functors, extension with overriding as in object-oriented programming, mixin modules and extra-linguistic mechanisms like those provided by a linker. Hence CMS can be used as a paradigmatic calculus for modular languages, in the same spirit the lambda calculus is used for functional programming. We first present an untyped version of the calculus and then a type system; we prove confluence, progress, and subject reduction properties. Then, we define a derived calculus of mixin modules directly in terms of CMS and show how to encode other primitive calculi into CMS (the lambda calculus and the Abadi-Cardelli object calculus). Finally, we consider the problem of introducing a subtype relation for module types.
引用
收藏
页码:91 / 132
页数:42
相关论文
共 44 条
[31]  
HARPER R, 1994, ACM S PRINC PROGR LA, P127
[32]  
HIRSCHOWITZ T, 2000, MODULES MIXINS TYPAG
[33]  
KLOP JW, 1993, CSR9362 CWI
[34]  
KLOP JW, 1987, B EATCS, V32, P143
[35]  
Leroy X., 2000, Journal of Functional Programming, V10, P269, DOI 10.1017/S0956796800003683
[36]  
LEROY X, 1994, ACM S PRINC PROGR LA, P109
[37]  
Machkasova E, 2000, LECT NOTES COMPUT SC, V1782, P260
[38]  
Milner Robin, 1990, The Definition of Standard ML
[39]  
Reddy U. S., 1988, Proceedings of the 1988 ACM Conference on LISP and Functional Programming, P289, DOI 10.1145/62678.62721
[40]  
RIECKE JG, 1999, IN PRESS THEORY PRAC