Partial evaluation aims at improving programs by specializing them w.r.t. part of their input data. In general, however, the effectiveness of the partial evaluation process is hard to measure, even a posteriori. Recent approaches have introduced experimental (often computationally expensive) frameworks for this purpose. In this paper, we present an alternative, symbolic approach for predicting the effectiveness of partial evaluation by combining a trace analysis with a termination analysis. The termination analysis (namely, a size-change analysis) is used to determine which procedures are potentially removable by partial evaluation (i.e., can be fully unfolded at specialization time). Then, the trace analysis helps us to put this information into context by producing a compact representation of the call sequences of the program. By inspecting the output of the combined analysis, the user may determine the impact of a partial evaluation before it is performed.
Available: PDF / BibTeX entry