Compilation Strategies as Objects

In this paper we present an overview of the metaobject protocol approach to compilation. We take the position that object orientation in a compiler can be put to e ective use in opening up the compiler for modi cation by the user. Interestingly, the natural scopes of e ect of user intervention don't respect syntactic boundaries, so we require objects that are not just elements of the abstract syntax tree. We introduce a new kind of intermediate object for the process of compilation so that user modi cation of compilation strategies can be carried out in a coherent manner. We give some examples of user customizations, and outline the architecture of our Scheme compiler based on these principles.