<!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>Model Contextual Variability for Agents Using Goals and Commitments</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Electrical and Computer Engineering National Technical University of Athens</institution>
          ,
          <country country="GR">Greece</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <volume>978</volume>
      <fpage>103</fpage>
      <lpage>108</lpage>
      <abstract>
        <p>Goal models have been extensively utilized in requirements engineering as they provide an expressive and qualitative way to represent requirements, while recent extensions related to contextual variability have further increased the expressiveness of the models. In addition to their application in requirements engineering however, goal models have been also proposed in the literature as a formal way to de ne the internal design of agents in multi-agent systems. In this paper we adopt the idea of applying goal models with contextual elements, i.e. conditional goals, decompositions and contributions, as a mean to model the internal design of agents. Furthermore, we express the way those agents can interact with each other in terms of commitments, a recently introduced modeling concept that can be used for the de nition of communication protocols in multi-agent systems. In this context, we introduce a transformation process that maps all conditional elements to commitments and contributions, and hence, reasoning techniques that exist for commitments can be applied to contextual models with no further changes.</p>
      </abstract>
      <kwd-group>
        <kwd>goal models</kwd>
        <kwd>agent-oriented models</kwd>
        <kwd>commitments</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Goal models, which have been extensively utilized in requirements engineering,
have been proposed in the literature as a formal way to de ne the internal
design and objectives of agents in multi-agent systems. This idea has been also
adopted by Chopra et al. in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], where they additionally introduce the notion of
commitment as a way to model the communication protocol, i.e. the way agents
can interact with each other, in multi-agent systems. More speci cally, in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the
internal design of each agent, along with the goals it wants to achieve, are de ned
in terms of AND/OR decompositions, and contributions. Given that an agent
has the capability to ful l only a subset of its intended goals on its own, it
cannot help but depend on others for the ful lment of the remaining ones. These
dependencies are expressed via roles the agents can adopt, and commitments
that exist between agents that play those roles. In a more detailed manner, a
commitment of the form Commitment (Debtor,Creditor, antecedent, consequent )
means that the Debtor is committed to the Creditor for the consequent if the
      </p>
      <p>C(Product paid, a
Phone call confirmation)</p>
      <p>C(Product paid,
C(Product paid, c e-mail confirmation)
Product shipped)
C(Product paid, d
SMS confirmation)</p>
      <p>b</p>
      <p>Product sold
Product paid</p>
      <p>AND
Phone call
confirmation</p>
      <p>Tom
{Merchant}
Product
shipped
goal conditional Debtor
{c} goal node</p>
      <p>C(antecedent,
consequent )</p>
      <p>Credit
or
Product paid</p>
      <p>e-mail
confirmation</p>
      <p>Alice
{Customer}
Product
bought</p>
      <p>AND
Confirmation
received</p>
      <p>OR</p>
      <p>SMS
confirmation</p>
      <p>Product
shipped</p>
      <p>Phone call
confirmation</p>
      <p>{Ceu}
Legend
goal
goal node
goal</p>
      <p>agent capability
antecedent holds, where both Debtor and Creditor are roles that an agent can
adopt. Once the goal model of each agent, as well as the sets of roles and
commitments have been speci ed, the authors provide the semantics of a reasoning
process that can be used to check whether the achievement of a speci c agent's
goal can be supported by the underlying protocol.</p>
      <p>As an example consider the case illustrated in Fig. 1, where two agents,
namely Alice and Tom, participate in an online marketplace application (ignore
the conditional goal node for the moment). In this example Alice, who adopts
role \Customer", can satisfy her goal \Product paid" on her own as this is a
capability of hers. The satisfaction of her goal \Product shipped" however, can
be only supported by the commitment denoted as \c" in the gure. In a nutshell,
because of the existence of the commitment \c", Tom, who participates in the
application as a \Merchant", is committed to provide \Product shipped", if Alice
(the \Customer") ful ls \Product paid".
2</p>
    </sec>
    <sec id="sec-2">
      <title>Research Objectives</title>
      <p>
        In this paper, we utilize the ideas of [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] related to contextual variability
of goal models, in order to capture the variability that may exist in the internal
design of an agent as a consequence of alterations in the context an agent acts in.
In this case however, the problem that needs to be solved is slightly di erent. We
are now interested in studying whether a speci c agent's goal can be supported
by the underlying protocol and within the given context. Hence, the reasoning
process described in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] does not apply any more.
      </p>
      <p>
        To overcome this problem, and in an attempt to keep the reasoning
mechanism unchanged, we propose the framework illustrated in Fig. 2. In a more
descriptive manner, we rstly extend the metamodel introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] so as to
Multi-agent Application
with Contextual Variability
      </p>
      <p>Metamodel
Section 3.1</p>
      <p>conforms to</p>
      <p>Model with
Conditional Elements</p>
      <p>Transformation</p>
      <p>
        Section 3.2
support contextual elements, i.e. goals, decompositions and contributions (see
section 3.1), and we then introduce a transformation process that will allow us
to express those context-related modeling elements in terms of commitments
and contributions (see section 3.2). Thus, by applying this transformation, we
can produce a model that captures the multiple variations that may exist in
the initial model, while at the same time we can reuse the reasoning semantics
proposed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It is important to note that the produced model is only intended
to be used for the generation of the rules required for the reasoning process.
3
3.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Scienti c Contribution</title>
      <p>
        Agents with Context-dependent Goal Models
Using the conceptual model de ned in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] as a starting point, and taking into
consideration the way contextual variability is captured in goal models in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], we ended up with the metamodel depicted in Fig. 3. While the part
of the metamodel related to the de nition of a service engagement in terms of
commitments and roles is identical to the one introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] (and thus not
included in the gure), the goal-oriented representation of agents is extended
with the addition of conditions. More speci cally, the proposed metamodel allows
for goals, decompositions, and contributions to be de ned as conditional, in the
sense that each one of those modeling elements can be related to one or more
conditions, the truth values of which dictate the existence of the corresponding
element in the goal model. Hence, a conditional element is included in the model
only if at least one of the attached conditions is true, otherwise it must be
removed. In this respect, the metamodel can capture the contextual variability
of the internal model of an agent, where a speci c context is mirrored by the
assignment of truth values to all conditions in the model.
      </p>
      <p>For the example illustrated in Fig. 1, lets assume that the online marketplace
application serves only e-shops that are located in Europe, and that the goal node
\Phone call con rmation" is conditional and exist in the model only if Alice is
located in Europe when she interacts with the application (Ceu is true), and is
removed otherwise. Lets also assume that Alice happens to be in the USA (i.e.
condition Ceu is false), and hence she can only receive a con rmation via an
e-mail or an SMS. As Tom cannot provide neither of them to Alice, she will not
be able to achieve her goal as a consequence of the context she acts in.
DecompositionType +MMS
+AND +PPD
+OR +MMD</p>
      <p>Proceedings of the 6th International i* Workshop (iStar 2013), CEUR Vol-978
4
0..* -has
Agent</p>
      <p>1
Goal
1 1
1 -f-rtoom1 -type :CCoonntrtirbibuuttioionnType
-isCapab0l.e.*Of
1
-decomposedTo</p>
      <p>HardGoal</p>
      <p>SoftGoal</p>
      <p>2..*
1</p>
      <p>2..*</p>
      <p>HGDecomposition
-type : DecompositionType
0..1*</p>
      <p>-hasDeco1mposition
-hasDecomposition
0..*
-decomposedTo</p>
      <p>SGDecomposition
-type : DecompositionType
1
«interface»
Conditional 1
0..* -isRelatedTo</p>
      <p>Condition
1…* -c11o..n..**sistsOf</p>
      <p>Context
In this section we are going to de ne a transformation process for the mapping
of conditional elements to commitments. Initially, we de ne a dummy agent
called ContextAgent which has no goals to achieve, and always adopts the role
Reasoner. The purpose of this agent is to provide other agents with goals that
belong to the set of its capabilities (set GC ), something that can be done by
enriching the existing protocol with additional commitments. More than that,
for each condition in the model we create a corresponding role that can be
adopted by the agents that participate in the application.</p>
      <p>The mapping from conditional contributions to commitments for the four
possible types (++S=D and S=D) 1, along with the corresponding
transformation steps are summarized in Table 1. Because of space limitations we will
only discuss in detail the transformation process for the D conditional
contribution. We start by adding two new goal nodes to the model, namely gs0 and
gt0 , with the latter being a capability of the ContextAgent. Those two goal nodes
are then connected to the goal model via two unconditional contributions, one
of type D from gs to gs0, and a second one of type ++S from gt0 to gt.
Subsequently, the commitment Commitment (Reasoner,rcond,gs0,gt0 ) is inserted in the
protocol of the application. What remains to be proved is the soundness of the
mapping from the D conditional contribution, to the rules that use
commitments and unconditional contributions. In other words, we must show that when
condition Ccond is true, and gs is not satis ed, goal gt is ful lled.</p>
      <p>
        Actually, if gs is denied, gs0 is satis ed because of the existence of the D
contribution from the former to the latter. This implies that if the agent adopts
the role rcond (this is the role that corresponds to Ccond), and because of the
commitment previously speci ed, ContextAgent will provide it with gt0 which is
one of ContextAgent's capabilities. Finally, the truth of gt0 has as a consequence
the satisfaction of gt goal node because of the ++S contribution introduced
earlier. Hence, if gs is denied and the agent adopts the role rcond, gt becomes
true, while if rcond is not adopted, gt can not be satis ed as a consequence of the
1 In the context of this paper we adopt the semantics of [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for contributions
5
denial of gs, as in this case the corresponding commitment cannot be applied.
This means that by substituting the initial D conditional contribution with
a commitment and an appropriate combination of unconditional contributions,
we end up with a model that does not contain the initial conditional element
but still has the same behavior as if it was part of the model.
      </p>
      <p>Finally, the remaining two conditional elements, i.e. decompositions and
goals, can be fully described by utilizing conditional contributions, and so, the
same transformation process can also apply in those cases. The way a conditional
decomposition, and an OR-child node are encoded as conditional contributions
is illustrated in Fig. 4a and 4b respectively, while because of the duality between
AND and OR-decomposition the former has been omitted.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>
        In this paper we use goal models with conditional elements as a mean to capture
the contextual variability of agents that participate in a multi-agent application.
Consequently, we propose a set of rules for the transformation of those
conditional elements to commitments and contributions. This transformation allows
us to apply the same reasoning process introduced in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] even in the presence of
conditional goals, decompositions and contributions. Hence, we have succeeded
in increasing the expressiveness of the metamodel introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], while at the
same time the proposed reasoning techniques can still apply without changes.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Ongoing and future work</title>
      <p>The extended metamodel presented in this paper is intended to be used for
modeling policies that must apply in multi-layer systems at run-time. The
formal representation of those policies, along with a proper reasoning engine, and
in combination with advanced monitoring techniques, can then be utilized in
order to check whether the system complies with the required policies or not.
G1</p>
      <p>AND
A1 AND A2
A1 A2</p>
      <p>A1
A1</p>
      <p>G1
G1OR</p>
      <p>OR
A2
A2</p>
      <p>A2</p>
      <p>+ + S
{C2} + + S
{C2} B</p>
      <p>B</p>
      <p>OR
B1 OR
B2</p>
      <p>B2</p>
      <p>B1
In our work we mainly focus on the former two parts, namely policy modeling,
and reasoning, and we examine the applicability of probabilistic and fuzzy logic
reasoners to the problem of policy validation.</p>
      <p>
        An application of the proposed modeling is presented in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The problem we
are trying to solve in this paper is quite di erent, as we are interested in
predicting the satisfaction of goals related to software project development. However,
we show how a goal model with conditional modeling elements can be
transformed to a rst order logic knowledge base, which can then be used to perform
probabilistic reasoning.
      </p>
      <p>Acknowledgment This research is co-funded by the European Union
(European Social Fund ESF) and Greek National funds through the Operational
Program "Education and Lifelong Learning" of the National Strategic
Reference Framework (NSRF) - Research Funding Program: Heracleitus II. Investing
in knowledge society through the European Social Fund.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Chopra</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalpiaz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giorgini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Reasoning about agents and protocols via goals and commitments</article-title>
          . In: AAMAS. (
          <year>2010</year>
          )
          <volume>457</volume>
          {
          <fpage>464</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalpiaz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giorgini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>A goal-based framework for contextual requirements modeling and analysis</article-title>
          .
          <source>Requir. Eng</source>
          .
          <volume>15</volume>
          (
          <issue>4</issue>
          ) (
          <year>2010</year>
          )
          <volume>439</volume>
          {
          <fpage>458</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Lapouchnian</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
          </string-name>
          , J.:
          <article-title>Capturing contextual variability in i* models</article-title>
          . In: iStar. (
          <year>2011</year>
          )
          <volume>96</volume>
          {
          <fpage>101</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Chopra</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dalpiaz</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Giorgini</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
          </string-name>
          , J.:
          <article-title>Modeling and reasoning about service-oriented applications via goals and commitments</article-title>
          . In: CAiSE. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Chatzikonstantinou</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontogiannis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>A goal driven framework for software project data analytics</article-title>
          . In: CAiSE. (
          <year>2013</year>
          ) To appear.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>