@article{Grobauer_Yang_1999, title={The Second Futamura Projection for Type-Directed Partial Evaluation}, volume={6}, url={https://tidsskrift.dk/brics/article/view/20109}, DOI={10.7146/brics.v6i40.20109}, abstractNote={A generating extension of a program specializes it with respect to<br />some specified part of the input. A generating extension of a program<br />can be formed trivially by applying a partial evaluator to the program;<br />the second Futamura projection describes the automatic generation<br />of non-trivial generating extensions by applying a partial evaluator to<br />itself with respect to the programs.<br />We derive an ML implementation of the second Futamura projection<br /> for Type-Directed Partial Evaluation (TDPE). Due to the differences<br /> between `traditional’, syntax-directed partial evaluation and<br />TDPE, this derivation involves several conceptual and technical steps.<br />These include a suitable formulation of the second Futamura projection<br /> and techniques for making TDPE amenable to self-application. In<br />the context of the second Futamura projection, we also compare and<br />relate TDPE with conventional offline partial evaluation.<br />We demonstrate our technique with several examples, including<br />compiler generation for Tiny, a prototypical imperative language.}, number={40}, journal={BRICS Report Series}, author={Grobauer, Bernd and Yang, Zhe}, year={1999}, month={Dec.} }