Feature-based survey of model transformation approaches
(2006)

Concrete Figure 5 Features of the body of a domain: (A) patterns and (B) logic Language Paradigm Value Specification Element Creation Implicit Explicit Logic Constraint Object-Oriented Functional Procedural Logic Value Binding Imperative Assignment IBM SYSTEMS JOURNAL, VOL 45, NO 3, 2006 CZARNECKI AND HELSEN 629 operating on one model from the parts operating on other models. For example, classical rewrite rules have an LHS operating on the source model and an RHS operating on the target model. In other approaches, such as a rule implemented as a Java program, there might not be any such syntactic distinction. Multidirectionality Multidirectionality refers to the ability to execute a rule in different directions (see Figure 4A). Rules supporting multidirectionality are usually defined over in/out-domains. Multidirectional rules are available in MTF and QVT Relations. Application condition Transformation rules in some approaches may have an application condition (see Figure 4A) that must be true in order for the rule to be executed. An example is the when-clause in QVT Relations (Example 1). Intermediate structure The execution of a rule may require the creation of some additional intermediate structures (see Figure 4A) which are not part of the models being transformed. These structures are often temporary and require their own metamodel. A particular example of intermediate structures are traceability links. In contrast to other intermediate structures, traceability links are usually persisted. Even if traceability links are not persisted, some approaches, such as AGG and VIATRA, rely on them to prevent multiple ‘‘firings’’ of a rule for the same input element. Parameterization The simplest kind of parameterization is the use of control parameters that allow passing values as control flags (Figure 7). Control parameters are useful for implementing policies. For example, a transformation from class models to relational schemas could have a control parameter specifying which of the alternative patterns of object-relational mapping should be used in a given execution. 7 Generics allow passing data types, including model element types, as parameters. Generics can help make transformation rules more reusable. Generic transformations have been described by Varró and Pataricza. 17 Finally, higher-order rules take other rules as parameters and may provide even higher levels of reuse and abstraction. Stratego 64 is an example of a term rewriting language for program transformation supporting higher-order rules. We are currently not aware of any model transformation approaches with a first class support for higherorder rules. Reflection and aspects Some authors advocate the support for reflection and aspects (Figure 4) in transformation languages. Reflection is supported in ATL by allowing reflective access to transformation rules during the execution of transformations. An aspect-oriented extension of MTL was proposed by Silaghi et al. 65 Reflection and aspects can be used to express concerns that crosscut several rules, such as custom traceability management policies. 66 Rule application control: Location determination A rule needs to be applied to a specific location within its source scope. As there may be more than one match for a rule within a given source scope, we need a strategy for determining the application locations (Figure 8A). The strategy could be deterministic, nondeterministic, or interactive. For example, a deterministic strategy could exploit some standard traversal strategy (such as depth first) over the containment hierarchy in the source. Stratego 64 is an example of a term rewriting language with a rich mechanism for expressing traversal in tree structures. Examples of nondeterministic strategies include one-point application, where a rule is applied to one nondeterministically selected location, and concurrent application, where one rule is Figure 6 Typing Untyped Syntactically Typed Semantically Typed Typing Figure 7 Parameterization Control Parameters Generics Higher-Order Rules Parameterization CZARNECKI AND HELSEN IBM SYSTEMS JOURNAL, VOL 45, NO 3, 2006 630 Figure 8 Model transformation approach features: (A) location determination, (B) rule scheduling, (C) rule organization, (D) source-target relationship, (E) incrementality, (F) directionality, and (G) tracing Concurrent One-Point Non-Deterministic Deterministic Interactive Rule Application Strategy A