Reflecting on the metalevel interpreter written in direct style

This paper presents a reflective Scheme system in which user programs are allowed to go up to the metalevel interpreter, access to it, and even modify (parts of) it. Since the metalevel interpreter defines the operational semantics of the baselevel program, the system effectively allows users to modify the semantics of the language. The novel characteristic of the system is that the metalevel interpreter is written in direct style. Conventionally, the metalevel interpreter of a system with a (behavioral) reflective facility has typically been written in continuation passing style (CPS) to make the control structure explicit. In our system, the same information is obtained via delimited continuation constructs: shift and reset, a variant of call/cc. With the help of shift and reset, the metalevel interpreter becomes simpler and easy to understand without sacrificing the reflective abilities.