Trace Analysis for Predicting the Effectiveness of Partial Evaluation

Germán Vidal

24th International Conference on Logic Programming (ICLP 2008), pp. 790-794, Springer LNCS 5366, 2008.
See also the associated extended version.
© Springer-Verlag

The main goal of partial evaluation is program specialization. Essentially, given a program and part of its input data (the so called static data) a partial evaluator returns a new, residual program which is specialized for the given data. An appropriate residual program for executing the remaining computations (those that depend on the so called dynamic data) is thus the output of the partial evaluator. Despite the fact that the main goal of partial evaluation is improving program efficiency (i.e., producing faster programs), there are very few approaches devoted to formally analyze the effects of partial evaluation, either a priori (prediction) or a posteriori. Recent approaches have considered experimental frameworks for estimating the best division (roughly speaking, a classification of program parameters into static or dynamic), so that the optimal choice is followed when specializing the source program. Here, we introduce an alternative, symbolic approach for predicting the potential effects of partial evaluation (which is, in principle, computationally less expensive). Basically, we first generate a finite representation that safely describes all possible call traces (i.e., sequences of predicate calls) for a given program. Then, we analyze how this finite representation would change by a particular partial evaluation. By comparing the original and the transformed representations, one may in some cases predict the effects of running the partial evaluator.

Available: PDF / Slides / Poster / BibTeX entry


Germán Vidal