A Lisp through the Looking Glass (original) (raw)

This thesis presents a new architecture for programming language interpreters, in which interpreters are not only first-class values, but are also arranged in a tower of meta-circular interpretation which is accessible reflectively---so that a program may modify elements of the meta-circular tower under which it runs, and thus cause changes in the manner of its own interpretation.

To facilitate such modification, we develop a representation for interpreters that splits each interpreter into a language (a collection of independently implemented constructs) and an evaluator (connecting the constructs together).

To implement such a mutable infinite meta-circular interpreter, we need another interpreter outside the tower, the meta-evaluator. We present this, along with a systematic way of linking it to the meta-circular tower. We show that a further form of meta-circularity may be introduced by bringing the meta-evaluator into the reflectively accessible part of the system; and that this may be repeated without limit, using the same techniques.

These techniques for meta-interpretation are then shown to be similar to the ``language and evaluator'' model for interpretation, and a concise version of the system is presented that uses common code for many of these functions.

Provision for reflective and mixed language facilities pervade the infrastructure of the system. We show that despite all this power, it is possible to implement such a system efficiently---well within an order of magnitude of the performance of a single-language non-reflective system---and we show how a wide range of languages may be implemented on this infrastructure, which also allows transparent mixed-language programming.