Partial Evaluation is Fuller Laziness


Partial evaluation of a program p with respect to partial input data s produces a residual program r. If the program r is subsequently run a number of times on values rl~, there is a potentiti overall gain in efficiency since the static computations are performed only once, namely when the residual program ris generated. In a fully lazy language, a partial function application which is subsequently applied several times yields much of the same sharing. In a lazy lauguage the result of a partial application may be thought of as a “residual graph”. This “residual graph” is not as efficient as a residual program produced by traditional partial evaluators, but simple program transformations can improve the sharing properties of a lazy functional program p to match those obtained by partial evaluation. Since we work in a lazy language and do not generate a residual program we avoid the termination problems suffered by all partial evaluators so far. These results also pave the way for a new class of optimizations of lazy functional programs: namely the binding time transformations employed by users and writers of partial evaluators so far.

DOI: 10.1145/115865.115890

Extracted Key Phrases

1 Figure or Table

Cite this paper

@inproceedings{Holst1991PartialEI, title={Partial Evaluation is Fuller Laziness}, author={Carsten Kehler Holst and Carsten K. Gomard}, booktitle={PEPM}, year={1991} }