<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Unified Template for Model Transformation Design Patterns</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Huseyin Ergin</string-name>
          <email>hergin@crimson.ua.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Eugene Syriani</string-name>
          <email>syriani@iro.umontreal.ca</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Unified Template</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Alabama</institution>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Montreal</institution>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Design patterns are of tremendous value to developers when faced with recurring
problems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Given their various applications and uses, model transformations would
benefit tremendously from design patterns as well. Although several studies have proposed
design patterns for model transformation[
        <xref ref-type="bibr" rid="ref2 ref3 ref4 ref5 ref6">2,3,4,5,6</xref>
        ], there is still no accepted common
language to express them.
      </p>
      <p>In this paper, we propose a unified template to describe model transformation design
patterns based on the analysis of existing model transformation design pattern studies.
We have also initiated a unified template candidate that is suitable for the purpose, along
with an actual model transformation design pattern adapted to the unified template.
2.1</p>
      <p>
        Existing templates
Fig. 1 depicts the correspondences between existing proposals for model transformation
design pattern templates and their equivalence with the template used in GoF [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Initial
studies on model transformation design patterns proposed useful idioms that are specific
to model transformation languages: ATL [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], VMTS [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], GReAT [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and QVT-R [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
(corresponding to columns 2 to 5 in Fig. 1). These shall therefore be considered as
implementations of design patterns in a specific language, rather than design pattern
descriptions.
      </p>
      <p>
        More recently, Lano et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] provided the most comprehensive model
transformation design patterns study (column 6 in Fig. 1). The template used by the authors
leads to a thorough description of the patterns. In particular, the benefits and
disadvantage fields are of great value to analyze and help to choose the appropriate pattern. The
most critical is the solution field that explains the structure of the pattern in a
languageneutral form. For this purpose, Lano et al. used an abstract transformation specification
called TSPEC that manipulates an abstraction of the UML, called LMM. Although this
provide a formalization of design patterns, the notation hinders the comprehension of
design patterns, which does not guide developers in correctly implementing the
pattern in a concrete transformation. At about the same time, we proposed a language,
DelTa [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], that is independent from concrete transformation languages, understandable
by developers, and enables the automatic instantiation and detection of the pattern in a
concrete transformation.
      </p>
      <p>Unified template
Summary
Applicationxcondition
Solution
Benefits
Disadvantages
Example
Implementation
Relatedxpatterns</p>
      <p>Bezivin Levendovsky Agrawal Iacob Lano Ergin
Motivation Motivation Motivation GMooatlivation Summary Motivation</p>
      <p>Applicability Applicability Applicability Applicationxconditions Applicability
Solution Structure Structure Specification Solution Structure
Consequences Consequences LBiemnietafittisons DBeisnaedfvitasntages</p>
      <p>Knownxuses Knownxuses Example Applicationxandxexamples IEmxapmlepmleesntation</p>
      <p>Variations
Variations</p>
      <p>Relatedxpatterns</p>
      <p>
        GoF meaning
Intent
Applicability
Structure
Consequences
Knownxuses
Samplexcode
Implementation
Relatedxpatterns
Existing works show that in model transformation area, there is not an agreement how
to represent model transformation design patterns. Different studies have used different
fields to represent a design pattern (i.e., applicability, benefits, structure). In addition,
there is no common language of providing the structure of a model transformation
design pattern, analogous to how UML is used in representing the structures of
objectoriented design patterns. We therefore propose a unified template for expressing model
transformation design patterns using the following fields:
– Summary: a short description of the design pattern that usually gives the outline
of the other fields in a few sentences.
– Application Conditions: pre-conditions on the context of use of the pattern. The
conditions can be either preconditions on the metamodel or constraints in the
transformation overall. This is usually expressed in the same language as the solution
field.
– Solution: generic solution to the problem the design pattern addresses. The
structure of the solution is expressed DelTa [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
– Benefits: advantages of applying the design pattern. The benefits can either be
measurements with respect to some criteria or improvements on some features of
the transformation.
– Disadvantages: pitfalls of applying the design patterns. The disadvantages are
measured similarly to the benefits.
– Examples: example of applying the design pattern in a real context. The example
is implemented in a specific model transformation language.
– Implementation: discussion providing guidelines and hints on how to implement
the design pattern in various transformation languages.
– Related patterns: correlation of the pattern with other patterns. This relation may
be specialization, generalization, sequence, grouping, alternatives, etc.
3
      </p>
    </sec>
    <sec id="sec-2">
      <title>Top-down Phased Construction</title>
      <p>
        We apply the unified template to the Top-down Phased Construction design pattern as
introduced in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. We only present an abbreviated version of the pattern due to page
limitation.
      </p>
      <p>
        – Summary: This pattern separates the transformation into phases depending on how
the target model is composed. The complete summary is found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– Application conditions: As depicted in Fig. 2, when there is a composition
hierarchy in the source metamodel and the sub-element is mandatory in that relation.
      </p>
      <p>src
sSuper</p>
      <p>
        ~src
sSub
– Benefits: This pattern increases the modularity of the rules, letting each rule create
one layer of target elements. The complete list of benefits is found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– Disadvantages: Since the rules are broken into phases, that will increase the rule
count. The complete list of disadvantages is found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– Examples: The UML class diagram to relational database diagrams can be
considered a top-down phased construction, where we first use classes to create tables,
and then use attributes to create columns [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
– Implementation: The model transformation languages with explicit scheduling
can create phases sequentially. The languages, that have implicit scheduling only,
can refer to “simulating explicit rule scheduling” pattern in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– Related patterns: The pattern resembles entity relationship mapping pattern [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ],
when the entities are considered the top layer and relations are the layer below.
There are also variations of this pattern that starts the construction starting from
bottom. Further related patterns are found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
4
      </p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>In this paper, we have summarized the structure of design patterns in terms of how
they are represented in different studies. The need for a unified template approach is
inevitable to make design pattern identification easier for future design pattern
candidates. We believe using a UML-like graphical notation in at least application condition
and structure fields of a design pattern makes the understanding and the application of
the design pattern easier for the developer. The unified template should be discussed
and improved to provide standardization in model transformation design patterns.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-Oriented Software</article-title>
          . Addison Wesley Professional (nov
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Agrawal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Reusable Idioms and Patterns in Graph Transformation Languages</article-title>
          .
          <source>In: International Workshop on Graph-Based Tools. Volume 127 of ENTCS</source>
          .,
          <string-name>
            <surname>Elsevier</surname>
          </string-name>
          (
          <year>2005</year>
          )
          <fpage>181</fpage>
          -
          <lpage>192</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Iacob</surname>
            ,
            <given-names>M.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Steen</surname>
            ,
            <given-names>M.W.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heerink</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Reusable Model Transformation Patterns</article-title>
          . In: EDOC Workshops, IEEE Computer Society (
          <year>September 2008</year>
          )
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bézivin</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jouault</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paliès</surname>
          </string-name>
          , J.:
          <article-title>Towards model transformation design patterns</article-title>
          .
          <source>In: Proceedings of the First European Workshop on Model Transformations (EWMT</source>
          <year>2005</year>
          ).
          <article-title>(</article-title>
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Levendovszky</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lengyel</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meszaros</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Supporting Domain-specific Model Patterns with Metamodeling</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          <volume>8</volume>
          (
          <issue>4</issue>
          ) (
          <year>2009</year>
          )
          <fpage>501</fpage>
          -
          <lpage>520</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lano</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolahdouz Rahimi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Model-Transformation Design Patterns</article-title>
          .
          <source>IEEE Transactions on Software Engineering</source>
          <volume>40</volume>
          (
          <issue>12</issue>
          ) (
          <year>Dec 2014</year>
          )
          <fpage>1224</fpage>
          -
          <lpage>1259</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Ergin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Syriani</surname>
          </string-name>
          , E.:
          <article-title>Towards a Language for Graph-Based Model Transformation Design Patterns</article-title>
          .
          <source>In: Theory and Practice of Model Transformations</source>
          . Volume
          <volume>8568</volume>
          of LNCS., York, Springer (jul
          <year>2014</year>
          )
          <fpage>91</fpage>
          -
          <lpage>105</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Jouault</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tisi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Towards incremental execution of atl transformations</article-title>
          . In Tratt, L.,
          <string-name>
            <surname>Gogolla</surname>
          </string-name>
          , M., eds.
          <source>: Theory and Practice of Model Transformations. Volume 6142 of Lecture Notes in Computer Science</source>
          . Springer Berlin Heidelberg (
          <year>2010</year>
          )
          <fpage>123</fpage>
          -
          <lpage>137</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>