Results 1 -
2 of
2
Reflection in Oberon
- Proc. of the Joint Modular Languages Conference
, 1997
"... . We introduce metaprogramming facilities into the Oberon V4 system. Metaprogramming means that a module can access the structure of other modules (i.e., procedures, types, run-time data) at run time. We discuss how type safety can be enforced in an environment with strong typing. Finally we show ho ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
. We introduce metaprogramming facilities into the Oberon V4 system. Metaprogramming means that a module can access the structure of other modules (i.e., procedures, types, run-time data) at run time. We discuss how type safety can be enforced in an environment with strong typing. Finally we show how metaprogramming can be used to implement an easy-to-use database interface and conclude with a comparison with other metaprogramming systems for statically-typed programming languages. 1 Introduction In programs we distinguish between the data level and the program level. Variables are at the data level and can be accessed by the statements of a program. Modules, types and procedures are at the program level. They serve to structure a program but they are usually not viewed as data. Sometimes, however, programs want to inspect the components of other programs at the program level, for example, in order to answer the following questions: 1. What are the field names of a record type T decla...
The Oberon-2 Reflection Model and its Applications
- In Proceedings of the Second International Conference on Metalevel Architectures and Reflection
, 1999
"... Abstract. 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 refl ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. 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. 1.

