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

文章基本信息

  • 标题:The Second Futamura Projection for Type-Directed Partial Evaluation
  • 本地全文:下载
  • 作者:Bernd Grobauer ; Zhe Yang
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:1999
  • 卷号:6
  • 期号:40
  • 出版社:Aarhus University
  • 摘要:A generating extension of a program specializes it with respect to some specified part of the input. A generating extension of a program can be formed trivially by applying a partial evaluator to the program; the second Futamura projection describes the automatic generation of non-trivial generating extensions by applying a partial evaluator to itself with respect to the programs. We derive an ML implementation of the second Futamura projection for Type-Directed Partial Evaluation (TDPE). Due to the differences between `traditional', syntax-directed partial evaluation and TDPE, this derivation involves several conceptual and technical steps. These include a suitable formulation of the second Futamura projection and techniques for making TDPE amenable to self-application. In the context of the second Futamura projection, we also compare and relate TDPE with conventional offline partial evaluation. We demonstrate our technique with several examples, including compiler generation for Tiny, a prototypical imperative language.
国家哲学社会科学文献中心版权所有