From interpreter to compiler: a representational derivation
on Programs as data objects
Partial evaluation applied to numerical computation
LFP '90 Proceedings of the 1990 ACM conference on LISP and functional programming
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
Tutorial notes on partial evaluation
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Resource-bounded partial evaluation
ACM Computing Surveys (CSUR)
Revised report on the algorithmic language scheme
ACM SIGPLAN Lisp Pointers
Essentials of Programming Languages
Essentials of Programming Languages
Higher-Order and Symbolic Computation
Partial Evaluation of the Euclidean Algorithm, Revisited
Higher-Order and Symbolic Computation
Hi-index | 0.00 |
Some programs are easily amenable to partial evaluation because theircontrol flow clearly depends on one of their parameters. Specializingsuch programs with respect to this parameter eliminates theassociated interpretive overhead. Some other programs, however, donot exhibit this interpreter-like behavior. Each of them presents achallenge for partial evaluation. The Euclidian algorithm is one ofthem, and in this article, we make it amenable to partialevaluation.We observe that the number of iterations in theEuclidian algorithm is bounded by a number that can be computed giveneither of the two arguments. We thus rephrase this algorithm usingbounded recursion. The resulting program is better suited forautomatic unfolding and thus for partial evaluation. Itsspecialization is efficient.