<!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>MMINT: A Graphical Tool for Interactive Model Management</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessio Di Sandro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Rick Salay Michalis Famelis Sahar Kokaly</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Type Support Runtime (Model</institution>
          ,
          <addr-line>Relationship, Transformation) EMF GMF OCL Eclipse</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>-Model Management addresses the accidental complexity caused by the proliferation of models in software engineering. It provides a high-level view in which entire models and their relationships (i.e., mappings between models) can be manipulated using transformations, such as match and merge, to implement management tasks. Other model management frameworks focus on support for the programming required to prepare for model management activities at the expense of the user environment needed to facilitate these activities. In this paper, we demonstrate MMINT- a model management tool that provides a graphical and interactive environment for model management. MMINT has many features that help manage complexity while reducing effort in carrying out model management tasks. We illustrate these features with a realistic model management scenario. (See video at: http://youtu.be/7B7YuV-Jvrc)</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. MOTIVATION AND GOALS</title>
      <p>
        Modern software development requires managing
multiple, heterogeneous software artifacts, but the proliferation
of models creates an accidental complexity that must be
managed. Model Management [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] addresses this challenge.
This is realized through the use of special models called
megamodels [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] to represent model management scenarios at a
high level of abstraction and general purpose transformations
(also called operators) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] to manipulate models and their
relationships (i.e., mappings between models) in order to
perform useful tasks. For example, a model match operator
finds correspondences between two models and packages these
as a mapping between the models. A merge operator can be
used to combine the content of the two models using the
correspondence information in the mapping.
      </p>
      <p>
        Several model management frameworks have been
developed to support Model Driven Engineering (MDE) by
facilitating the development of operators and the implementation
of specific model management tasks. For example, Epsilon [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
provides multiple domain-specific languages, each specialized
for a different model management task such as merge,
validation, transformation, etc. The Atlas suite of tools [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is
centred around the ATL transformation language and its use in
different model management tasks. These frameworks focus on
the programming required to prepare for model management
rather than the user environment required to carry out model
management tasks. However, such an environment is a key
factor for practical model management.
      </p>
      <p>An effective user environment requires a rich interactive
user interface and automated user assistance. We elaborate
on these in the context of model management:</p>
      <p>Interactive User Interface - Megamodels provide the
means for raising the level of abstraction to manage
complexity in model management, thus they are the
natural user interface for model management. Furthermore,
the user should be able to interact with the type level
where model types (i.e., metamodels), relationship types
and transformations are defined as well at the instance
level where particular model management scenarios are
expressed and carried out. Interactivity is an important
characteristic of the user interface. Due to the complexity
of model management tasks, they often can only be
partially automated. For example, performing a match
between models may need to be manually verified to
ensure the correspondences are sensible, and performing
a merge of models may yield conflicts that need to be
manually resolved using human judgment.</p>
      <p>Automated User Assistance - Many model management
activities are one-off tasks that suggest the need for
low effort rapid implementation, possibly with manual
steps, rather than a polished and fully automated process.
Even activities that become fully automated often initially
require experimentation and exploration to get them right.
User assistance to help adapt transformations for reuse,
support reasoning about models, etc. can reduce effort
and help manage complexity.</p>
      <p>In this paper, we describe our tool called MMINT (“Model
Management INTeractive”) for graphical, interactive model
management. We summarize the features of MMINT
addressing the requirements discussed above.</p>
      <p>Interactive User Interface
– instance level megamodel - MMINT provides a
customizable environment in which modellers can
graphically create model management scenarios
using megamodels at the instance level, interactively
apply transformations and immediately see their
result and, when necessary, manually drill-down into
the detailed content of particular models or
relationships.
– type level megamodel - a megamodel is used at the
type-level to visualize and allow rapid modifications
of the type hierarchy of model types, relationship
types and transformations at run-time to immediately
impact instance level megamodels.</p>
      <p>
        Automated User Assistance
– megamodel operators - the generic operators map,
filter and reduce, available in many programming
languages to simplify complex collection-based
manipulation tasks, are built-in and adapted for use with
megamodels [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– type coercion - a type coercion mechanism is
available that automatically performs the necessary
conversion transformations required to reuse
transformations from related types.
– retyping - a type down-casting mechanism is
available that automatically detects cases when a model
satisfies the constraints of a more specialized type
and thus can use its transformations.
      </p>
      <p>The rest of this paper is organized as follows: In Sec. II
we introduce and illustrate the features of MMINT by
implementing a detailed model management scenario. In Sec. III,
the architecture of MMINT is described. Finally, in Sec. IV,
we conclude with a summary of the paper and a discussion of
future research directions.</p>
    </sec>
    <sec id="sec-2">
      <title>II. USING MMINT FOR MODEL MANAGEMENT In this section, we use a model management scenario to illustrate the MMINT features addressing the requirements for a model management user environment discussed in Sec. I.</title>
      <sec id="sec-2-1">
        <title>A. Illustrative scenario</title>
        <p>Consider the following model management scenario. A
company uses a megamodel to track its modeling artifacts
(models and relationships between them). The company has
determined that having public attributes in class diagrams
is undesirable and now (1) would like to identify all class
diagrams that contain this construct, (2) refactor them using a
predefined transformation to remove the construct, (3) merge
the modified class diagrams with the originals into a single
class diagram, and finally, (4) produce a textual representation
of the merged class diagram.</p>
        <p>We now show how MMINT can be used to accomplish this
scenario. Table I summarizes the MMINT features and the step
of the scenario in which they are illustrated.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. Executing the scenario</title>
        <p>In MMINT a megamodel is referred to as a MID (Model
Interconnection Diagram). MMINT uses a distinguished Type
MID in which model types, relationship types and
transformations are registered. Fig. 1 shows a screenshot of the Type MID
used to implement the scenario. Here, boxes represent model
types and thick blue links between them are binary relationship
types. The sub-typing between types is shown with the
hollowheaded arrows. Transformations are ovals connected to their
input and output types with named links (not shown to avoid
clutter). For example, our scenario needs class diagrams and
so ClassDiagram is a model type that is a sub-type of the
general model type Model. The binary relationship type CDRel
is a used to create mappings between ClassDiagram models.
CDMatch is a transformation that takes two ClassDiagrams
as input and produces a CDRel between them as output that
contains links between classes that have the same name. Note
that even the built-in megamodel operators Filter, Map and
Reduce appear as transformations in the Type MID.</p>
        <p>
          At the instance level, MMINT is used to create MIDs
using a MID editor that allows an engineer to interactively
create or import models, relationships and other MIDs, invoke
transformations on them and inspect or change the results.
We will incrementally and interactively build a MID called
Scenario as we carry out the steps of the scenario. Fig. 2
(top-right) shows a screenshot of the final state of this MID
after step (4). Initially, Scenario contains only the top
leftmost box referring to MID Lib (top-left of Fig. 2) that holds
the class diagrams the company wants to process. We have
limited the the number of CD’s in MID Lib to four for this
illustration; however, the scenario scales well (See [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]).
Step (1). In the first step we need to separate out the class
diagrams in Lib that contain public attributes. We can use
the megamodel operator FilterhTYPEi that, when applied to
a MID, removes all models/relationships that do not conform
to type TYPE (See [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for details); however, we need a
model type that represents class diagrams that contain public
attributes. The Type MID allows an engineer to create new
types and use them immediately. Thus, we use the Type
MID editor to define a new sub-type CDPublicAttributes
of ClassDiagram containing the following OCL
wellformedness constraint:
        </p>
        <p>Similarly, we create sub-type CDNoPublicAttributes
with the negation of this constraint. Both are shown in Fig. 1
as sub-types of ClassDiagram. We then split Lib into new
MIDs Pub (containing CD PowerWindow and ACC) and
NoPub (containing CD Engine and Infotainment)
by applying FilterhCDPublicAttributesi and
FilterhCDNoPublicAttributesi, respectively, to Lib.</p>
        <p>
          This step also illustrates the retyping feature of MMINT.
Even though the class diagrams in Lib are typed as
ClassDiagram, MMINT can check them against a sub-type
(e.g., CDPublicAttributes) and automatically retype them
if they conform. This feature can be invoked manually on any
model by the engineer or internally by other operators – in
this case, Filter. When invoked manually on a model (via
right-clicking and a context menu), MMINT traverses the type
hierarchy to check the model’s conformance with all sub-types
and returns the list of retyping options for selection by the user.
Step (2). In this step, we use a standard class diagram
refactoring transformation, called AddGetters, that replaces each
public attribute with a private attribute and a corresponding
getter method. MMINT allows transformations in any language
to be added to the Type MID. In this case, we have used
Henshin [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] to implement AddGetters. We want to apply
AddGetters to every class diagram in MID Pub. We can
achieve this by using the megamodel operator MaphMAPPERi
that applies a transformation given by parameter MAPPER to
each model/relationship in a MID (See [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for details). In this
case, we apply MaphAddGettersi to Pub to produce MID
RefPub containing the refactored class diagrams. We then
use the built-in operator Union to produce MID NewLib that
combines the MID RefPub with the class diagrams containing
no public attributes in MID NoPub. Thus, NewLib is the same
as the original MID Lib but with refactored class diagrams.
Step (3). Now we wish to merge the class diagrams in
NewLib into a single class diagram. We have available to
us a class diagram merge transformation CDMerge that takes
two class diagrams and a CDRel relationship between them
indicating how the class diagrams overlap [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. That is, if the
relationship has a link between two classes then CDMerge will
combine these classes into a single class in the output merged
model. Unfortunately, our MID NewLib contains only class
diagrams and no relationships indicating their overlap. We
can fix this by first using the transformation CDMatch that
creates a CDRel between two class diagrams and puts links
between classes with the same name. We could apply CDMatch
manually to each pair of class diagrams in NewLib but to
save time, we apply MaphCDMatchi to NewLib and get all the
relationships in one step in the MIDRel MatchR. A MIDRel is
a megamodel containing only relationships. Finally, we union
these relationships with the class diagrams to produce MID
NewLibR (content shown in Fig. 2).
        </p>
        <p>At any point in our scenario we can drill-down into models
or relationships to examine results or manually intervene
in the process. For example, we may want to manually
check or modify individually relationships that MaphCDMatchi
produced to confirm that the correct classes are linked. To
do this, we would double-click on a relationship (thick blue
arrow in NewLibR ) and view or edit it using the MMINT
relationship editor.</p>
        <p>
          Now we can merge the models in NewLibR pairwise using
CDMerge. To do this quickly we use the megamodel operator
ReducehACCUMULATORi that accepts an arbitrary “merging”
transformation and keeps applying it until it can be
applied no more (See [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for details). In this case we apply
ReducehCDMergei to MID NewLibR to produce the MID
NewLibM containing a single class diagram with the merged
content of the class diagrams in NewLibR.
        </p>
        <p>Step (4). In the final step of our scenario we wish to create
a Java representation of the the merged class diagram in MID</p>
        <p>Type MID</p>
        <p>Fig. 3. Architecture of MMINT.</p>
        <p>NewLibM. Assume we already have a transformation CD2Java
that converts a class diagram to a Java model (i.e., based
on a Java metamodel). In addition, we have a transformation
Java2Text that produces the textual code of a Java model.
One way to get the result we want is to apply these
transformations in sequence on the merged class diagram in MID
NewLibM. However, this step can be simplified by using the
MMINT feature of type coercion that enables transformation
reuse.</p>
        <p>MMINT allows some transformations in the Type MID
to be explicitly marked as conversion transformations and
this is the case with CD2Java (See Fig. 1). Normally, when
a model is selected in a MID and right-clicked, MMINT
computes the list of applicable transformations based on the
Type MID and presents a list to the engineer to choose from.
The type coercion features means that MMINT not only lists
the transformations that directly apply to the model based on
its type, but also transformations that could indirectly apply if
the model was first converted using conversion transformations
and it does the conversions automatically. In our scenario,
this means that when we right-click on the merged class
diagram in MID NewLibM, the transformation Java2Text
will be available and if selected, MMINT runs the necessary
CD2Java conversion behind the scenes and then deletes the
intermediate result.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>III. MMINT ARCHITECTURE</title>
      <p>
        MMINT 1 is an evolution of the MMTF model management
framework [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] adding the Type MID, support for retyping, type
coercion and megamodel operators. MMINT is implemented
in Java and uses the Eclipse Modeling Framework (EMF) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
to express models and the Eclipse Graphical Modeling
Framework (GMF) to create custom editors for editing models and
relationships. The overall architecture of MMINT is illustrated
in Fig. 3.
      </p>
      <p>Model and Relationship types. Metamodels for new types
can be plugged in or created directly through the Type MID.
Implementations for supporting tools such as type-specific
editors, validation checkers and solvers can also be plugged in
and are managed by the type support runtime layer. A generic
relationship editor is built into MMINT .</p>
      <p>Transformations. New transformations can be implemented
in Java or any transformation language and plugged into
1Available at: http://github.com/adisandro/MMINT
the type support runtime layer as transformation definitions.
The definition includes metadata specifying the input and
output types and other attributes such as whether this is a
conversion transformation used by the coercive typing feature.
Transformations can also be designated as higher order and
take types or transformations as parameters. The megamodel
operators Filter, Map and Reduce are implemented in this
way. Transformation metadata is stored in the Type MID (See
Fig. 1) for use at run-time.</p>
      <p>MID Editor. The MID Editor provides the user interface
through which MIDs are created and manipulated.
Doubleclicking on an element (model, relationship or MID) opens
the corresponding artifact using the appropriate editor.
Rightclicking on an element brings up a context menu that provides
functionality appropriate to the corresponding artifact
including retyping assistance, transformations that can be applied
(including indirect ones via coercion) and validation.</p>
    </sec>
    <sec id="sec-4">
      <title>IV. CONCLUSION AND FUTURE WORK</title>
      <p>Existing model management frameworks focus on providing
programming tools in preparation of model management,
rather than providing a user environment in which to carry
out model management tasks. MMINT allows users to perform
automatically assisted model management tasks through the
use of interactive type and instance megamodels. We have
illustrated this in a detailed model management scenario.</p>
      <p>In the future, we intend to extend MMINT with a formal
model management workflow language, that allows users to
construct verifiable model management scenarios as chains
of declarative model management operations (e.g., model
translation, model merge) with the use of predefined workflow
constructors (e.g., sequential composition, branching, etc.). We
are also investigating how to integrate MMINT with other
model management approaches.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          , “
          <article-title>Applying Model Management to Classical Meta Data Problems,”</article-title>
          <source>in Proc. of CIDR'03</source>
          , vol.
          <year>2003</year>
          ,
          <year>2003</year>
          , pp.
          <fpage>209</fpage>
          -
          <lpage>220</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Be</surname>
          </string-name>
          ´zivin,
          <string-name>
            <given-names>F.</given-names>
            <surname>Jouault</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Valduriez</surname>
          </string-name>
          , “
          <article-title>On the Need for Megamodels,”</article-title>
          <source>in Proc. of OOPSLA/GPCE Workshops</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brunet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chechik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Easterbrook</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nejati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Niu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Sabetzadeh</surname>
          </string-name>
          , “
          <article-title>A Manifesto for Model Merging,”</article-title>
          <source>in Proc. of GAMMA at ICSE'06</source>
          ,
          <year>2006</year>
          , pp.
          <fpage>5</fpage>
          -
          <lpage>12</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Kolovos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Rose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Garcia-Dominguez</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>R. F.</given-names>
            <surname>Paige</surname>
          </string-name>
          ,
          <source>The Epsilon Book. Eclipse</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Be</surname>
          </string-name>
          ´zivin,
          <string-name>
            <given-names>F.</given-names>
            <surname>Jouault</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Rosenthal</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Valduriez</surname>
          </string-name>
          , “
          <article-title>Modeling in the large and modeling in the small,” in Model Driven Architecture</article-title>
          . Springer,
          <year>2005</year>
          , pp.
          <fpage>33</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Salay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kokaly</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Di</given-names>
            <surname>Sandro</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Chechik</surname>
          </string-name>
          , “
          <article-title>Enriching Megamodel Management with Collection-Based Operators,”</article-title>
          <source>in Proc. of MODELS'15</source>
          (To appear).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Arendt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Biermann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jurack</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Krause</surname>
          </string-name>
          , and G. Taentzer, “Henshin:
          <article-title>Advanced Concepts and Tools for In-place EMF Model Transformations,”</article-title>
          <source>in Proc. of MODELS'10</source>
          ,
          <year>2010</year>
          , pp.
          <fpage>121</fpage>
          -
          <lpage>135</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Salay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Chechik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Easterbrook</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Diskin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>McCormick</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nejati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Sabetzadeh</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Viriyakattiyaporn</surname>
          </string-name>
          , “
          <article-title>An Eclipse-Based Tool Framework for Software Model Management,”</article-title>
          <source>in Proc. of Eclipse Workshop @ OOPSLA'07</source>
          ,
          <year>2007</year>
          , pp.
          <fpage>55</fpage>
          -
          <lpage>59</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D.</given-names>
            <surname>Steinberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Budinsky</surname>
          </string-name>
          , E. Merks, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Paternostro</surname>
          </string-name>
          , EMF: Eclipse Modeling Framework.
          <source>Pearson Education</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>