MetaCartSign in to MyCiteSeer

Include Citations | Advanced Search | Help

Include Citations | Advanced Search | Help

  Re-opening Closures

Download:
Download as a PDF | Download as a PS
unknown authors
http://www.cs.princeton.edu/~appel/papers/reo.ps
Add To MetaCart

Abstract:

There are two different commonly-used evaluation methods for functional languages: normal-order graph reduction, and call-by-value execution of closure code. The former is usually more expensive per operation, but has the capability of partially evaluating functions before they are applied. The latter method usually leads to faster execution--- and is thus used in most compilers--- but can't "optimize " functions before they are called. The different advantages of the two methods are particularly visible in the evaluation of higher-order functions. After a higher-order function is applied to one argument, the graph-reducer can begin evaluation, while the closure-code evaluator must wait until all arguments are present. On the other hand, because the closure-code evaluator executes the native code of the computer, it usually outperforms the graph-reducer. The two evaluation algorithms can be combined to take advantage of the best behaviors of both. Fragments from programs that are already executing can be extracted, reduced, and re-compiled. This is done with an operator, reduce, that is semantically

Citations

259 The Calculi of Lambda-Conversion – Church - 1941
257 The mechanical evaluation of expressions – Landin - 1964
135 Yacc: Yet another compiler compiler – Johnson - 1979
96 Semantics and Pragmatics of the Lambda Calculus – Wadsworth - 1971
7 Control Flow Aspects of Semantics Directed Compiling – Sethi - 1983
6 Semantics-directed code generation – Appel - 1985
5 Rabbit: a compiler for Scheme," AI-TR-474 – Steele - 1978
5 Compile-time Evaluation and Code generation for Semantics-directed Compilers – Appel - 1985