Automatic JIT Compiler Generation with Runtime Partial Evaluation
Carl Friedrich Bolz, Volker Aurich, Michaël Leuschel
Abstract
Carl Friedrich Bolz, Volker Aurich, Michaël Leuschel
Abstract
Dynamic languages are enjoying increasing popularity recently, due to their power, simplicity and flexibility. However, since many popular dynamic languages are implemented using straightforward interpreters, their performance is not up to par with more static languages. This situation can be improved with just-in-time compilers, but those are hard to implement, hard to maintain and hard to change. Partial evaluation is a technique to make the construction of compilers easier. It can automatically generate a compiler for a certain language, given an interpreter for the same language. Despite considerable apparent promise it has so far failed to make a large impact due to various problems. In addition, it can only be used for ahead-of-time compilation, which does not work well for dynamic languages. In this thesis we explore the use of partial evaluation at runtime for interpreters written in Prolog. For this we wrote a Prolog prototype that performs partial evaluation interleaved with actual program execution. Doing so solves some problems of classical partial evaluation and makes it at the same time applicable to dynamic languages.
OpenAlex reports 2 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
Dynamic languages are enjoying increasing popularity recently, due to their power, simplicity and flexibility. However, since many popular dynamic languages are implemented using straightforward interpreters, their performance is not up to par with more static languages. This situation can be improved with just-in-time compilers, but those are hard to implement, hard to maintain and hard to change. Partial evaluation is a technique to make the construction of compilers easier. It can automatically generate a compiler for a certain language, given an interpreter for the same language. Despite considerable apparent promise it has so far failed to make a large impact due to various problems. In addition, it can only be used for ahead-of-time compilation, which does not work well for dynamic languages. In this thesis we explore the use of partial evaluation at runtime for interpreters written in Prolog. For this we wrote a Prolog prototype that performs partial evaluation interleaved with actual program execution. Doing so solves some problems of classical partial evaluation and makes it at the same time applicable to dynamic languages.
Key concepts: Partial evaluation, Computer science, Programming language, Compiler, Just-in-time compilation, Dynamic compilation, Interpreter, Flexibility (engineering)