Integration of Triple Graph Grammars and Constraints - Hildebrandt, Stephan; Lambers, Leen; Becker, Basil; Giese, Holger (Electronic Communications of the EASST, 2012)
Metamodels are often augmented with additional constraints that must be satisfied by valid instances of these metamodels. Such constraints express complex conditions that cannot be expressed in the metamodel itself. Model transformations have to take such constraints of the source and target metamodels into account. Given a valid source model, which satisfies the source constraints, a model transformation is expected to return a valid target model (forward validity). However, in current model transformation definition and tool support, such an integration with source and target constraints including validation mechanisms is often ignored or not satisfactory yet. In this paper, we describe how the integration with source and target constraints can be achieved for the special case of model transformations defined by Triple Graph Grammars (TGGs). First, we extend the relational model transformation definition for TGGs and integrate it with source and target constraints. Moreover, we describe how forward/backward validity of TGGs with constraints can be automatically checked, either by static analysis using an invariant checker, or by generating and validating metamodel instances. Finally, we describe how to integrate constraints into our TGG-based model transformation implementation and automatic conformance testing framework.