submitted by John Sturdy for the degree of Ph.D. of the University of Bath 1991
`Attention is drawn to the fact that the copyright of this thesis rests with its author. This copy of the thesis has been supplied on condition that anyone who consults it is understood to recognize that its copyright rests with its author and that no quotation from the thesis and no information derived from it may be published without the prior written consent of the author.'
`This thesis may be made available for consultation within the University Library and may be photocopied or lent to other libraries for the purposes of consultation.'
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.
Acknowledgements are due to many:
As a tailpiece, the Escher picture used for the PostScript timing tests is presented here: