Partial Evaluation of an Object-Oriented Imperative Language

The following is the abstract of the thesis with the above title written at DIKU (Department of Computer Science, University of Copenhagen) by Bjarne Steensgaard and Morten Marquard.

Abstract

The development of a fully automatic online partial evaluator for a simple object-oriented imperative language is described. The source language is a language invented for the project. This is to our knowledge the first description of a partial evaluator for an object-oriented imperative language.

Historically online specializers have had problems having good termination properties while generating sufficient specialization. A technique is described, which to some extent solves these problems. An almost identical technique has been developed simultaneously and independently at Stanford University.

Online imperative partial evaluators generate explicators at program points where the program state is generalized during the symbolic computations. Program states are generalized at \eg the entrance of loops with what is known as ``static variables under dynamic control''. Explicators are assignment statements, that perform the assignments, which were at first thought reducible, but have to be performed anyway. A new technique for generating explicators is described. The technique solves the problems connected with variables being enclosed in objects and gives the residual program a more natural structure than one you get using the previously described techniques for generating explicators.

A novel technique for partially unrolling loops during specialization is also described.

Warning

This is a Master's thesis, but the work would be considered Ph.D. work at many American universities. Even though the work was shared between two people, the amount of research didn't leave enough time to do a good write up of the work. The presentation is consequently not something we are very proud of. The language is also a pretty shoddy variant of English. However, the work is interesting, and it was well received. The document itself is 442 pages long, of which 215 pages are appendices (including some code listings to satisfy some semi-formal requirements). If this tirade didn't scare you off, a PostScript version of the thesis is available on Microsoft Research's FTP server (Europeans may want to get the PostScript version at DIKU).


Last modified on May 29, 2002.
Bjarne Steensgaard