Florian Latifi,
"Practical second Futamura projection: partial evaluation for high-performance language interpreters"
: SPLASH Companion 2019 Proceedings Companion of the 2019, ACM, New York, Seite(n) 29-31, 10-2019, ISBN: 978-1-4503-6992-3
Original Titel:
Practical second Futamura projection: partial evaluation for high-performance language interpreters
Sprache des Titels:
Englisch
Original Buchtitel:
SPLASH Companion 2019 Proceedings Companion of the 2019
Original Kurzfassung:
Partial evaluation, based on the first Futamura projection, allows compiling language interpreters with given user programs to efficient target programs. GraalVM is an example system that implements this mechanism. It combines partial evaluation with profiling information and dynamic compilation, to transform interpreters into high-performance machine code at run time. However, partial evaluation is compile-time intensive, as it requires the abstract interpretation of interpreter implementations. Thus, optimizing partial evaluation is still subject to research to this day. We present an approach to speed up partial evaluation, by generating source code ahead of time, which performs partial evaluation specific to interpreter implementations. Generated code, when executed for a given user program at run time, directly emits partially evaluated interpreter instructions for language constructs it knows and sees in the program. This yields the target program faster than performing the first Futamura projection. The generated source code behaves similarly to a specialized partial evaluator deduced by performing the second Futamura projection, although no self-applying partial evaluator is involved during code generation.