Abstract:
We propose a simple method for polyvariant specialisation of higher-order programs in a way that preserves block structure. The method is based on identifying the log (the "seenbefore " list) as a derivative of the procedure environment. Most contemporary partial evaluators use polyvariant specialisation. Due to scoping problems with the definitions introduced by the partial evaluator, this algorithm cannot preserve blocks in the presence of higher-order values. (The problem is related to the so-called "upwards funarg " problem of Lisp.) Instead, the source program is "lambda-lifted " (transformed into recursive equations) to remove local scope before specialisation--- scoping problems are evaded rather than solved. Lambda-lifting, however, destroys any locality
Citations
| 569 | Structure and Interpretation of Computer Programs – Abelson, Sussman - 1996 |
| 119 | Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Computer Programming 16 – Bondorf, Danvy - 1991 |
| 91 | Automatic autoprojection of higher order recursive equations – Bondorf - 1990 |
| 53 | Efficient Analyses for Realistic Off-Line Partial Evaluation – Bondorf, Jørgensen - 1993 |
| 47 | Partial evaluation of Standard ML – Birkedal, Welinder - 1993 |
| 27 | Hand-writing program generator generators – Birkedal, Welinder - 1994 |

