My PhD work

Where and when

I did my PhD at the School of Mathematical Sciences of the University of Bath, starting in 1985. I switched from full-time to part-time in 1988, and re-wrote the lot. I submitted in 1989, and had to resubmit, which I did in 1991, successfully.

What it was about

In a nutshell: multi-dimensional reflective tower evaluation in a mixed-language system.

For the detail, read my thesis (also available as PDF). But to keep you going for now, here's the 264-word summary, as seen in the Bath University Library.

Summary

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.

Perhaps a better way to summarize it is to quote the most central pieces of the implementation (the text like [this] is labels for reference from the surrounding text in the write-up).

(def-unclosure boojum (thing level selector env-selector)
  "Parameterized evaluator kernel for mixed languages."
  (funcall (lookup (funcall selector thing)
                   (funcall env-selector level))
           thing level))

(defun snark (thing
              level         selector
              env-selector  shadow-selector
              cont)
  "Parameterized meta-tower evaluator kernel for mixed languages."
  (funcall (lookup (lookup (funcall selector
                                    thing)
                           (funcall env-selector
                                    level))
                   (funcall shadow-selector
                            level))
           thing level cont))

(defun evaluate-anything (anything background-level)
  "Evaluate ANYTHING in the context of LEVEL."
  (let* ((cont (level-current-closure background-level))
         (evaluator (closure-evaluator cont)))
    (if (not (eq (closure-original evaluator)
                 (tower-standard-evaluator-closure
                            (level-tower background-level))))
        (let ((evaluator-interpretation-level
[non-shadowed-eval] (make-interpretation-level
                      background-level
                   evaluator)))
         (evaluate-anything evaluator-interpretation-level
                            evaluator-interpretation-level))
[shadowed-eval]
      (snark anything
             background-level
             #'type-of
             #'level-type-evaluators-function
             #'level-type-shadow-map-function
             cont))))

My supervisor was Dr. Julian Padget and further advice came from Prof. Capt. James Davenport.

Amongst my avocations while there was writing some microcode to generate Mandelbrots on the Orion-1 user-microcodable computers.

What's happened in reflection since then

Reflection was subsequently taken up, in a very weak form, for JavaBeans, and now it's beginning to appear more, such as in Metaj.

More significantly, reflection has been combined with other advances in programming language technology, such as partial evaluation -- see Optimizing Reflective Languages by Using Partial Evaluation (earlier suggested by Olivier Danvy in Across the Bridge between Reflection and Partial Evaluation).

The Tunes project is developing a reflective operating system.

I am now doing some research (in my own time!) based on my PhD work, with a view to publication.

Advice about being a research student.

This now has a page of its own.

Other research interests

I am naturally inquisitive, and continue to have a variety of research interests.


[PhD] [Research]
John C. G. Sturdy
[John's home] Last modified: Thu Mar 15 10:45:32 GMT 2007