1996 · 209 citations · 30 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxAbstract Syntax TreesCompiler ConstructionControl-flow AnalysisData TypesType CheckingType SystemsClosure ConversionClosuresHigher-order FunctionsPolymorphic Type SystemsPolymorphic TypesProgram TransformationType ConversionType Preservation
Closure conversion is a program transformation used by compilers to separate code from data; previous accounts use only untyped target languages, but recent studies show that translating to typed target languages enables efficient data representations, calling conventions, and tag‑free garbage collection. We present closure conversion as a type‑directed, type‑preserving translation for both the simply‑typed and polymorphic λ‑calculus, facilitating security, debugging, and correctness arguments through automatic type checking and logical relations. Our translations are based on a simple “closures as objects” principle, viewing higher‑order functions as objects with a single method and environment; in the simply‑typed case we use the Pierce‑Turner model of object typing with existential packages, while in the polymorphic case we employ a variant of the Harper‑Lillibridge translucent type formalism to track type sharing.
Closure conversion is a program transformation used by compilers to separate code from data. Previous accounts of closure conversion use only untyped target languages. Recent studies show that translating to typed target languages is a useful methodology for building compilers, because a compiler can use the types to implement efficient data representations, calling conventions, and tag-free garbage collection. Furthermore, type-based translations facilitate security and debugging through automatic type checking, as well as correctness arguments through the method of logical relations.We present closure conversion as a type-directed, and type-preserving translation for both the simply-typed and the polymorphic λ-calculus. Our translations are based on a simple "closures as objects" principle: higher-order functions are viewed as objects consisting of a single method (the code) and a single instance variable (the environment). In the simply-typed case, the Pierce-Turner model of object typing where objects are packages of existential type suffices. In the polymorphic case, more careful tracking of type sharing is required. We exploit a variant of the Harper-Lillibridge "translucent type" formalism to characterize the types of polymorphic closures.
30
Efficient software-based fault isolation
Robert Wahbe, Steven Lucco, Thomas E. Anderson et al. · 1993 · 1.2K citations · Full text
The Mechanical Evaluation of Expressions
P. J. Landin · The Computer Journal · 1964 · 932 citations · Full text
Definitional interpreters for higher-order programming languages
John Reynolds · 1972 · 668 citations
Jr. Guy L. Steele · DSpace@MIT (Massachusetts Institute of Technology) · 1978 · 404 citations · Full text