Reflection in a Statically Typed and Object Oriented Language - A Meta-Level Interface for BETA

Søren Brandt
Department of Computer Science
University of Aarhus
DK-8000 Aarhus C, Denmark
email: sbrandt@cs.au.dk

Abstract

This technical report is concerned with issues of type safe and type orthogonal computational reflection in a statically typed, object oriented, and block structured programming language. The main new contributions is the design of a comprehensive meta-level interface for a statically typed language, the introduction of more flexible typing constraints for BETA than currently possible, and the description of a novel language construct, the attribute reference.

The BETA type system is made more flexible through a generalisation of the qualification concept, adding considerably to the expressive power of BETA, but without adding new syntax. Existing BETA already includes types as first-class values, through the concept of dynamic pattern references. With the advent of attribute references, attributes are turned into first-class language citizens as well, allowing type-safe computed attribute access. On top of the generalised qualification concept and the concept of attribute references, a comprehensive meta-level interface to the BETA language is described, along with a number of example uses. Finally, a meta-level architecture enabling the practical implementation of the MLI for a statically typed language is outlined.

Click here to retrieve the whole document in PostScript (100 pages, 328Kb).


BibTex cite:

@TechReport{BETAMLI,
author = "S. Brandt",
title = "{R}eflection in a {S}tatically {T}yped and {O}bjec {O}riented {L}anguage --- {A} {M}eta-{L}evel {I}nterface for {BETA}",
institution = "Department of Computer Science, University of Aarhus",
month = "July",
year = "1995"
}


René W. Schmidt <rws@cs.au.dk>