A simple reflective interpreter

Procedurally reflective programming languages enable user programs to semantically extend the language itself, by permitting them to run at the level of the language implementation with access to their context. The reflective tower, first introduced by Brian Smith, is the principal architecture for such languages. It is informally described as an infinitely ascending tower of metacircular interpreters, connected by a mechanism that allows programs at one level to run at the next higher level. Various accounts of the reflective tower have been published, including a metacircular definition, operational definitions, and denotational definitions. We present an operational account of the main aspects of the reflective tower, which we claim is simpler than previous accounts. Our approach is to implement a finite tower where each level literally runs the level directly below it. A complete Scheme implementation is included.