An Introduction to Reeection-oriented Programming

Most accounts of re ection are in an interpreted framework and tend to assume the availability of particular pieces of the state of a program's interpretation, including the current source code expression. This paper presents a computational account of re ection, drawing a distinction between the meta-level manipulation of data or control and the mere availability of meta-circular implementation details. In particular, this account does not presume the existence of program source code at runtime. The paper introduces a programming paradigm that relies on re ective language features and draws on the power of object-oriented programming. Several examples of the use of these features are provided, along with an explanation of a translation-based implementation. The examples include the measurement of computational expense, the introduction of rst-class continuations, and the modi cation of the semantics of expressed values, all in the framework of re ection-oriented programming.