Typed cross-module compilation
- 29 September 1998
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 34 (1) , 141-152
- https://doi.org/10.1145/289423.289436
Abstract
Higher-order modules are very effective in structuring large programs and defining generic, reusable software components. Unfortunately, many compilation techniques for the core languages do not work across the module boundaries. As a result, few optimizing compilers support these module facilities well.This paper exploits the semantic property of ML-style modules to support efficient cross-module compilation. More specifically, we present a type-directed translation of the MacQueen-Tofte higher-order modules into a predicative variant of the polymorphic λ-calculus F. Because modules can be compiled in the same way as ordinary polymorphic functions, standard type-based optimizations such as representation analysis immediately carry over to the module languages.We further show that the full-transparency property of the MacQueen-Tofte system yields a near optimal cross-module compilation framework. By propagating various static information through the module boundaries, many static program analyses for the core languages can be extended to work across higher-order modules.Keywords
This publication has 21 references indexed in Scilit:
- Lambda-splittingPublished by Association for Computing Machinery (ACM) ,1997
- Flexible representation analysisPublished by Association for Computing Machinery (ACM) ,1997
- A syntactic theory of type generativity and sharingJournal of Functional Programming, 1996
- TILPublished by Association for Computing Machinery (ACM) ,1996
- Typed closure conversionPublished by Association for Computing Machinery (ACM) ,1996
- Applicative functors and fully transparent higher-order modulesPublished by Association for Computing Machinery (ACM) ,1995
- Compiling polymorphism using intensional type analysisPublished by Association for Computing Machinery (ACM) ,1995
- On the type structure of standard MLACM Transactions on Programming Languages and Systems, 1993
- Using dependent types to express modular structurePublished by Association for Computing Machinery (ACM) ,1986
- Towards a theory of type structureLecture Notes in Computer Science, 1974