<!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 Automatic Layout Approach for iStar Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Xiaolin Du</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tong Li</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dan Wang</string-name>
          <email>wangdang@bjut.edu.cn</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Beijing University of Technology</institution>
          ,
          <addr-line>Beijing</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The comprehensive syntax of iStar modeling language allows requirements analysts to clearly capture stakeholder's needs, as well as dependencies among stakeholders. However, such iStar models cannot be automatically laid out using typical layout algorithms, such as hierarchical layout and circular layout. Thus, constructing and adjusting iStar models are laborious tasks, especially when dealing with large-scale models. In this paper, we propose a tentative approach to automatically lay out iStar models using a force-based layout algorithm. In particular, our approach has been designed by taking into account the syntax of iStar models in order to ensure both neatness and understandability of resulting models.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>iStar modeling framework has been used as an e cient approach to capture and
analyze stakeholder's needs in the early phase of requirements engineering. In
particular, the comprehensive syntax of iStar modeling language allows
requirements analysts to clearly capture stakeholders' requirements, their rationales, as
well as dependencies among stakeholders.</p>
      <p>
        However, to the best of our knowledge, there is no algorithm to automatically
lay out iStar models. Typical layout algorithms, e.g., hierarchical and circular
layout algorithms, cannot serve this purpose, because they do not t iStar
syntax. As a result, analysts have to spend a signi cant amount of time dealing
with layout issues when creating or modifying iStar models. Such a problem is
exacerbated by the growth of model scale, resulting in a scalability problem [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>Challenges of automatic layout of iStar models inherit from their
comprehensive syntax. In particular, there are two views of presenting iStar models, each of
which has its particular requirements for layout. Firstly, the SD (Strategic
Dependency) view exclusively presents actors and their dependency relations, the
layout of which should avoid crossed links while maximizing model readability.
Secondly, the SR (Strategic Rationale) view includes internal details of actors,
e.g., goals and tasks, which are supposed to be presented as a tree-like structure.</p>
      <p>
        Using force-based layout algorithms is a classic graph drawing method, which
simulates a physical system with edges acting as springs and nodes as repelling
objects [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. As is shown in Fig. 1, when running such an algorithm, nodes
are pushed away from each other due to their repelling forces while edges hold
the nodes together. By iteratively running the algorithm, a graph will eventually
come to an equilibrium in which nodes do not change positions from one iteration
to the next.
      </p>
      <p>In this paper, we present our ongoing research of automatic layout of iStar
models. In particular, we propose a forced-based algorithm to automatically lay
out elements in the SD view, which has been customized based on the syntax of
iStar models in order to produce meaningful layouts. The automatic layout of
SR view is not covered in this paper. We will discuss our initial ideas towards
this issue and left its in-depth investigation for future research. It is worth noting
that terminology used in this paper is aligned with iStar 2.0 modeling language.</p>
    </sec>
    <sec id="sec-2">
      <title>A Forced-Based Layout Algorithm for iStar Models</title>
      <sec id="sec-2-1">
        <title>Layout of SD View</title>
        <p>When it comes to layout of the SD view, a primary goal is to calculate a
reasonable position for each actor. To this end, we need to rst transform an iStar SD
model into an undirected relational graph, which is then used as input of our
force-based layout algorithm. Speci cally, each actor in the SD model is turned
into a node, and relationships among actors (e.g., dependency and part-of ) are
abstracted as edges in the relational graph. It is worth noting that the direction
of an edge does not a ect the outcome of our layout algorithm, and thus is not
considered in this paper.</p>
        <p>Dependency relationships among actors are essential in the SD view, re
ecting to which extent two actors interact with each other. In order to produce
meaningful layout, our approach takes into account such dependency
relationships. Speci cally, the more dependency relationships exist between two actors,
the closer they are. As a result, when abstracting edges among actors, we also
calculate their corresponding weights and store them in an edge weight matrix
EW , The element in the matrix EWij is the number of dependency relationships
between actors. For example, EWij = 3 means that there are three dependency
relationships between actor i and actor j. Fig. 2 shows an example of the
transformation from an iStar SD model to a relational graph.</p>
        <p>
          Let G(VG; EG) denotes a relational graph, VG represents the node set of G,
and EG represents the edge set of G. We use FR (Fruchterman and Reingold)
layout algorithm [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] to calculate the positions. Each iteration of the FR layout
algorithm consists of three steps: 1) calculate the e ect of attractive forces on
each vertex; 2) calculate the e ect of repulsive forces; 3) limit the total
displacement. Note that forces are modeled based on the optimal distance between
vertices, which is calculated as below:
k = C
r
        </p>
        <p>area
number of nodes
(1)</p>
        <p>As shown in Eq. 1, k is calculated as the radius of the empty area around a
node, where the constant C is found experimentally. In such a way, all nodes are
able to be uniformly distributed in a canvas. Subsequently, given d the distance
between the two nodes, attractive forces fa and repulsive forces fr are de ned
as below:
fa(d) = d2 (2) fr(d) = k2 (3)</p>
        <p>k d</p>
        <p>Our layout approach takes into account the weight of each edge. Speci cally,
an edge with bigger weight indicates that its endpoints will be arranged closer.
Thus, we improve the attractive force formula as
fa(d) = EW d2 (4)
k</p>
        <p>For edges that are derived from dependency relations, the corresponding
dependum will be modeled in the middle of edges. As such, two nodes should
not be placed too close to each other. To this end, a threshold is de ned to
control the minimal distance between connected nodes.</p>
        <p>As summarized in Algorithm 1, our approach rst transforms a textually
represented iStar model into a relational graph, while forming an edge weight
matrix. After that an improved FR algorithm is iteratively applied to
calculate the position of each node, based on which a graphical iStar model can be
constructed.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Layout of SR View</title>
        <p>As for the layout of SR view, which is left for future work, we discuss here our
initial thoughts towards this issue. In general, this layout task can be divided
Algorithm 1 A customized force-based layout algorithm
Input: a textual speci cation of a iStar model
Output: a graphical representation of the iStar model
1: Transform the iStar model to a relational graph G;
2: Calculate an edge weight matrix EW ;
3: Apply the improved FR algorithm;
4: f Calculate k
5: For i = 1 to iterations Do
6: Calculate repulsive forces;
7: Calculate attractive forces;
8: Adjust the total displacement;
9: if the distance between two nodes is less than
10: adjust moving direction;
11: g
12: Construct the graphical iStar model
into two sub-tasks: laying out all the intentional elements inside actor boundaries
and positioning each actor boundary as a whole in the entire picture. Since most
intentional elements are supposed to be organized in a tree-like structure, an
intuitive solution is using a hierarchical layout algorithm. However, for quality
requirements and corresponding contribution links, which are laid out in a
different manner, we need to design particular algorithms to deal with their layout.
Once elements inside actor boundaries can be well arranged, we can then treat
each of them as a single element and layout them together with actor nodes.
To accommodate this, we will need to further adjust the force-based algorithm
proposed in this paper.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Evaluation Plans</title>
        <p>Once we extend our proposal to cover the layout issue of SR view, we plan to
implement the entire layout approach as an independent library, which is able to
be integrated into various iStar modeling tools 1. As a starting point, we plan to
rst implement the layout approach on top of our previous goal modeling tool
MUSER 2, serving as a prototype tool.</p>
        <p>With the help of the prototype tool, we plan to evaluate the e ectiveness of
our layout approach through a series of studies. Speci cally, we are interested in
investigating the following research questions:
{ Can our approach create understandable layout of i models? We
plan to carry out several user studies, in which we will ask iStar experts to
assess to which extent the resulting layout of our proposal can be understood.
{ Is our approach scalable to large-scale models? We will evaluate the
scalability issue of our approach by applying it to a set of large-scale models.
1http://istar.rwth-aachen.de/tiki-index.php?page=i%2A+Tools
2http://disi.unitn.it/~li/MUSER/Intro.html
{ Can our approach lead to faster modeling practices? We plan to
design a controlled experiment to compare the performance of two groups,
one of which is assisted by our approach. In particular, we aim to collect
feedback from participants via focus group interview, based on which we
can improve our approach to better support iStar modeling.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>
        We have been aware of a number of proposals that are relevant to ours. OpenOME
and jUCMNav provide some basic graph layout functions to automatically
arrange the goal elements, which mainly focus on laying out intentional elements
inside actors [
        <xref ref-type="bibr" rid="ref1 ref2">2,1</xref>
        ]. These approaches can well complement our current proposal,
rendering a comprehensive layout approach. Moreover, Gregorics et al. proposed
a textual layout description language, which allows users to de ne the
arrangement of important diagram elements [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Ghazi et al. propose FlexiView to
improve the visual representation of requirements artifacts, which also
leverages magnetic-spring algorithms but in a di erent manner [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Speci cally, their
approach partitions requirements engineers' workspace based on the
magneticspring model in order to present di erent types of requirements artifacts at the
same time, minimizing scrolling distance.
      </p>
      <p>
        Di erent from most iStar modeling tools, Grau et al. propose J-PRiM which
does not show the i* elements in a graphical way but in a tree-form hierarchy [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
In such a way, as models grow, the scalability issue can be relieved, and modelers
are able to nd particular elements in a faster way. Note that such a textual
modeling approach and our proposal can complement each other. Speci cally,
management of iStar models can be done in the textual view, while our approach
is responsible for visualizing the textual models when necessary.
      </p>
      <p>
        Graph visualization helps users to gain insight into data by turning the data
elements and their internal relationships into graphs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Graph layout problems
are a particular class of combinatorial optimization problems whose goal is to nd
a linear layout of an input graph in such a way that a certain objective function is
optimized [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Force-based layout is a very popular graph visualization method.
It is rst proposed by Eades in 1984, which has then been revisited and improved
by many researchers in di erent ways (e.g., [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]). Force directed model can be
expressed either in terms of forces acting on the physical objects, or in terms
of a potential energy re ecting the internal stress of the system. Algorithms to
simulate a system's relaxation typically try to move the objects iteratively into
stable states in which all forces cancel each other, or to minimize the energy
directly [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions and Future Work</title>
      <p>In this paper, we present a tentative approach to automatically lay out iStar
models using a customized force-based layout algorithm. As ongoing research,
our proposal mainly focuses on the layout of iStar SD view thus far. In addition,
we have discussed possible ways of extending our approach in order to lay out
elements in the SR view.</p>
      <p>
        Our approach can be applied to textual representations of iStar models, the
bene ts of which are twofold. Firstly, modelers are able to exclusively focus
on the content of models to be built without being bothered by layout issues.
As such, our approach can save much e ort on the creation of iStar models,
especially when modeling large-scale scenarios. Secondly, there are increasing
demands of improving usability of iStar modeling tools in order to better deal
with scalability issues [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. With the help of our approach, tool developers can
also be released from never ending improvement of graphical interfaces.
Moreover, by enhancing iStar tools with the automatic layout feature, they are able to
better support goal model reasoning tasks that incrementally add new elements,
e.g., goal re nements.
      </p>
      <p>As for future work, we plan to rst extend our proposal is to deal with
automatic layout of the SR view. After that we will implement our layout approach in
a particular iStar modeling tool, based on which we will evaluate the usefulness
of our approach through a series of empirical studies.</p>
      <p>Acknowledgments. Tong Li acknowledges the support of BJUT Startup Funding
No.007000514116022. Xiaolin Du acknowledges the support of Beijing Postdoctoral
Research Foundation No.Q6007012201601.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. jUCMNav. http://jucmnav.softwareengineering.ca/jucmnav.</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>2. OpenOME. http://istar.rwth-aachen.de/tiki-index.php?page=OpenOME.</mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>U.</given-names>
            <surname>Brandes</surname>
          </string-name>
          .
          <article-title>Drawing on physical analogies</article-title>
          .
          <source>Drawing graphs.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>W.</given-names>
            <surname>Cui</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Qu</surname>
          </string-name>
          .
          <article-title>A survey on graph visualization</article-title>
          .
          <source>PhD thesis</source>
          , Hong Kong University of Science and Technology,
          <source>Hong Kong</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Diaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Petit</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Serna</surname>
          </string-name>
          .
          <article-title>A survey of graph layout problems</article-title>
          . ACM Computing Surveys,
          <volume>34</volume>
          (
          <issue>3</issue>
          ):
          <volume>313</volume>
          {
          <fpage>356</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>H.</given-names>
            <surname>Estrada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. M.</given-names>
            <surname>Rebollar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Pastor</surname>
          </string-name>
          , and
          <string-name>
            <surname>J. Mylopoulos.</surname>
          </string-name>
          <article-title>An empirical evaluation of the i* framework in a model-based software generation environment</article-title>
          .
          <source>In Advanced Information Systems Engineering</source>
          , pages
          <volume>513</volume>
          {
          <fpage>527</fpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>T. M. J. Fruchterman</surname>
            and
            <given-names>E. M.</given-names>
          </string-name>
          <string-name>
            <surname>Reingold</surname>
          </string-name>
          .
          <article-title>Graph drawing by force-directed placement</article-title>
          .
          <source>Software - Practice and Experience</source>
          ,
          <volume>21</volume>
          (
          <issue>11</issue>
          ):
          <volume>1129</volume>
          {
          <fpage>1164</fpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>P.</given-names>
            <surname>Ghazi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Sey</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Glinz</surname>
          </string-name>
          .
          <article-title>Flexiview: a magnet-based approach for visualizing requirements artifacts</article-title>
          .
          <source>In REFSQ2015</source>
          , pages
          <fpage>262</fpage>
          {
          <fpage>269</fpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>G.</given-names>
            <surname>Grau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Avila.</surname>
          </string-name>
          J-prim:
          <article-title>A java tool for a process reengineering i* methodology</article-title>
          . In Requirements Engineering, 14th IEEE International Conference, pages
          <volume>359</volume>
          {
          <fpage>360</fpage>
          . IEEE,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>B.</given-names>
            <surname>Gregorics</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Gregorics</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. F.</given-names>
            <surname>Kovacs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dobre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Devai</surname>
          </string-name>
          .
          <article-title>Textual diagram layout language and visualization algorithm</article-title>
          .
          <source>pages 196{205</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>T.</given-names>
            <surname>Kamada</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Kawai</surname>
          </string-name>
          .
          <article-title>An algorithm for drawing general undirected graphs</article-title>
          .
          <source>Information Processing Letters</source>
          ,
          <volume>31</volume>
          (
          <issue>1</issue>
          ):7{
          <fpage>15</fpage>
          ,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. M. S. ld.
          <article-title>Social network visualization</article-title>
          .
          <source>Master's thesis</source>
          , School of Computer Science and Engineering, Royal Institute of Technology, Sweden,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>T.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. M.</given-names>
            <surname>Grubb</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Horko</surname>
          </string-name>
          .
          <article-title>Understanding challenges and tradeo s in istar tool development</article-title>
          .
          <source>In 9th iStar Workshop</source>
          , pages
          <volume>49</volume>
          {
          <fpage>54</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>