מאיר גולדברג

אקדמי בכיר

Partial evaluation of the Euclidian algorithm

Olivier Danvy, Mayer Goldberg

Some programs are easily amenable to partial evaluation because their control flow clearly depends on one of their parameters. Specializing such programs with respect to this parameter eliminates the associated interpretive overhead. Some other programs, however, do not exhibit this interpreter-like behavior. Each of them presents a challenge for partial evaluation. The Euclidian algorithm is one of them, and in this article, we make it amenable to partial evaluation. We observe that the number of iterations in the Euclidian algorithm is bounded by a number that can be computed given either of the two arguments. We thus rephrase this algorithm using bounded recursion. The resulting program is better suited for automatic unfolding and thus for partial evaluation. Its specialization is efficient.

שפת פרסום אנגלית
דפים 101-111
כתב עת Higher-Order and Symbolic Computation
כרך 10
נושא מספר 2
סטטוס פרסום פורסם - 01.12.1997

Keywords

Partial evaluation
Scientific computation

ASJC Scopus subject areas

Software
Computer Science Applications
קבצים וקישורים אחרים
Link to publication in Scopus