Information Technology Reference
In-Depth Information
transformation languages was to have control on the call graph
of transformation rules; thus, we could manipulate it when
required.Imperativelanguagesarealsoeasiertolearnbymost
of practitioners who are familiar with OOP; this makes their
adoption faster than that of declarative languages.
3.4.2. Model transformation patterns
Transformation rules are written in terms of the source
and target metamodels. It means that models are transformed
following transformation patterns defined in terms of
metaconcepts of the source and target metamodels. Figure 3.9
presents an example to illustrate this characteristic of model
transformation rules. In the example, Class elements are
transformed into Table elements using a transformation rule
that is written in terms of the metaconcepts Class and Table .
Figure 3.9. Example of a model transformation pattern
This characteristic of transformation rules implies that
several transformation rules are written when model
elements that conform to the same metaconcept are
transformed following several (different) transformation
patterns. For example, we can write a transformation
rule ClassToPersistentClass to transform elements that
conform to the Class metaconcept from Figure 3.1 into
elements that conform to the Class metaconcept from
Figure 3.7, which has a boolean property isPersistent .
ClassToPersistentClass transforms any source Class
Search WWH ::




Custom Search