<!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>An iStar 2.0 Editor Based on the Eclipse Modelling Framework</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Martin Liebenberg</string-name>
          <email>liebenberg@kbsg.rwth-aachen.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kerstin Ro maier</string-name>
          <email>kerstin.rossmaier@rwth-aachen.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gerhard Lakemeyer</string-name>
          <email>gerhard@kbsg.rwth-aachen.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Knowledge-Based Systems Group (KBSG), RWTH Aachen University</institution>
          ,
          <addr-line>Ahornstrae 55, D-52056 Aachen, Germany, https://</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>During the search for a replacement of our outdated OpenOME editor to obtain a new editor for iStar 2.0, we became aware of certain tools from the Eclipse Modeling Project. These tools provide the possibility to build modern graphical editors in a convenient way with little programming overhead. They also meet our requirements for an editor which should be exible in changing the metamodel of iStar and easy to extend. In this paper, we report on our quest to nd an Eclipse modelling framework which makes it easy to create and adapt an up-to-date iStar 2.0 editor.</p>
      </abstract>
      <kwd-group>
        <kwd>iStar 2</kwd>
        <kwd>0</kwd>
        <kwd>Model-Driven Software Development</kwd>
        <kwd>Eclipse Modeling Project</kwd>
        <kwd>iStar Tools</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        For many years we have used an old version of the Eclipse-based OpenOME
[
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] which was adapted by our group around 2009. Today, its code base is not
in a good shape and is based on old libraries. Nevertheless, in our project we
needed further adaptation of this code base for a multi-agent simulation [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and
decided to get a new editor last year.
      </p>
      <p>
        First of all, we looked for the newest OpenOME version. The SourceForge
page [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and the Trac [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] of OpenOME showed that the last modi cations were
made in 2011. The projects of Eclipse release a major version every year [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and
adaptation to the new frameworks, libraries and even Java language features [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
may be expensive. Furthermore, OpenOME has problems with maintainability
and stability [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Finally, we wanted to have an editor which supports the newest
version of iStar because recently the speci cation of iStar 2.0 had been released.
      </p>
      <p>
        Starting from scratch with a new editor for the iStar 2.0 dialect we need [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]
has the promise of a code base which is better to maintain. Such an editor should
be light-weight and better to adapt to updates of libraries and language changes.
OpenOME was based on the Graphical Modeling Framework (GMF) which is
part of the Graphical Modeling Project [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. To this project several frameworks are
related that generally follows the concept of Model-Driven Software Development
(MDSD) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], where programs are automatically generated using a formal model.
In our case this would mean that the code for editors is generated equipped with
interfaces to embed them into other software. With these modelling techniques
we hoped to get a new editor fast. In the following sections we report our ndings
about these frameworks and our choice of an iStar editor.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Searching for a Suitable Framework</title>
      <p>As stated above, we want to use MDSD for the easy creation of an editor for
iStar 2.0 diagrams. To this end, we created a formal model of a fragment of
iStar 2.0 which is interesting for us. Then in a further step, we investigated
three di erent frameworks for creating graphical editors using this model. Here
we only consider Eclipse-based tools, because for us it is important that we can
connect the editor to other software which is quite easy to achieve within Eclipse.</p>
      <p>
        All the frameworks we examined utilize an Ecore metamodel, which comes
from the Eclipse Modeling Framework (EMF) [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], to describe the metamodel
for the editors. Figure 1 shows our Ecore model of a fragment of iStar 2.0 as an
UML diagram that we used for editor generation. Due to lack of space, here we
concentrate on a fragment of the iStar 2.0 language as de ned in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and omit
elements we are currently not using and additional elements we need for our
simulation. For instance, in our metamodel we need a link which indicates which
agent provides a resource.
      </p>
      <p>
        In the following we present the three frameworks we looked at: the Graphical
Modeling Framework, Graphiti and Sirius. All three frameworks are based on
EMF and the Graphical Editing Framework (GEF) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. Ultimately, we chose
Sirius for our editor implementation, which is described in Section 3.
2.1
      </p>
      <sec id="sec-2-1">
        <title>Graphical Modeling Framework</title>
        <p>
          As the rst of the three frameworks we considered GMF [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] because OpenOME
was based on it. It uses the Ecore model as base model and utilizes models
from EMF for describing the editor. The Graphical De nition Model contains
information about the representation of elements from our Ecore model. Further,
the Tooling De nition Model describes the behavior of tools available in the
editor. GMF uses other models as well as ones which depend on one another
and therefore require changes after changing one of these models. Finally, after
deriving several models with di erent purposes, GMF automatically generates
Java code for the de ned editor.
        </p>
        <p>GMF works well for small Ecore models that result in simple editors so that
little customization of the EMF-based models is required. For larger domains,
like ours, for which we need to add constraints, such as tasks appearing only
inside agents, the Graphical and Tooling De nition Model, in addition to the
Mapping Model which links these two models, quickly become large and hard
to maintain. In addition, changing one model usually requires changes to others,
which makes GMF in exible, especially when changing the metamodel. Since
exibility is a requirement of ours, this makes GMF not a good t for our
purpose. An advantage of GMF is, that advanced feature customization outside of
the framework's options can simply be added to the Java code GMF creates.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Graphiti</title>
        <p>
          In contrast to GMF, Graphiti [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] does not provide code generation. Instead
developers have to write code using a Java API that hides the complexities
of working with EMF and GEF. Same as GMF the Ecore model is the base
of Graphiti and we can describe an editor by implementing so called Diagram
Type Agents for all elements required in our editor. These contain the behavior
of that element described through features such as create, delete, or resize. The
Graphiti Rendering Engine takes care of the graphical representation that we
can customize in a Pictogram Model.
        </p>
        <p>Because Graphiti does not provide automatic code generation, it loses an
advantage of MDSD. Standard code, for example the feature delete, has to be
rewritten for every Diagram Type Agent. In addition, Graphiti requires more
knowledge of Java and plug-in development with Eclipse compared to GMF.
But it is more exible than GMF, since it is not based on a complex network
of models. Changes to the metamodel only require changes to our code, and
Graphiti allows incremental development of an editor. It is also very
customizable, since we can add additional functionality to our code. Developers might
prefer Graphiti over GMF, because it is more similar to conventional coding.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Sirius</title>
        <p>
          The third framework we considered is Sirius [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] which di ers from the rst two,
since it does not use automatic code generation like GMF or require manual
coding like Graphiti. Instead the Ecore model and a Viewpoint Speci cation
Model (VSM) have to be speci ed in the Sirius Tooling framework; no code is
written or automatically created. The Sirius Runtime, which is independent from
the tooling framework, then interprets the XML-like VSM at runtime. When
describing the VSM, we can access the Ecore model through a Domain-speci c
language (DSL) that is updated automatically after changes to the metamodel
happen. Using the DSL and the Acceleo Query Language (AQL) [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], we can
de ne elements of the editor and specify their appearance and behavior. Because
the Sirius Runtime automatically updates the editor while changes are made to
the VSM, it is possible to simultaneously work on the description of an editor
and create diagrams with that editor.
        </p>
        <p>Because Sirius does not require any code for an editor and allows changing the
editor while using it, it is the most exible out of the three frameworks. Therefore
Sirius allows changes to the Ecore model more easily than GMF and Graphiti.
The VSM has an intuitive structure, so it does not require much practice to
work with. A risk of the lack of code generation might be that we have to rely
on Sirius for many customization options. But so far the limitations seem to be
only of a visual nature, as we discuss in the next section. For the reasons listed
above, we decided on the Sirius framework for an implementation of our editor.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Implementation in Sirius</title>
      <p>As stated in the last section, creating an editor with Sirius requires little
familiarization with the framework. We simply linked our Ecore model to a new Sirius
project and accessed all its elements through a Domain-speci c language (DSL).
After that we de ned the node and link types needed in our editor. For example,
we speci ed a task as a node-type by setting its Domain Class to istarmodel.Task.
This description refers to the class Task in our Ecore model called istarmodel
from Figure 1. Then we set a relation between Task and the IstarDiagram class
through the expression feature:elements, which refers to the reference elements
in Figure 1 that Task inherits from the class IntentionalElement. Links between
nodes are de ned similarly, by referring to the Ecore model and the node types
to which they belong; for example the link neededBy has to reference the Task
and Resource node types. Next, we speci ed creation tools that allow users the
construction of diagrams with the editor. For example, the Task Creation Tool
assigns the new task a name and links it to an actor. Figure 2 shows the editor
that we created with Sirius. In the center the editor displays the current
diagram, while all diagrams and their elements are listed on the left. Creation tools
for all elements are listed on the right side and the bottom shows properties of
the currently selected element, such as references to other elements.</p>
      <p>
        As shown above, providing basic functionality for an editor is very simple
with Sirius. Adding more complex features, such as the capability for roles to
contain elements or adding validation of the diagram, does not require much work
either, thanks to the DSL and the query language AQL. Eclipse extension points
and the ability to call custom Java functions allow even more customizations.
The only limitations we found are of a visual nature, for example adding custom
edge decorators outside of the ones supplied by Sirius would require code changes
in the Sirius core [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Because of that, the AND-re nement has a di erent end
decoration, namely an arrow instead of the T-shaped arrowhead, than in the
iStar 2.0 documentation [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Apart from that, Sirius' advantage is that it does not
have any code generation, which makes the editor creation very easy and exible.
Making changes to the Ecore model requires only a few minor adjustments to
de nitions we wrote with the DSL. The VSM has a good structure that speeds up
work. In addition, Sirius saves created models in two les, thus separating visual
from semantic information. This gives us easy access to the model which we
require for translating iStar models into other languages [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. These advantages
make Sirius a good choice for our project.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>In this paper, we investigated three Eclipse-based frameworks that generally
follow the concept of Model-Driven Software Development. For our purposes
we hoped to nd a framework which makes creating an editor for an iStar 2.0
fragment easy and exible. We think that we have found a suitable framework
with the Sirius framework. The only drawback so far is that the AND-re nement
can not have the right T-shaped arrowhead in its representation in the editor.
To make this possible one has to change the core of the frame work. But this
would not be a good option if we want a maintainable solution.</p>
      <p>At the moment we only have a basic stand-alone editor. In future work, we
need to connect our Sirius-based editor with other tools needed for multi-agent
simulation.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. OpenOME SourceForge Files. https://sourceforge.net/projects/openome/ les,
          <year>2011</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>OpenOME</given-names>
            <surname>Trac Source</surname>
          </string-name>
          <article-title>Browser</article-title>
          . https://se.cs.toronto.edu/trac/ome/browser,
          <year>2011</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Eclipse Version History. https://wiki.eclipse.org/Simultaneous Release,
          <year>2017</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>GMF-Graphical</surname>
            <given-names>Modelling</given-names>
          </string-name>
          <string-name>
            <surname>Framework</surname>
          </string-name>
          . http://www.eclipse.org/modeling/gmp,
          <year>2017</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>What</surname>
          </string-name>
          <article-title>'s new in JDK 8</article-title>
          . http://www.oracle.com/technetwork/java/javase/8-whatsnew-2157071.html,
          <year>2017</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Florian</given-names>
            <surname>Barbin</surname>
          </string-name>
          .
          <article-title>Bug: Custom "Source Arrow" and "Target Arrow" for an edge style</article-title>
          . https://bugs.eclipse.org/bugs/show bug.
          <source>cgi?id=484508</source>
          ,
          <year>2016</year>
          . Accessed 23- April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Stephane</given-names>
            <surname>Begaudeau</surname>
          </string-name>
          .
          <article-title>Acceleo Query Language - Query and navigate in EMF models</article-title>
          . https://www.eclipse.org/acceleo/documentation/aql.html,
          <year>2015</year>
          . Accessed 23-April-
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Fabiano</given-names>
            <surname>Dalpiaz</surname>
          </string-name>
          ,
          <source>Xavier Franch, and Jennifer Horko . iStar 2</source>
          .
          <article-title>0 Language Guide</article-title>
          .
          <source>arXiv preprint arXiv:1605.07767</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Markus</given-names>
            <surname>Gerhart</surname>
          </string-name>
          and
          <string-name>
            <given-names>Marko</given-names>
            <surname>Boger</surname>
          </string-name>
          .
          <article-title>Concepts for the model-driven generation of graphical editors in eclipse by using the graphiti framework</article-title>
          .
          <source>International Journal of Computer Techniques</source>
          ,
          <volume>3</volume>
          (
          <issue>4</issue>
          ),
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Tong</surname>
            <given-names>Li</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alicia M. Grubb</surname>
            , and
            <given-names>Jennifer</given-names>
          </string-name>
          <string-name>
            <surname>Horko</surname>
          </string-name>
          .
          <article-title>Understanding Challenges and Tradeo s in iStar Tool Development</article-title>
          .
          <source>Proceedings of the Ninth International i* Workshop</source>
          (iStar
          <year>2016</year>
          ),
          <volume>1674</volume>
          :
          <fpage>49</fpage>
          {
          <fpage>54</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. Stephen W Liddle.
          <article-title>Model-Driven Software Development</article-title>
          .
          <source>In Handbook of Conceptual Modeling</source>
          , pages
          <volume>17</volume>
          {
          <fpage>54</fpage>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Martin</surname>
            <given-names>Liebenberg</given-names>
          </string-name>
          , Victor Matare, Klaus Baier, and
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Lakemeyer</surname>
          </string-name>
          .
          <article-title>Towards Using i* for Modeling Mega-Urban Processes</article-title>
          .
          <source>In CEUR Proceedings of the Seventh International i* Workshop (iStar14)</source>
          , volume
          <volume>1157</volume>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Dan</surname>
            <given-names>Rubel</given-names>
          </string-name>
          , Jaime Wren, and
          <string-name>
            <given-names>Eric</given-names>
            <surname>Clayberg. The Eclipse Graphical Editing Framework (GEF). Addison-Wesley Professional</surname>
          </string-name>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Dave</surname>
            <given-names>Steinberg</given-names>
          </string-name>
          , Frank Budinsky, Ed Merks, and
          <string-name>
            <given-names>Marcelo</given-names>
            <surname>Paternostro</surname>
          </string-name>
          .
          <source>EMF: Eclipse Modeling Framework. Pearson Education</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Vladimir</surname>
            <given-names>Viyovic</given-names>
          </string-name>
          , Mirjam Maksimovic, and
          <string-name>
            <given-names>Branko</given-names>
            <surname>Perisic</surname>
          </string-name>
          .
          <article-title>Sirius: A rapid development of DSM graphical editor</article-title>
          .
          <source>In Intelligent Engineering Systems (INES)</source>
          ,
          <year>2014</year>
          18th International Conference on, pages
          <volume>233</volume>
          {
          <fpage>238</fpage>
          . IEEE,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <article-title>Yijun Yu and Jennifer Horko an Eric Yu. OpenOME, An Open-source Goal and Agent-Oriented Model Drawing and Analysis Tool</article-title>
          .
          <source>CEUR Proceedings of the 5th International i* Workshop</source>
          (iStar
          <year>2011</year>
          ),
          <volume>766</volume>
          :
          <fpage>154</fpage>
          {
          <fpage>156</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>