The Oberon-2 Reflection Model and its Applications
Hanspeter Mössenböck, Christoph Steindl
We describe the reflection model of Oberon-2, a language in the tradition of Pascal and Modula-2. It provides run-time information about the structure of variables, types and procedures and allows the programmer to manipulate the values of variables. The special aspect of the Oberon-2 reflection model is that metainformation is not obtained via metaclasses. It is rather organized as structured sequences of elements stored on a disk, which can be enumerated by an iterator. This results in a simple and uniform access mechanism and keeps the memory overhead to a minimum. We also show a number of challenging applications that have been implemented with this reflection model.
Paper at the Reflection'99,
St. Malo, France, July 19-21, 1999. LNCS 1616, Springer, pp. 40-53