<!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>Patterns and styles for incremental model transformations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Daniel Varro</string-name>
          <email>varro@mit.bme.hu</email>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Budapest University of Technology and Economics Department of Measurement and Information Systems Magyar tudosok krt.</institution>
          <addr-line>2, Budapest, H-1117</addr-line>
          ,
          <country country="HU">Hungary</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>MTA-BME Lendulet Research Group on Cyber-Physical Systems</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>The usability of code generators in industrial modeling frameworks is frequently hindered by long re-generation time imposed by complex dependencies between di erent modules and chains of code generation phases. Incremental model transformation techniques may improve both scalability and usability by regenerating only speci c design artifacts dependent on a speci c change. In this paper, I provide an overview on di erent styles and levels of incrementality in model transformations of the Viatra open source framework.</p>
      </abstract>
      <kwd-group>
        <kwd>model transformation patterns</kwd>
        <kwd>incremental evaluation</kwd>
        <kwd>reactive programming</kwd>
        <kwd>code generation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        each model change [
        <xref ref-type="bibr" rid="ref10 ref2 ref9">10,9,2</xref>
        ]. Furthermore, in incremental code generators, only
artifacts a ected by a speci c model change will be re-generated while the rest of
the target output is left unaltered. Such techniques have been successfully used
in various design and validation tools for embedded and cyber-physical systems
as reported in [
        <xref ref-type="bibr" rid="ref4 ref5 ref8">4,8,5</xref>
        ]3.
2
      </p>
      <p>Di erent styles of incrementality
The actual level of incrementality in these applications di ers and it can be
netuned for a transformation problem. In our practice, di erent styles and levels
of incrementality could be categorized as follows:
{ No incrementality is a batch transformation re-executed from scratch for
all source models and all changes of these source models.
{ Dirty incrementality is a large-step incrementality approach which is very
common in industrial practice. Here one marks a model to be dirty upon
a source change, and then re-run transformations only on dirty models.
This technique signi cantly reduces the number of regenerated artifacts, but
cleanup after an error and chaining of transformation steps is non- trivial.
{ Incrementality by traceability is a small-step incrementality approach
which relies on the existence of traceability links between source and target
model elements generated during a rst transformation. Missing trace links
are detected and incrementality is achieved by re-executing the
transformations for untraceable elements only. This technique may further reduce the
e ects of a change, but it depends on a smart matcher of traceability links.
{ Reactive source incrementality is also a small-step incrementality
approach where the ring of transformation rules are triggered only by changes
in the source model but not the traceability links between source and target
models. Such approaches may restrict the expressiveness of the
transformation language, but o er improved chaining of incremental transformations.</p>
      <p>
        Sample model transformations illustrating these scenarios are available from
https://github.com/IncQueryLabs/incquery-examples-cps with complete source
code, documentation and performance evaluation using the Viatra framework.
More details on reactive incremental transformations are provided in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
Further challenges. In practice, we nd the complex interactions and chaining
of incremental transformation and code generation steps to be the most
challenging. In this setup, a change in a (front-end) source model may trigger reactions,
which results in changing one or more target models. However, as these model
changes may trigger further reactions along the transformation chain which
require incremental handling themselves - potentially using a di erent style. With
inappropriate tool support, it is surprisingly easy to achieve circular
dependencies between di erent steps where di erent incremental transformations are
executed continuously (e.g. simultaneously running validations and quick xes).
3 And also in https://github.com/IncQueryLabs/EMDW-Common/wiki
Acknowledgments. The author is highly grateful to the entire Viatra
development team, and particularly, Gabor Bergmann, Abel Hegedus, Akos Horvath,
Istvan Rath and Zoltan Ujhelyi for di erent sort of inputs and feedback. This
paper was partially supported by the MONDO Project (EU ICT-611125), the
FP7 ARTEMIS CONCERTO (ART-2012-333053) project and the MTA-BME
Lendulet Research Group on Cyber-Physical Systems.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bergmann</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>David</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , Hegedus,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Horvath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Rath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Ujhelyi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Varro</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Viatra 3: A reactive model transformation platform</article-title>
          .
          <source>In: Theory and Practice of Model Transformations - 8th International Conference</source>
          ,
          <string-name>
            <surname>ICMT</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>LNCS</article-title>
          , vol.
          <volume>9152</volume>
          , pp.
          <volume>101</volume>
          {
          <issue>110</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Cabot</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teniente</surname>
          </string-name>
          , E.:
          <article-title>Incremental integrity checking of UML/OCL conceptual schemas</article-title>
          .
          <source>J. Syst. Softw</source>
          .
          <volume>82</volume>
          (
          <issue>9</issue>
          ),
          <volume>1459</volume>
          {
          <fpage>1478</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Etzlstorfer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kusel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kapsammer</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Langer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Retschitzegger</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schoenboeck</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schwinger</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wimmer</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A survey on incremental model transformation approaches</article-title>
          .
          <source>In: Proceedings of the Workshop on Models and Evolution co-located with MoDELS</source>
          <year>2013</year>
          . CEUR Workshop Proc., vol.
          <volume>1090</volume>
          , pp.
          <volume>4</volume>
          {
          <issue>13</issue>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Horvath</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Hegedus,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Bur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Varro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Starr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.R.</given-names>
            ,
            <surname>Mirachi</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Hardwaresoftware allocation speci cation of ima systems for early simulation</article-title>
          .
          <source>In: Digital Avionics Systems Conference (DASC)</source>
          . IEEE,
          <string-name>
            <surname>Colorado</surname>
            <given-names>Springs</given-names>
          </string-name>
          ,
          <string-name>
            <surname>US</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Horvath</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rath</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          , Hegedus,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Balogh</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Decreasing your co ee consumption with incremental code regeneration</article-title>
          . In: EclipseCon France (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <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,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Gogolla</surname>
          </string-name>
          , M. (eds.)
          <article-title>Theory and Practice of Model Transformations, LNCS</article-title>
          , vol.
          <volume>6142</volume>
          , pp.
          <volume>123</volume>
          {
          <fpage>137</fpage>
          . Springer Berlin Heidelberg (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Kolovos</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rose</surname>
            ,
            <given-names>L.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Matragkas</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paige</surname>
            ,
            <given-names>R.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guerra</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuadrado</surname>
            ,
            <given-names>J.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Lara</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rath</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tisi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabot</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A research roadmap towards achieving scalability in model driven engineering</article-title>
          .
          <source>In: Proceedings of the Workshop on Scalability in Model Driven Engineering</source>
          . pp.
          <volume>2</volume>
          :
          <issue>1</issue>
          {2:
          <fpage>10</fpage>
          . BigMDE '13,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Micskei</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Konnerth</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horvath</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Semerath</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <article-title>Voros, A</article-title>
          .,
          <string-name>
            <surname>Varro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>On open source tools for behavioral modeling and analysis with fuml and alf</article-title>
          .
          <source>In: Proceedings of the 1st Workshop on Open Source Software for Model Driven Engineering (OSS4MDE@MoDELS</source>
          <year>2014</year>
          ).
          <source>CEUR Workshop Proceedings</source>
          , vol.
          <volume>1290</volume>
          , pp.
          <volume>31</volume>
          {
          <issue>41</issue>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Reder</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Egyed</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Incremental consistency checking for complex design rules and larger model changes</article-title>
          .
          <source>In: Model Driven Engineering Languages and Systems, LNCS</source>
          , vol.
          <volume>7590</volume>
          , pp.
          <volume>202</volume>
          {
          <fpage>218</fpage>
          . Springer Berlin Heidelberg (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Ujhelyi</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bergmann</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <article-title>Hegedus, A</article-title>
          .,
          <string-name>
            <surname>Horvath</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Izso</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rath</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Szatmari</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>EMF-IncQuery: An integrated development environment for live model queries</article-title>
          .
          <source>Sci. Comput</source>
          . Program.
          <volume>98</volume>
          ,
          <issue>80</issue>
          {
          <fpage>99</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Varro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bergmann</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <article-title>Hegedus, A</article-title>
          .,
          <string-name>
            <surname>Horvath</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rath</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ujhelyi</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Road to a reactive and incremental model transformation platform</article-title>
          .
          <source>Software and Systems Modeling</source>
          (
          <year>2016</year>
          ), in press
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>