The second Futamura projection for type-directed partial evaluation

  • Authors:
  • Bernd Grobauer;Zhe Yang

  • Affiliations:
  • Ny Munkegade, Building 540, 8000 Aarhus C, Denmark and BRICS(Basic Research in Computer Science) Centre ofthe Danish National Research Foundation, Department of Computer Science, University of Aar ...;Department of Computer Science, New York University, 5251 Mercer Street, New York, NY

  • Venue:
  • PEPM '00 Proceedings of the 2000 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

The second Futamura projection describes the automatic generation of non-trivial generating extensions by applying a partial evaluator to itself. 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 using TDPE to specialize type-indexed programs. 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.