<!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>Union and Di erence of Models, 10 years later</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ivan Porres</string-name>
          <email>ivan.porres@abo.fi</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Models</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Turku Centre for Computer Science (TUCS) Department of Information Technologies,Abo Akademi University Turku</institution>
          ,
          <country country="FI">Finland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper contains a summary of the talk given by the author on the occasion of the MODELS 2013 most in uential paper award. The talk discussed the original paper as published in 2003, the research work done by others afterwards and the author's personal re ection on the award. Version Control of Software and System</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>There are two main usage scenarios for design models in software and system
development: models as sketches, that serve as a communication aid in informal
discussions, and models as formal artifacts, to be analyzed, transformed into
other artifacts, maintained and evolved during the whole software and system
development process.</p>
      <p>In this second scenario, models are valuable assets that should be kept in
a trusted repository. In a complex development project, these models will be
updated often and concurrently by di erent developers. Therefore, there is a
need for a version control system for models with optimistic locking. This is a
system to compare, merge and store all versions of all models created within a
development project.</p>
      <p>We can illustrate the use of a version control system for models as follows.
Let us assume that the original model shown at the top of Figure 1 is edited
simultaneously by two developers. One developer has decided that the subclass
B is no longer necessary in the model. Simultaneously, the other developer has
decided that class C should have a subclass D. The problem is to combine the
contributions of both developers into a single model. This is the model shown
at the bottom of Fig. 1.</p>
      <p>
        We presented the basic algorithms to solve this problem in the original paper
published in the proceedings of the UML 2003 conference [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The proposed
solution is based on calculating the nal model as the merge of the di erences
between the original and the edited models. Figure 2 shows an example of the
di erence of two models, in this case the di erence between the models edited by
the developers and the original model. The result of the di erence is not always
a model, in a similar way that the di erence between two natural numbers is not
a natural number but a negative one. An example of this is shown in the bottom
Designer 1
A
      </p>
      <p>C</p>
      <p>Original Model
A C
part of Fig. 2. In this case, the di erence of the models contains negative model
elements, i.e., elements that should be removed from a model.</p>
      <p>
        The original UML 2013 paper contains two algorithms to calculate the
difference between two models and to merge a model with a di erence. Given two
models M1 and M2 de ned in UML or another modeling language based on the
Meta Object Facility (MOF) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], we de ne the following operations:
Di erence of two models
Merge of a model and a di erence
      </p>
      <p>M2</p>
      <p>M1 +</p>
      <p>M1 =
= M2</p>
      <p>Once we know how to operate with di erences between two models, we can
solve our original problem by computing the union of two versions of a model
as follows:</p>
      <p>M nal = Moriginal + (M1</p>
    </sec>
    <sec id="sec-2">
      <title>Moriginal) + (M2</title>
    </sec>
    <sec id="sec-3">
      <title>Moriginal)</title>
      <p>Figure 3 shows an example of the application of this operation.</p>
      <p>The de nition of these operations is complicated by the fact that two
developers may have changed the same subset of a model. This is called a con ict and
+</p>
      <p>D
+
- B
=
D
it may prevent us to merge all changes into the nal model. The original paper
also presents an algorithm to resolve some of these con icts automatically.
Automatic con ict resolution is an important component of a version control system
with optimistic locking since it can reduce the need for a cumbersome manual
intervention when merging models.
2</p>
      <sec id="sec-3-1">
        <title>Assumptions and Limitations</title>
        <p>The original paper published in the UML 2003 conference contained many
assumptions and limitations that were tackled by other authors after its
publication.</p>
        <p>
          An important goal of the original paper was to provide algorithms that are
independent of the actual modeling language. This allows us to manage
models in many di erent languages, as long as these languages are de ned using a
MOF-base metamodel. On the other hand, the original algorithms cannot use
information that is speci c to a particular modeling language to improve the
di erence, merge and con ict resolution algorithms. In contrast, other authors
have presented algorithms that are speci c to one particular modeling language.
Examples of this is the work of Nejatil et al., who presented algorithms that are
speci c to match and merge statecharts [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], and Kuster et al., who studied a
similar approach for process models [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
        </p>
        <p>
          Also, an signi cant design decision of the algorithms published originally is
that model comparison is based on matching model elements by identity. The
algorithms assume that each model element has a universally unique identi er
(UUID) that is unique and constant. This is an adequate choice for a version
control system, where the models to compare are two versions of the same original
model. However, it is not a suitable approach to compare two arbitrary models.
Other authors have presented model di erent algorithms that mach elements by
similarity [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], and thus lifted the main assumption present in the original paper.
        </p>
        <p>
          We should note that an important limitation in the original approach is the
assumption that the metamodel describing the modeling language used in the
artifacts to process never changes. This is not a realistic assumption, specially
when using internally developed domain speci c modeling languages. This
problem was tackled by Gruschko et al. who have studied the problem of metamodel
evolution and how to update a model when its underlying metamodel changes [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>
          The original paper did not discuss the representation of model di erences
in any structured format. This problem was studied by other authors that
proposed for well de ned metamodels to represent model di erences. Cicchetti et al
presented a model di erence approach [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] that allows composition of di erences.
Another important topic not discussed in the original paper is how to present
model di erences in a way that is easy to understand by developers. This
problem has been studied by Storrle [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], that proposed to present model di erences
using natural language.
        </p>
        <p>
          Finally, it is worth to mention that while the original paper contains the
key algorithms for a version control system for software models, it does not
actually present an implementation of the algorithms into a working system.
Other authors have implemented model management tools such as DSMDi [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]
and EMF Compare 1 that can be used by practitioners in actual development
projects.
3
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Most In uential Paper Award</title>
        <p>The original paper published in the UML 2003 conference was selected for the
10 years most in uential paper award presented during the MODELS 2013
conference. As a researcher, I consider that achieving long lasting impact among
academics and practitioners is the ultimate goal of our work. Therefore, I
believe that the reader may be interested in my own personal re ections about the
award and the context that made the paper become in uential to many other
works.</p>
        <p>I consider that one of the main reasons for the high impact of the original
paper is that is was published timely. The modeling community was then focusing
in the MDE research agenda and there was a clear need for this kind of work. The
original paper presented the basic algorithms for a version control system, but
it also described, sometimes implicitly, many other related problems to be solve.
Another important factor that helped the paper to become highly in uential is
that it was published at the right venue. In 2003, the participants of the UML
conference were the right audience for this work, who quickly extended and
improved it.</p>
        <p>I think it is interesting to discuss what would be the outcome of the original
paper if it had been submitted to a high quality conference such as MODELS
in the year 2013. This is just my personal speculation, but I consider that the
original paper would not have performed that well in the selection process of
a contemporary conference. Currently, the program committee of conferences
expect an extensive evaluation and validation of the research contributions
presented in research papers, something that is actually missing from the original
paper. I have the opinion that the requirement for the inclusion of an extensive
validation helps to improve the quality of the published papers, but may be
detrimental for the quick dissemination of novel ideals, as the ones contained in
the original UML 2003 paper.</p>
        <p>
          To conclude, I consider that ten years later the research on model
comparison and versioning is not completed yet. For those interested in this problem,
1 http://www.eclipse.org/emf/compare/
Altmanninger et al. have published a plea for more research work in this area
and a concrete research agenda [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>Acknowledgments</title>
        <p>I would like to thank and acknowledge the work of Dr. Marcus Alanen, co-author
and main contributor of the original paper \Di erence and Unions of Models",
published in the UML 2003 Conference.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Marcus</given-names>
            <surname>Alanen</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ivan</given-names>
            <surname>Porres</surname>
          </string-name>
          .
          <article-title>Di erence and union of models</article-title>
          . In Perdita Stevens, Jon Whittle, and Grady Booch, editors,
          <source>UML</source>
          , volume
          <volume>2863</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>2</fpage>
          <lpage>{</lpage>
          17. Springer,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Kerstin</given-names>
            <surname>Altmanninger</surname>
          </string-name>
          , Petra Kaufmann, Gerti Kappel, Philip Langer, Martina Seidl, Konrad Wieland, and
          <string-name>
            <given-names>Manuel</given-names>
            <surname>Wimmer</surname>
          </string-name>
          .
          <article-title>Why model versioning research is needed!? an experience report</article-title>
          .
          <source>In Proceedings of the Joint MoDSE-MC-CM 2009 Workshop</source>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Antonio Cicchetti, Davide Di Ruscio, and
          <string-name>
            <given-names>Alfonso</given-names>
            <surname>Pierantonio</surname>
          </string-name>
          .
          <article-title>A metamodel independent approach to di erence representation</article-title>
          .
          <source>Journal of Object Technology</source>
          ,
          <volume>6</volume>
          (
          <issue>9</issue>
          ):
          <volume>165</volume>
          {
          <fpage>185</fpage>
          ,
          <year>October 2007</year>
          .
          <source>TOOLS EUROPE</source>
          <year>2007</year>
          | Objects, Models, Components, Patterns.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Boris</given-names>
            <surname>Gruschko</surname>
          </string-name>
          , Dimitrios Kolovos, and Richard Paige.
          <article-title>Towards synchronizing models with evolving metamodels</article-title>
          .
          <source>In In Proc. Int. Workshop on Model-Driven Software Evolution held with the ECSMR</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Udo</given-names>
            <surname>Kelter</surname>
          </string-name>
          ,
          <article-title>Jurgen Wehren, and Jorg Niere. A generic di erence algorithm for uml models</article-title>
          . In Peter Liggesmeyer, Klaus Pohl, and Michael Goedicke, editors,
          <source>Software Engineering</source>
          , volume
          <volume>64</volume>
          <source>of LNI</source>
          , pages
          <volume>105</volume>
          {
          <fpage>116</fpage>
          .
          <string-name>
            <surname>GI</surname>
          </string-name>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Jochen</given-names>
            <surname>Malte</surname>
          </string-name>
          <article-title>Kuster, Christian Gerth, Alexander Forster, and Gregor Engels. Detecting and resolving process model di erences in the absence of a change log</article-title>
          . In Marlon Dumas, Manfred Reichert, and Ming-Chien Shan, editors,
          <source>BPM</source>
          , volume
          <volume>5240</volume>
          of Lecture Notes in Computer Science, pages
          <volume>244</volume>
          {
          <fpage>260</fpage>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Yuehua</given-names>
            <surname>Lin</surname>
          </string-name>
          , Je
          <string-name>
            <surname>Gray</surname>
            , and
            <given-names>Frederic</given-names>
          </string-name>
          <string-name>
            <surname>Jouault</surname>
          </string-name>
          .
          <article-title>Dsmdi : a di erentiation tool for domain-speci c models</article-title>
          .
          <source>European Journal of Information Systems</source>
          ,
          <volume>16</volume>
          (
          <issue>4</issue>
          ):
          <volume>349</volume>
          {
          <fpage>361</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Shiva</given-names>
            <surname>Nejati</surname>
          </string-name>
          , Mehrdad Sabetzadeh, Marsha Chechik, Steve Easterbrook, and
          <string-name>
            <given-names>Pamela</given-names>
            <surname>Zave</surname>
          </string-name>
          .
          <article-title>Matching and merging of statecharts speci cations</article-title>
          .
          <source>In Proceedings of the 29th international conference on Software Engineering</source>
          , ICSE '
          <volume>07</volume>
          , pages
          <fpage>54</fpage>
          {
          <fpage>64</fpage>
          , Washington, DC, USA,
          <year>2007</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. OMG.
          <article-title>Meta Object Facility (MOF) Core Speci cation</article-title>
          .
          <source>Document formal/2013- 06-01</source>
          . Available at: http://www.omg.org/.
          <source>Last visited on cCtober</source>
          <year>2013</year>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Harald</surname>
          </string-name>
          <article-title>Storrle. Making sense to modelers: Presenting uml class model di erences in prose</article-title>
          .
          <source>In MODELSWARD 2013 - Proceedings of the 1st International Conference on Model-Driven Engineering and Software Development</source>
          , pages
          <volume>39</volume>
          {
          <fpage>48</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>