1996 · 169 citations · 36 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxData-flow AnalysisFunctional ProgrammingRecursion TheoryStatic AnalysisType CheckingType SystemsAbstract Syntax ModelingCompiler DesignLambda CalculusLambda Calculus SemanticsNormalizationPartial EvaluationType TheoryTyped Lambda Calculus
"The evaluator operates on closed, monomorphically typable source programs.
We present a strikingly simple partial evaluator, that is type-directed and reifies a compiled program into the text of a residual, specialized program. Our partial evaluator is concise (a few lines) and it handles the flagship examples of offline monovariant partial evaluation. Its source programs are constrained in two ways: they must be closed and monomorphically typable. Thus dynamic free variables need to be factored out in a "dynamic initial environment". Type-directed partial evaluation uses no symbolic evaluation for specialization, and naturally processes static computational effects.Our partial evaluator is the part of an offline partial evaluator that residualizes static values in dynamic contexts. Its restriction to the simply typed lambda-calculus coincides with Berger and Schwichtenberg's "inverse of the evaluation functional" (LICS'91), which is an instance of normalization in a logical setting. As such, type-directed partial evaluation essentially achieves lambda-calculus normalization. We extend it to produce specialized programs that are recursive and that use disjoint sums and computational effects. We also analyze its limitations: foremost, it does not handle inductive types.This paper therefore bridges partial evaluation and λ-calculus normalization through higher-order abstract syntax, and touches upon parametricity, proof theory, and type theory (including subtyping and coercions), compiler optimization, and rut-time code generation (including decompilation). It also offers a simple solution to denotational semantics-based compilation and compiler generation.
36
Notions of computation and monads
Eugenio Moggi · Information and Computation · 1991 · 1.7K citations
The essence of functional programming
Philip Wadler · 1992 · 676 citations · Full text
Jr. Guy L. Steele · DSpace@MIT (Massachusetts Institute of Technology) · 1978 · 404 citations · Full text
Olivier Danvy, Andrzej Filinski · 1990 · 403 citations · Full text