Abstract
The usual formulation of the Euclidean Algorithm is not well-suited to be specialized with respect to one of its arguments, at least when using offline partial evaluation. This has led Danvy and Goldberg to reformulate it using bounded recursion. In this article, we show how The Trick can be used to obtain a formulation of the Euclidean Algorithm with good binding-time separation. This formulation of the Euclidean Algorithm specializes effectively using standard offline partial evaluation.
Similar content being viewed by others
References
Bentley, J.L. Writing Efficient Programs. Prentice Hall, Englewood Cliffs, NJ, 1982.
Bondorf, A. Similix Manual, System Version 4.0. Technical report. DIKU, University of Copenhagen, Denmark, 1991.
Danvy, O. and Goldberg, M. Partial evaluation of the Euclidian algorithm. Lisp and Symbolic Computation, 10(2):101–111, 1997.
Dybvig, R.K. The Scheme Programming Language. Prentice Hall, Englewood Cliffs, NJ, 1987.
Jones, N.D., Gomard, C.K., and Sestoft, P. Partial Evaluation and Automatic Program Generation. Prentice Hall, New York, 1993.
Kelsey, R., Clinger, W., and Rees, J. (Eds.). Revised5 report on the algorithmic language scheme. Higher-Order and Symbolic Computation, 11(1):7–105, 1998.
Knuth, D.E. The art of computer programming, Fundamental Algorithms. vol. 1, 3rd edition. Addison-Wesley, Reading, MA, 1997.
Lee, C.S. Ph.D. Thesis. Department of Computer Science, University of Western Australia, forthcoming.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Lee, C. Partial Evaluation of the Euclidean Algorithm, Revisited. Higher-Order and Symbolic Computation 12, 203–212 (1999). https://doi.org/10.1023/A:1010004307057
Issue Date:
DOI: https://doi.org/10.1023/A:1010004307057