Abstract

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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.