MetaJ home page
Generic protocol-based OO metaprogramming
(Joint work by
Rémi Douence and
Mario Südholt.)
Virtually all protocol-based OO metaprogramming systems are ad hoc in
the sense that they reify only a smaller-or-bigger subset of the
underlying run-time system. This is in contrast to a basic premise of
a general notion of computational reflection: the meta-level reifies
the (i.e. all of the) base system. More general reflective systems -
such as Smalltalk's reified run-time system - give up the protocol
structure: developping well-structured meta-level applications is much
harder in this case.
The goal of the MetaJ project is the development of a generic
protocol-based self-applicative interpreter for Java. The basic
idea is to develop a generic reification procedure which can be used
to reify any class of the interpreter. We expect such an
interpreter to provide the following benefits:
- Well-defined semantics. The semantics of meta-level
entities can be derived directly from the semantics of the
corresponding base-level entity.
- Well-defined metaprogramming protocol. Since a uniform
reification procedure is used, the base-level
entity can be interpreted as defining implicitly the protocol used
to access it from the corresponding meta-level entity.
- Well-defined multi-level meta system. A uniform
treatment of multi-level meta-systems similar to Lisp-like
systems, such as 3-Lisp, for OO languages.
- Performance optimization. A uniform reification
procedure should be amenable particularly well to
performance optimization using program specialization techniques.
Currently, we have defined a reification scheme and we have built a
reflective interpreter from a non-reflective interpreter for an
essential subset of Java.
Download MetaJ
A definition of the generic scheme and a brief
discussion of the (current state of) the implementation can be found
in the following articles:
- R. Douence, M. Südholt:
"A generic reification technique for
object-oriented reflective languages"
in: "Higher-Order and Symbolic Computation", 14(1),
Kluwer Academic Publishers, to appear, 2001
preprint version
- R. Douence, M. Südholt:
"Une technique générique de réification pour les langages à
objets", 6th International Maghrebian Conference on Computer
Science, November 2000
- R. Douence, M. Südholt:
"The next 700 reflective object-oriented languages",
École des mines de Nantes, technical report, no. 99-1-INFO,
1999
last updated on 31 March 2005
by Mario Südholt