<!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>Towards a Declarative, Constraint-Oriented Semantics with a Generic Evaluation Algorithm for GRL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Hao Luo</string-name>
          <email>haoluo.cn@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniel Amyot</string-name>
          <email>damyot@eecs.uottawa.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computer Science and Electrical Engineering, University of Ottawa</institution>
          ,
          <addr-line>Ottawa</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <fpage>26</fpage>
      <lpage>31</lpage>
      <abstract>
        <p>Goal models described with the Goal-oriented Requirement Language (GRL) are amenable to various kinds of analyses, including quantitative and qualitative propagations of satisfaction values. However, most approaches use bottom-up evaluations involving operational semantics that can only answer “what if” questions. This paper introduces a new declarative semantics for GRL based on a constraint-oriented interpretation of goal models. This semantics enables constraint solvers to evaluate and optimize goal models in a way that is more generic than bottom-up and top-down propagation techniques, hence enabling other questions to be answered. A prototype that combines the jUCMNav modeling tool and the JaCoP constraint solver to support quantitative evaluations is used to demonstrate the feasibility and potential of this new approach.</p>
      </abstract>
      <kwd-group>
        <kwd />
        <kwd>Constraint-oriented goal evaluation</kwd>
        <kwd>Goal-oriented Requirement Language</kwd>
        <kwd>jUCMNav</kwd>
        <kwd>semantics</kwd>
        <kwd>User Requirements Notation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The User Requirements Notation (URN) is a language that combines scenario
modeling (with Use Case Maps – UCM) and goal modeling (with the Goal-oriented
Requirement Language – GRL) to support requirements engineering activities,
especially for reactive systems and business processes. This standard language is defined with
a metamodel, a concrete graphical syntax, and an XML-based interchange format [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        In GRL, a model is composed of intentional elements (i.e., goals, softgoals, tasks,
resources, and beliefs) connected by links (decomposition, contribution, and
dependencies) and potentially allocated to actors. The URN standard includes a set of
guidelines and requirements describing how to analyze GRL models based on a set of
initial satisfaction values given to some of the intentional elements (i.e., an evaluation
strategy), which are then propagated to the other intentional elements through the
links connecting them. Satisfactions in GRL can be qualitative (satisfied, denied, etc.)
or quantitative (integer in [!100..100]). Similarly, contributions can have a qualitative
weight (make, break, etc.) or a quantitative one ([!100..100]). One particularity of
GRL (which does not exist in i*) is that intentional elements in an actor can have an
importance factor that, when combined to satisfaction levels, helps measure the
overall satisfaction of an actor (again, these measures can be qualitative or quantitative).
Although the standard does not impose specific propagation algorithms to evaluate
a goal model against a given evaluation strategy, several algorithms (fully
quantitative, fully qualitative, and hybrid) are suggested and are further explored in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. These
algorithms are all automated, i.e., no interactivity is required to solve conflicts, and
they are defined based on an operational semantics for GRL. However, these
algorithms only support bottom-up propagation, which means that they can only answer
“what-if” types of analysis questions. An evaluation strategy hence typically
initializes some of the leaves in the goal graph, and the values are then propagated to the
intentional elements higher in that graph.
      </p>
      <p>Bottom-up analysis in limitative in practice; it is akin to testing in terms of
analytical power, i.e., one often uses many strategies to find a good global trade-off or find
an optimal satisfaction value for a given goal or actor (usually without any guarantee).
There is a need to support top-down and inside-out analysis techniques for GRL in
order to find solutions to more interesting questions such as “is there a way to reach
this satisfaction level for this top-level goal?”, or more generically “what is the
maximum satisfaction of this goal given these constraints on other goals?”.</p>
      <p>This paper presents a new semantics and an algorithm for GRL model analysis that
will enable modelers to answer all these types of questions. Tool support is also
provided to demonstrate the feasibility of the approach.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Objectives of the Research</title>
      <p>This research aims to support a generic and automatic propagation algorithm for GRL
models that can support bottom-up, top-down, and inside-out analysis, as well as
optimizations in the presence of constraints (i.e., intentional elements initialized
anywhere in the model). To enable such an algorithm, we need to move away from the
operational semantics often associated with GRL to a declarative semantics amenable
to solving in the presence of constraints. Our approach is as follows: i) provide a
declarative semantics for GRL (in this paper, we limit ourselves to quantitative
evaluations only), ii) define a transformation of this semantics in terms of a
constraintoriented language for which automated solvers exist, and iii) prototype the approach.</p>
      <p>
        The prototype algorithm is integrated to the jUCMNav tool as one of its GRL
evaluation algorithms. jUCMNav is a free Eclipse-based URN modeling and analysis tool
that already supports qualitative, quantitative, and hybrid evaluation mechanisms for
GRL, but that only use bottom-up propagation [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. jUCMNav offers an open
architecture that makes it easy to add new GRL evaluation algorithms. The
constraintoriented technology we selected is JaCoP [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], a mature library that provides many
modular constraint-solving and search mechanisms. JaCoP was selected because it is
a Java open source project (like jUCMNav) and because it complies to the JSR-331
API for constraint programming, but others (e.g., Choco) could be used as well.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Scientific Contributions</title>
      <p>This section briefly presents the three main contributions of our work.
3.1</p>
      <sec id="sec-3-1">
        <title>Declarative Semantics for GRL</title>
        <p>
          The proposed declarative semantics for GRL is expressed in mathematical terms.
Intuitively, the syntactic domain is composed of intentional elements (with their types
and importance factors), decomposition links (and their types: OR or AND),
contribution links (and their weights), dependency links, actors, and a strategy, with the
semantics and well-formedness rules expressed in the URN standard (e.g., an
intentional element has only one type of decomposition). The semantic domain is one where
each syntactically correct GRL diagram is interpreted as an evaluated set of
intentional elements and actors, where evaluations are integers between !100 (denied) and 100
(satisfied), inclusively, as required by the URN standard [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The semantic function
maps the syntactic constructs to evaluations in the semantic domains. ݒሺܵሻ is used to
denote the evaluation of intentional element ܵ .
        </p>
        <p>a) AND-decomposition</p>
        <p>b) OR-decomposition
ܣ ͳ
ܵ
AND
ܣ ʹ
ܵ
ܥ 2
ǥ
ܥܹ ܰ
…
ܣ ܰ
ܥ ܰ
ܵ
OR
ܱ ʹ
ܵ
ܦ 2
ǥ
…
ܱ ܰ
ܦ ܰ
c) Contributions</p>
        <p>d) Dependencies (assuming different actors)
Ù
ݒ ሺ ܵ ሻ ൌ 
ٿ ௫ேୀଵ
ݒሺܵሻ ൑ ݒܦሺ</p>
        <p>௫ ሻ
ሺ ͳെͲǡ 
ሺ ͳͲǡ 
ଵ௫ஸே
ݒሺܣ
௫ ሻ ൅
σ ௫ேୀଵ
ݒܥሺ
௫ ሻ ൈ ܥܹ
௫ Τ ͳͲ
ሻ
The relationship for the OR-decomposition is similar, but with max instead of min.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Transformation to a Constraint-Oriented Language</title>
        <p>The JaCoP library comes with a set of functions and search mechanisms that can
support an implementation of the semantics introduced in the previous section. Each
intentional element in the GRL model becomes a unique variable in JaCoP, with
[!100..100] as a domain. The equations and inequalities describing each of the
intentional elements in terms of its links are converted to JaCoP constraints. For example,
B£A becomes XlteqY(A,B), C=min(A,B) becomes Min({A,B},C), and so on
(some complex relationships need to be split into intermediate constraints along the
way). Finally, the strategy definition provides constant values to the variables
corresponding to the intentional elements initialized by that strategy.</p>
        <p>We also experimented with the notion that GRL tasks that are leaf nodes in a
model should only have 100 or 0 as possible satisfaction values, denoting the fact that
these tasks are either performed/selected completely or not at all. It is trivial to detect
such situations and to add corresponding JaCoP constraints.</p>
        <p>JaCoP allows for different types of searches through the solution space to come up
with a solution, when one exists. For example, one can maximize, minimize, or find
median values for the variables. Heuristics are also available to accelerate the search.
Multiple solutions can also be reported when more than one exists. However, refining
the model while navigating through multiple solutions is left for future work.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Tool Prototype</title>
        <p>
          Our proof-of-concept implementation integrates the JaCoP library to jUCMNav [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
When the tool user selects a strategy to evaluate against the GRL model, the model
and the strategy are converted on the fly to JaCoP constraints, and a search for a
solution is started. We use by default a depth-first minimization search of the solution
tree, and the first solution found by JaCoP is sent back to jUCMNav for display, with
color coding. Fig. 2 illustrates interesting features of the algorithm and prototype tool.
The intentional elements with a (*) and a dashed outline are initialized by the strategy.
        </p>
        <p>
          Fig. 2a illustrates the traditional situation where we have the equivalent of a
bottom-up propagation (leaves are initialized). Our algorithm can actually do everything
that the quantitative algorithm in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] can do (assuming a tolerance factor equal to 0).
More interestingly, the tool will provide a solution to a situation where a root node is
initialized, as shown in Fig. 2b. In this top-down-like situation, a minimal solution for
B is found and returned by the JaCoP engine. In Fig. 2c, an additional constraint on C
is added, and hence another minimal solution for B is returned. Note that in this
generic case, any node can be initialized, not just roots or leaves (actually, the GRL
model does not even need to be a tree; acyclic graphs are supported as well).
The absence of a solution can also be reported by JaCoP, and this is visualized in
jUCMNav with a special value (!101, conflict) and blue color coding. For instance, in
Fig. 2d, if C has a satisfaction level of !50, there is no solution for B such that A’s
satisfaction equals to 100. The impact of using tasks as leaf nodes (i.e., they can only
have 0 or 100 as satisfaction values) is shown in Fig. 2e and Fig. 2f.
        </p>
        <p>a) Bottom-up
b) Top-down
c) Generic, with constraints
d) Unsolvable
e) Top-down, with task
f) Generic, with task
This paper proposes a simple and yet powerful interpretation of GRL models through
a declarative semantics amenable to transformations to constraint-oriented languages.
The prototype implementation, which combines the jUCMNav modeling tool and the
JaCoP constraint solver to support quantitative evaluations, demonstrates the
feasibility and potential of the semantics and overall analysis approach.</p>
        <p>
          Not only are the proposed semantics and quantitative propagation algorithm more
generic than the existing ones for GRL [
          <xref ref-type="bibr" rid="ref1 ref5">1,5</xref>
          ], they also bring some benefits that could
complement existing work in other goal languages. For example, Giorgini et al. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
provide support for an automated top-down qualitative analysis for TROPOS models,
with two values per intentional element (positive and negative evidence) but without
conflict resolution nor quantitative values. Horkoff et al. [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] propose an interactive
and iterative approach to find solutions in i* models based on single evaluation values
and a SAT solver. Their axiomatized qualitative propagation rules are useful for early
requirements, conflict resolution, and the handling of multiple sources of weak
evidence. However, a fully automated and quantitative approach like ours becomes quite
beneficial when more precise and quantitative knowledge about the domain is
available. Having the possibility to quickly set and evaluate constraints on intermediate
nodes of a goal model is also useful during the exploration of the model (in a sense,
this is another level of interactive analysis). In addition, running existing strategies
when the model evolves (regression analysis) is more efficient in our context. Letier
et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] have extended KAOS goal models with probabilities for reasoning about
partial quantitative satisfaction in an automated way. However, we argue that the use
of probabilities is another level of complexity and precision that few goal modelers
can actually exploit in a pragmatic way, so our approach is likely more accessible.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Ongoing and Future Work</title>
      <p>Extensions to this work include the support of remaining GRL concepts (e.g.,
XORdecomposition, tolerance, and satisfaction at the actor level), but also GRL extensions
like key performance indicators. We could also consider a global satisfaction for the
entire model computed from actor satisfaction levels. Better formalization of the
semantics, including an assessment of its soundness and completeness, are also
required. There should also be a way to specify in a GRL strategy whether some goals
should be maximized or minimized, and this could be taken into consideration by
constraint solvers for an enhanced analysis experience. We also need to explore the
usefulness of adapting this work to qualitative and hybrid evaluations. Although early
performance results of our prototype are encouraging (most average-sized models we
have played with can be solved within several milliseconds, hence enabling modelers
to explore different values for a strategy on the fly), we often faced situations where a
certain combination of model/strategy requires hours to solve. These situations need
to be investigated, with a way to stop long evaluations. Finally, we believe that such
declarative semantics will enable researchers to explore the usability of various
semantics of goal modeling languages (in terms of complexity and customization) for
different categories of users, application domains, and development phases.</p>
      <p>Acknowledgements. We thank NSERC for financial support, and P. Heymans and
F. Roucoux for useful discussions on the topics of GRL formalization and analysis.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Amyot</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghanavati</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horkoff</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mussbacher</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peyton</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>Evaluating Goal Models within the Goal-oriented Requirement Language</article-title>
          .
          <source>International Journal of Intelligent Systems (IJIS)</source>
          , Vol.
          <volume>25</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>8</given-names>
          </string-name>
          ,
          <fpage>841</fpage>
          -
          <lpage>877</lpage>
          (
          <year>August 2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Amyot</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mussbacher</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>User Requirements Notation: The First Ten Years, The Next Ten Years</article-title>
          . Invited paper,
          <source>Journal of Software (JSW)</source>
          , Vol.
          <volume>6</volume>
          , No.
          <volume>5</volume>
          ,
          <fpage>747</fpage>
          -
          <lpage>768</lpage>
          (May
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Giorgini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sebastiani</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Goal-oriented requirements analysis and reasoning in the Tropos methodology</article-title>
          .
          <source>Eng. Appl. of AI</source>
          ,
          <volume>18</volume>
          (
          <issue>2</issue>
          ):
          <fpage>159</fpage>
          -
          <lpage>171</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Horkoff</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>Finding Solutions in Goal Models: An Interactive Backward Reasoning Approach</article-title>
          . Conceptual Modeling - ER
          <year>2010</year>
          . Springer, LNCS
          <volume>6412</volume>
          :
          <fpage>59</fpage>
          -
          <lpage>75</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>ITU-T: User Requirements Notation (URN) - Language</surname>
            <given-names>definition</given-names>
          </string-name>
          ,
          <string-name>
            <surname>ITU-T Recommendation</surname>
          </string-name>
          Z.
          <volume>151</volume>
          (
          <issue>11</issue>
          /08). Geneva,
          <string-name>
            <surname>Switzerland</surname>
          </string-name>
          (
          <year>2008</year>
          ); http://www.itu.int/rec/T-REC-Z.
          <volume>151</volume>
          /en
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. JaCoP - Java
          <source>Constraint Programming Solver, ver. 3</source>
          .
          <issue>1</issue>
          (
          <year>2011</year>
          ); http://www.osolpro.com/
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <source>7. jUCMNav 4.4.0</source>
          (
          <year>2011</year>
          ); http://softwareengineering.ca/jucmnav
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Letier</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>van Lamsweerde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Reasoning about partial goal satisfaction for requirements and design engineering</article-title>
          .
          <source>12th Foundations of Software Eng. (FSE-12)</source>
          :
          <fpage>53</fpage>
          -
          <lpage>62</lpage>
          , ACM (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Luo</surname>
          </string-name>
          , H.:
          <article-title>Generic Propagation Algorithm for Goal Models. M.Sc</article-title>
          . project, SITE, University of Ottawa, Canada (
          <year>2011</year>
          ); http://www.UseCaseMaps.org/pub/
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>