Triple graph grammars are a technique for defining corre- spondences between dierent kinds of models. Triple graph grammars can even be used for implementing translations and maintaining consistency between two models. But the- se implementations work only for automatically generated models. Therefore, the transformations cannot be applied to third-party models. In this paper, we discuss this problem and ideas for its solution. from Fu- jaba's implementation, this implementation does not work anymore. In this paper, we present an idea for applying TGG trans- formations to models that have not been generated from the meta model underlying the TGG rules. Rather, we would li- ke to use any (Java) implementation of the model. We call these models in-memory models. In order to apply a TGG translation to such in-memory models, there must be a map- ping which defines how the constructs of the meta model, its classes, its attributes, and its associations are implemented. Though it would be a worthwhile task to develop a frame- work for defining such mappings in the most general way, we propose a simple technique to start with, which can be extended in the future. The idea is quite simple: The map- ping is implemented by a class with a particular interface. This interface requires methods, which map arbitrary ob- jects from the implementation to the corresponding class of the meta model. And it requires methods that, for a given object, provides all links corresponding to an association of the meta model. Moreover, this class must provide methods for generating objects and links in the implementation. With this additional mapper class it is easy to translate models by a TGG interpreter. In fact, there are two mapper classes: one for the source and one for the target meta model. The ideas of this paper were inspired by a project and tool called Component Tools. For understanding this back- ground, we will briefly discuss this project in Sect. 2. Then, we will rephrase the concept of TGGs in Sect. 3. The co- re ideas and implementation techniques for an in-memory TGG transformation will be discussed in Sect. 4.
[1]
Axel Uhl,et al.
Model-Driven Architecture
,
2002,
OOIS Workshops.
[2]
Terrence W. Pratt,et al.
Pair Grammars, Graph Languages and String-to-Graph Translations
,
1971,
J. Comput. Syst. Sci..
[3]
Christian Wagner,et al.
Component Tools: A vision of a tool
,
2004
.
[4]
Andy Schürr,et al.
Specification of Graph Translators with Triple Graph Grammars
,
1994,
WG.
[5]
Krzysztof Czarnecki,et al.
Classification of Model Transformation Approaches
,
2003
.
[6]
Andy Schürr,et al.
PROGRES , A Visual Language and Environment for PROgramming with Graph REwriting Systems 1
,
1994
.
[7]
Grzegorz Rozenberg,et al.
Handbook of Graph Grammars and Computing by Graph Transformations, Volume 1: Foundations
,
1997
.