Building run-time analysis tools by means of pluggable interpreters

Michel Tilman graduated in Mathematics at the Brussels Free University, where he joined the Programming Technology Lab in 1985, doing research on models for concurrent object-oriented systems, on frameworks for groupware applications and configurable application servers, and on pratical applications of reflection. He later applied his experience in commercial settings (SoftCore, Unisys). He has been using Smalltalk for 13 years.

Although most Smalltalk implementations offer the developer powerful reflective facilities, putting this functionality to good use often requires a deeper understanding of the internal workings of the Smalltalk 'engine'. When we implement a Smalltalk interpreter in Smalltalk itself (which is fairly simple) and apply it selectively on a per method basis (using method wrappers), we get a flexible basis for building different types of analysis tools in a easy-to-understand way. Examples are fine-grained tools to keep track of dynamic typing information, method activations and variable accesses. We present an overview of the interpreter, its implementation and how it is used to build browsers for viewing method coverage and run-time type information.