1993 · 66 citations · 17 references
ComputingComputer ScienceCompilersProgramming LanguagesSoftware EngineeringAbstract Syntax TreesCompiler ConstructionData-flow AnalysisSoftware ConstructionType CheckingType SystemsModule TypingSeparate Compilation
In statically typed languages, separate compilation requires a manually specified import interface, and any change to external symbols forces recompilation of the module. This paper proposes an algorithm that automatically infers the minimal import interface for any module in Damas‑Milner type systems such as ML. By compiling each module with its inferred minimal interface, the resulting separate compilation method ensures that a unit is recompiled only when its own implementation changes.
To separately compile a program module in traditional statically-typed languages, one has to manually write down an import interface which explicitly specifies all the external symbols referenced in the module. Whenever the definitions of these external symbols are changed, the module has to be recompiled. In this paper, we present an algorithm which can automatically infer the “minimum” import interface for any module in languages based on the Damas-Milner type discipline (e.g., ML). By “minimum”, we mean that the interface specifies a set of assumptions (for external symbols) that are just enough to make the module type-check and compile. By compiling each module using its “minimum” import interface, we get a separate compilation method that can achieve the following optimal property: A compilation unit never needs to be recompiled unless its own implementation changes.
17
Principal type-schemes for functional programs
Robin Milner · 1982 · 1.1K citations
Report on the programming language Haskell
Paul Hudak, Simon Peyton Jones, Philip Wadler et al. · ACM SIGPLAN Notices · 1992 · 1K citations · Full text
Unboxed objects and polymorphic typing
Xavier Leroy · 1992 · 223 citations · Full text