Towards efficient partial evaluation

Karoline Malmkjær
1993 Proceedings of the 1993 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation - PEPM '93  
In general, a partial evaluator needs to keep track of the tasks that have already been completed or initiated, so that it can recognize when to stop unfolding. In the MIX-style polyvariant specialization algorithm, this is accomplished by a global log. This is a very general technique, so it is not surprising that the algorithm is not particularly efficient. In many special cases a simpler technique would suffice. In this paper, we identify some classes of such special cases by considering the
more » ... purpose of the global log. We outline how a partial evaluator can take advantage of these special cases and we propose analyses to detect them automatically. We discuss examples to illustrate the effect on specialization and to demonstrate that we can even obtain better residual programs. The work presented here is still in its early stages, and we do not have a full system incorporating the proposed improvements. 1 The other potential cause of non-termination in a partial evaluator is infinite unfolding. This can always be changed into infinite residualization, however, by reclassifying the unfolded calls to be residualized.
doi:10.1145/154630.154634 dblp:conf/pepm/Malmkjaer93 fatcat:qfopyzzcbnb27alhd5q2c7js6e