首页    期刊浏览 2024年12月14日 星期六
登录注册

文章基本信息

  • 标题:Partial Evaluation of the Euclidian Algorithm (Extended Version)
  • 本地全文:下载
  • 作者:Olivier Danvy ; Mayer Goldberg
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:1997
  • 卷号:4
  • 期号:1
  • 出版社:Aarhus University
  • 摘要: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. Keywords: partial evaluation, scientific computation.
国家哲学社会科学文献中心版权所有