Journal of Functional Programming · 1998 · 114 citations · 45 references
ComputingComputer ScienceCompilersProgramming LanguagesSoftware EngineeringAbstract InterpretationAbstract Syntax TreesCompiler ConstructionFunctional ProgrammingType CheckingType SystemsClosure AnalysisCompiler DesignConservative Garbage CollectionHigher-order FunctionsLanguage InteroperabilitySource-level TransformationStrong TypingType Conversion
The system enables source‑level integration of ML‑like functional language code with ANSI C or Ada83 code. It translates functional code into type‑correct, vanilla C or Ada by specializing polymorphism, eliminating higher‑order functions with closure datatypes, and aggressively optimizing the resulting first‑order code while preserving full typing. The generated target code achieves speeds comparable to those of current optimizing ML compilers, despite using a conservative garbage collector.
We describe a system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code. The system works by translating the functional code into type-correct, ‘vanilla’ C or Ada; it offers simple, efficient, type-safe inter-operation between new functional code components and ‘legacy’ third-generation-language components. Our translator represents a novel synthesis of techniques including user-parameterized specification of primitive types and operators; removal of polymorphism by code specialization; removal of higher-order functions using closure datatypes and interpretation; and aggressive optimization of the resulting first-order code, which can be viewed as encoding the result of a closure analysis. Programs remain fully typed at every stage of the translation process, using only simple, standard type systems. Target code runs at speeds comparable to the output of current optimizing ML compilers, even though handicapped by a conservative garbage collector.
45
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Philip Wadler · 1989 · 776 citations
Definitional interpreters for higher-order programming languages
John Reynolds · 1972 · 668 citations
Region-Based Memory Management
Mads Tofte, Jean-Pierre Talpin · Information and Computation · 1997 · 617 citations