Dynamic compilation for reflective programming languages
A reflective programming language allows a program to look at, and modify, the internal details of the interpreter that currently executes that program. This gives a programmer the power to add new language constructs to a programming language that are tailored to a specific problem domain and can then be used to express a solution in a more succinct and direct way. Examples of reflective programming facilities include macros, first-class continuations, first-class environments, metaobject protocols, and so on.
It is known that the more reflective facilities are added to a programming language, the harder it becomes to statically compile programs into efficient code. In fact, depending on what kind of reflection is added, it becomes impossible to compile programs using traditional static compilation techniques [1]. However, modern dynamic compilation techniques, as used in object-oriented languages like Self, Smalltalk and Java, have largely remained unexplored for such reflective programming languages.
The goal of this thesis is to take the interpreter of a “fully” reflective programming language like 3-Lisp [2] and add dynamic compilation to improve the performance of such an interpreter without compromising expressiveness. Especially, recent approaches based on determining hot paths should be taken into account, since they seem straightforward and very effective at the same time [3].
[1] Mitchell Wand, The Theory of Fexprs is Trivial, http://citeseer.ist.psu.edu/context/1978933/49073
[2] http://library.readscheme.org/servlets/search.ss?pattern=Smith+Brian+Cantwell
[3] Andreas Gal, Michael Franz, Christian Probst, HotpathVM: An Effective JIT for Resource-constrained Devices, http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=4746