<!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>Parametric Protocol-Driven Agents and their Integration in JADE?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Angelo Ferrando</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DIBRIS, Genoa University</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we introduce \Template Global Types" which extend Constrained Global Types to support a more generic and modular approach to de ne protocols, meant as patterns of events of a given type. Protocols can be used both for monitoring the behavior of distributed computational entities and for driving it. In this paper we show the potential of Template Global Types in the domain of protocol-driven intelligent software agents. The interpreter for \executing" Template Global Types has a very natural implementation in Prolog which can easily implement the transition rules for moving from one state to another one, given that an event has been perceived (in case of monitoring) or generated for execution (in case of protocol-driven behavior). This interpreter has been integrated into the Jason logic-based agent framework with limited e ort, thanks to the native support that Jason o ers to Prolog. In order to demonstrate the exibility and portability of our approach, which goes beyond the boundaries of logic-based frameworks, in this paper we discuss the integration of the protocol-driven interpreter into the JADE agent framework, entirely implemented in Java.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Nowadays, having guarantees on the correct behavior of developed systems is
gaining more and more importance. Especially in the case of distributed systems,
increasing their robustness is a mandatory target. To achieve this goal, we can
use two di erent techniques:</p>
      <p>A typical example of complex, heterogeneous, open and dynamic distributed
system is the multi-agent system (MAS), where each component is autonomous
and communication is vital.</p>
      <p>In order to verify the correct behavior of the agents we can monitor them
with the help of a monitor agent, as the one by Briola et al. [6]. An evolution
of that approach is described by Ancona et al. [11] in which, instead of having
one monitor agent that controls the behavior of the system by checking that
everything is running correctly, the behavior of each individual agent is driven
by the protocol. Since the agent's behavior is driven by a protocol, it is correct
without needing to be controlled, or better, the agent in a certain way becomes
controller of itself, being able to do only what the protocol allows it to do.</p>
      <p>Protocols can be de ned using many di erent formalisms. In the previous
work carried out at the University of Genova, an original formalism named
\Global Types" was proposed along with its successive extensions including
\Constrained Global Types" [1, 2].</p>
      <p>Protocols expressed as Constrained Global Types include both Prolog
equations and transition rules moving from one allowed protocol state to another
one, given a perceived (or a generated, in case of protocol-driven agents) event
fully implemented in Prolog. For this reason, the rst attempt to implement an
interpreter for protocol-driven agents was with Jason1, because it is able to run
Prolog code directly within the agent [11].</p>
      <p>This paper advances a previous work [11] in the following issues:
{ rst extends Constrained Global Types with a mechanism for making them
more modular and exible (\Template Global Types");
{ second implements agents driven by protocols expressed using Template</p>
      <p>Global Types in Jason;
{ third implements agents driven by protocols expressed using Template Global
Types in a framework not based on Prolog. The choice fell on JADE2, a Java
platform for the creation of multi-agent systems widely used in industrial
applications (see Figure 1).</p>
      <p>The integration of an interpreter for Template Global Types protocol-driven
allows us to demonstrate two important points:
{ the choice of the framework for the implementation of the MASs is not a
constraint. For instance, agents can follow the BDI (Beliefs, Desires, Intentions
[23]) approach, as happens in Jason, or not, as happens in JADE;
{ the only requirement is the ability to implement an interface between a</p>
      <p>Prolog engine supporting cyclic terms and the underlying MAS framework.
1 http://jason.sourceforge.net/
2 http://jade.tilab.com/
In [11] we used Constrained Global Types without variables (that is instead
typical of Attribute Global Type [18]). In order to better understand the content
of this paper, we brie y sketch their syntax and semantics.</p>
      <p>Omitting the operators that are not used in our examples, a constrained
global type may look like the following:
{ EvType:PrSpec (sequence), where EvType is an event type and PrSpec is
a constrained global type. From a semantic point of view, EvType:PrSpec
represents the set of all event traces whose rst event Ev matches the event
type EvType (Ev 2 EvType), and the remaining part is a trace in the set
represented by PrSpec.
{ PrSpec1 | PrSpec2 (fork), where both PrSpec1 and PrSpec2 are constrained
global types, representing the set obtained by shu ing the traces in PrSpec1
with the traces in PrSpec2.</p>
      <p>With these two operators we can already write complex protocols, as we will
see afterwards with some examples.</p>
      <p>Another important aspect that we want to introduce, and that was widely
discussed in [11], is the switch interaction. Such an event can take place when our
events include communicative ones. During an interaction protocol execution, an
agent can ask to another to change its protocol; this can happen only in speci c
circumstances and is an important feature in order to support runtime protocol
switch.</p>
    </sec>
    <sec id="sec-2">
      <title>Template Global Types</title>
      <p>To be able to write more complex protocols, we extended the previous work [11]
introducing Template Global Types. The main di erence of Template Global
Types w.r.t. Constrained Global Types is the presence of parameters inside the
protocol de nition.</p>
      <p>Template Global Types are a sort of \meta-formalism" in the sense they
cannot be directly used as they are. Indeed, they are templates which must be
applied to some arguments in order to obtain plain Constrained Global Types.
Parameters are present only in the Template Global Type de nition: when
Template Global Types are actually used either for runtime veri cation or for
protocol driven behavior generation, all terms must be ground, i.e. variables must
have already been instantiated.</p>
      <p>In order to better explain this new formalism, we introduce some examples.</p>
      <p>Here is how we would have represented a client-server protocol with
Constrained Global Types3.</p>
      <p>SERVER =
(receive request(client1),0):(serve request(client1),0):SERVER.</p>
      <p>An example of correct trace would be
receive request(client1): serve request(client1):</p>
      <p>receive request(client1):...</p>
      <p>where ... indicates that the trace is in nite: Constrained Global Types use
coinduction to easily represent endless sequences.</p>
      <p>The SERVER protocol is a client-server protocol made up by a loop in which the
server receives a serve request from the client1 replying with a receive request.</p>
      <p>Global types can be easily expressed as a set of Prolog equations like the one
de ning SERVER.</p>
      <p>If we would like to change the client we should modify the protocol. This is
not very convenient because our protocols support switch interactions and we
could take advantage of this feature in order to change, for instance, the clients
that communicate with the server.</p>
      <p>Using instead Template Global Types we can avoid this problem, de ning
the protocol as follows:
3 The reader should ignore the 0 placed as second argument in the event type
definition: the number is required to synchronize sequences present in di erent fork
branches; in the examples in this paper no synchronization is necessary and the
argument is xed to 0.</p>
      <p>
        SERVER =
(receive request(var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )),0):(serve request(var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )),0):SERVER.
      </p>
      <p>
        In this way we have written a generic protocol where we can change the
involved agents simply changing the domain of parameter var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ).
      </p>
      <p>
        The domain of var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) is set during the application stage. In fact, a Template
Global Type must be \applied" in order to turn into a \normal" Constrained
Global Type, which can be used as described in our previous work. In
particular, after the application stage, the obtained Constrained Global Type can be
projected. The projection of a Constrained Global Type is still a Constrained
Global Type, where events not involving the agents in the given set are removed.
      </p>
      <p>When we say \project on a set of agents", we mean that, being the protocol
a static and global representation of our system, there are some parts of it that
are interesting for some agents but not for others. In general, an agent is not
present in all the protocol points and it is for this reason that, before allowing
an agent A to \execute" a protocol, we project it onto A, in order to remove all
events which do not involve A from the protocol instance that A will need to
execute.</p>
      <p>Let us consider a more complex example:</p>
      <p>SERVER1 =
(receive request(client1),0):(serve request(client1),0):SERVER1,</p>
      <p>SERVER2 =
(receive request(client2),0):(serve request(client2),0):SERVER2,</p>
      <p>SERVER3 =
(receive request(client3),0):(serve request(client3),0):SERVER3,</p>
      <p>SERVER = SERVER1|(SERVER2|SERVER3).</p>
      <p>In this example, we have three protocol branches, each of which is similar
to the simple protocol described before, combined using a \fork" operator. The
rst branch involves client1, the second client2, the third client3. As we
can see we have to write the same piece of code many times and above all it is
impossible to change agents at runtime, for example during a protocol switch.</p>
      <p>Instead, using Template Global Type we may write:</p>
      <p>
        SERVERT =
(receive request(var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )),0):(serve request(var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )),0):SERVERT,
      </p>
      <p>
        SERVER = finite composition(fork, SERVERT, [var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )]).
      </p>
      <p>
        The construct f inite composition is used to compose many times a
Constrained Global Type with a chosen operator, in this case the fork operator. If
we iterate the var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) parameter on the set containing fclient1; client2; client3g
we get the same results as before, without var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ). The great advantage of this
approach, is that the set over which var(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) ranges can be decided at runtime,
hence allowing the agents to implement a (limited) form of dynamic protocol
generation.
      </p>
      <p>
        In order to better explain the application and projecting phases, we can see
(with a short piece of pseudocode) some sample calls:
SERVERT =
( receive_request (var (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )) ,0):
( serve_request (var (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )) ,0):
      </p>
      <p>
        SERVERT ,
SERVER = finite_composition ( fork , SERVERT , [var (
        <xref ref-type="bibr" rid="ref1">1</xref>
        )]) ,
apply ( SERVER ,
[t(var (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) , [ client1 , client2 , client3 ])] ,
      </p>
      <p>INSTANTIATEDSERVER ),
project ( INSTANTIATEDSERVER , [ agent1 ], PROJECTEDSERVER ).</p>
      <p>The apply predicate instantiates the SERVER protocol returning its
instantiation in INSTANTIATEDSERVER variable. Afterwards, the obtained \normal"
Constrained Global Type without parameters can be projected; in our example, the
projection is on an agent called agent1.</p>
      <p>After the application and projection phases we obtain a \customized"
protocol driven agent. This agent will have to only choose what to do during its
execution on the basis of what is expected by the protocol; the respect of the
global protocol is guaranteed because each agent directly derives from it via
projection, and each agent is guided by the same interpreter, that interrogates the
Prolog library which implements both the protocol de nition and the \apply",
\project", and all the other predicates which are necessary in order to know
what is expected from protocol and what is not.</p>
      <p>The original contribution described in this paper lies in the design
of Template Global Types and in the implementation of the apply
predicate. The other predicates were already implemented. Also, we
integrated the Template Global Types mechanism into both Jason
and JADE.</p>
    </sec>
    <sec id="sec-3">
      <title>4 Integration inside Jason</title>
      <p>Before trying the integration in JADE, we considered a more linear and modular
implementation in Jason.</p>
      <p>Jason is an interpreter for an extended version of AgentSpeak, where each
agent implements the BDI approach; it is a useful framework in order to quickly
create MASs architectures using a Prolog-like language.</p>
      <p>In case of Jason, the implementation was almost straightforward because it
directly supports Prolog code. Hence, it was not necessary to add an interface
between Jason and the Prolog engine, since the Prolog library de ning apply,
project, and all the other predicates necessary for implementing a
protocoldriven behavior, could be used by Jason almost \as it is" (with de nitely minor
syntactic changes).</p>
      <p>The integration of our approach into JADE was instead more challenging.
We had many di erent design choices, but in the end we had to opt for the
architecture in which most of the work is done in Prolog, and JADE is almost
passive. The reason for this choice, better explained later, is that JADE cannot
directly manipulate the representation of cyclic protocols, because of limitations
of the Java-Prolog interface, hence we had to relegate all the operations on the
protocols into the Prolog code, only task of calling Prolog predicates, without
taking any decision.</p>
    </sec>
    <sec id="sec-4">
      <title>5 Integration inside JADE</title>
      <p>JADE is a Java framework where each agent must extend a common Java class
(Agent class). We created a class called AgentP rotocolDriven that extends it.
Each new agent must extend the latter and override some methods:
{ setup, method dedicated to initialize the Prolog engine with all predicates
necessary to the agent;
{ react, method dedicated to the agent reaction after a message reception that
is expected by the protocol;
{ unexpected, method dedicated to the agent reaction after a message
reception that is unexpected by protocol;
{ select messages, method used by the agent in order to select which message
to send between those expected by the protocol.</p>
      <p>Each agent's setup method must recall the inherited method of its parent
(AgentP rotocolDriven class) in which the main behavior implementing the
interpreter's body is created and added. This is a Cyclic Behavior which is
executed any time the agent is selected by the JADE schedule. It is like a loop,
and in each round the agent can check if can do something coherently with the
protocol.</p>
      <p>The parent's setup method does not only create a behavior but it cares
about instantiation and projection of the protocol by calling the Prolog
predicate: instantiate template and project.</p>
      <p>Below we show the Prolog code corresponding to this predicate. It can be
easily seen that the code can be broken down into three basic components (as
already seen in Figure 1):
{ Protocol representation
{ Protocol instantiation
{ Protocol projection
/* Predicate that manage the instantiation</p>
      <p>of a Template Global Type */
instantiate_template_and_project
(Name, ActualParameters , MyName , ProjectedAgents )
:/* Get the Template Global Type from the library ,</p>
      <p>this protocol can have parameter variables */
trace_expr_template (Name, GlobalType ),
/* Preprocessing phase where all the syntactic sugar
and parameter variables are removed */
apply ( GlobalType , ActualParameters , InstantiatedTemplate ),
/* Project protocol on this agent */
project ( MyName , InstantiatedTemplate ,</p>
      <p>ProjectedAgents , ProjectedGlobalType ),
/* Update current state of protocol */
clean_and_record ( MyName ,</p>
      <p>current_state ( ProjectedGlobalType )).</p>
      <p>The above code is invoked in Java as follows.
// Instantiate and project the protocol
new Query (
" instantiate_template_and_project (" +
protocolName + "," +
protocolParameters + "," +
getLocalName () + "," +
"[" + getLocalName () + "])"
). hasSolution ();</p>
      <p>After this sequence of instructions, inside the Prolog engine the projected
protocol of our agent is correctly instantiated and the interpreter can follow it.</p>
      <p>To know the actions allowed by the protocol at a given time (namely, which
messages the agent can send, which one it is allowed to receive), the agent queries
the Prolog library where all the important pieces of information, like the current
state of protocol, are maintained; to do this, in JADE, we have to use a Java
library called JPL, that makes communication between a Java program and the
SWI Prolog engine possible. So, the JADE agents interpreter can, step by step,
ask to Prolog what the agent can or cannot do.</p>
      <p>To receiving or sending a message is explicitly set a priori with other
parameters, all by reading a con guration le.</p>
      <sec id="sec-4-1">
        <title>5.1 Message reception</title>
        <p>When a message is received by an agent, it is put in a queue. When a message is
selected from the queue, in order to check if it is expected by the protocol in the
current state we have created a predicate in Prolog that returns a list containing
all messages that agent can receive.
/* Messages that agent can receive according to</p>
        <p>current state of the protocol */
inMsgs ( MyName , ListToReceive )
:/* Current state of the agent protocol */
recorded ( MyName , current_state ( LastState ), _),
/* Find all possible next state</p>
        <p>where agent is the receiver */
f i n d a l l (
msg ( SenderV , MyName , PerformativeV , ContentV , NewStateV ),
next (
0, LastState ,
msg ( SenderV , MyName , PerformativeV , ContentV ), NewStateV ,
0, MyName ),</p>
        <p>ListToReceive ).
/* If Msg is allow in this state of protocol</p>
        <p>move to new state and save it */
move_to_next ( MyName , Msg )
:/* Current state of the agent protocol */
recorded ( MyName , current_state ( LastState ), Ref ),
/* Try to do a step ,</p>
        <p>if it is valid in the current state */
next (0 , LastState , Msg , NewState , 0, MyName ),
erase ( Ref ),
/* Update current state of protocol */
recorda ( MyName , current_state ( NewState )).</p>
        <p>The JADE agent should only call move to next and execute the react method
if move to next does not fail, and the unexpected method otherwise.
5.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Messages sending</title>
        <p>When an agent wants to send a message it must check which messages are allowed
by the protocol in the current state. In order to do this, the Jade agent can call
the outM sgs Prolog predicate that returns all messages that it can send in the
current state of protocol.
/* Messages that agent can send according to</p>
        <p>current state of the protocol */
outMsgs ( MyName , ListToSend )
:/* Current state of the agent protocol */
recorded ( MyName , current_state ( LastState ), _),
/* Find all possible next state</p>
        <p>where agent is the sender */
f i n d a l l (
msg ( MyName , ReceiverV , PerformativeV , ContentV ),
next (
0, LastState ,
msg ( MyName , ReceiverV , PerformativeV , ContentV ), _ ,
0, MyName ),
ListToSend ).</p>
        <p>The Jade agent should only select one message from the list of messages
returned by the predicate using the select messages method.
The interpreter implementation in JADE was more complicated than in Jason,
indeed we found many more di erent problems.</p>
        <p>The main problems can be summarized in two speci c cases:
{ the JPL library does not support cyclic terms;
{ SWI Prolog assert predicate does not allow a cyclic term as argument.</p>
        <p>It is easy to note that the second problem result from a lack of SWI Prolog
in the management of cyclic terms.</p>
        <p>In order to solve the rst problem, we had to create \super predicates", which
are simply collections of predicates, to ensure that all intermediate executions
are made within Prolog and no cyclic term is returned to JADE.</p>
        <p>The second problem was solved instead using another predicate inside SWI
Prolog; indeed, the record predicate supports cyclic terms and has a behavior
similar to the assert predicate.
6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>A large part of the state of the art analysis presented in this section was published
in [11].</p>
      <p>Our work falls in the research area on self-adaptive systems which spun o
from the wider area of distributed systems, be them based on web services,
software agents, robots, or on other autonomous entities that need to react to
unforeseen changes during their execution. Many surveys have been conducted
to identify the main features of self-adaptive MASs [12, 15, 22, 25, 26] and
interesting and original solutions have been proposed by the research community.</p>
      <p>Proposals for standardizing the concepts involved in the self-adaptation
process include a meta-model to describe intelligent adaptive systems in open
environments [16] and a taxonomy of adaptive agent-based collaboration patterns
[7], for their analysis and exploitation in the area of autonomic service
ensembles. An analysis of linguistic approaches for self-adaptive software is presented
in [24].</p>
      <p>The approaches closer to ours focus on formalizing protocols that the agents
may use during their life, including speci c protocols to deal with unforeseen
events: in these approaches agents are usually free to choose, from a bunch of
usable protocols, which one they prefer, maintaining in this way the freedom
to autonomously self adapt to the new situation but ensuring at the same time
that a feasible interaction pattern is followed. Our work can be included in this
research eld, where we can speak of \protocol enforcement" or \protocol-driven
agents".</p>
      <p>As far as self-adaptiveness of protocol-driven agents is concerned, the main
sources of inspiration were [8, 9, 20, 21]. In [8] the authors propose a dynamic
selfmonitoring and self-regulating approach based on norms to express properties
which allow agents to control their own behavior. In [20] and [21] agents
operating in open and heterogeneous MASs dynamically select protocols, represented
in FIPA AUML, in order to carry collaborative tasks out. Since the selection
is performed locally to the agent, some errors may occur in the process. The
proposed mechanism provides the means for detecting and overcoming them.
Comparison. To the best of our knowledge, there are no approaches similar to
ours presented in the MAS literature.</p>
      <p>In Fornara at al [13, 14, 19] the authors discuss their approach based on
Normative MAS. An arti cial institution catches the institutional events and veri es
them with respect to a normative speci cation. As a result, protocol speci
cations are a special case with respect to a normative speci cation. So, even if the
approach is di erent the aim is similar, i.e. to deal with open multiagent systems
and monitor their correctness w.r.t. a speci cation.</p>
      <p>Normative system approaches o er other advantages for multi agent systems
because agents may integrate their practical reasoning with reasoning about the
normative speci cation, although, also our protocol-driven agents could reason
about trace expressions which are a First Class Entities.</p>
      <p>Other closely related proposals are those by Criado et al. [10] and
Baldoni et al. [4, 3, 17, 5]; in these papers, the authors suggest a way to implement
a monitoring mechanism by exploiting the A&amp;A metamodel and by reifying
commitment-based protocols into artifacts. The proposal is implemented both
on top of Cartago and Jade and on top of Jason/JaCaMo. However, our work
is di erent from theirs, because { at least from the Runtime Veri cation
application { our approach is less invasive, in fact, it works with each possible MASs
architecture and not with only customized implementations.</p>
      <p>If we consider our previous work, before upgrading with Template Global
Types, one reason why our approach was di erent from others, was that the
projection function took protocol speci cations and returned protocol speci
cations expressed in the same language. Usually, projection functions return either
agent stubs/code (common in the MAS community) or protocol speci cations
in a language suitable for expressing the agent local viewpoint, di erent from
the language for expressing the global one (common in the session types
community). Having a unique formalism for protocol speci cation both at the global
and at the local level is a simpler and more uniform approach.</p>
      <p>In this paper we have shown the bene ts of using parameters inside
protocol speci cations; in this way we have made protocols much more generic and
exible, also moving a step towards dynamic protocol generation.
7</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>
        In this paper we have presented our proposal to make the management of
protocols more exible and to move a step forward their dynamic generation. Two
working prototypes exist, demonstrating the feasibility of our approach. While
integrating our parametric protocol-driven agents into Jason was easy because
of its native support to Prolog, integrating them into JADE was not. However,
that attempt { which, although not trivial, was successful { makes us con dent
in the possibility to integrate our approach into almost any agent framework,
given that an interface between the framework language and Prolog is provided.
11. A. F. Davide Ancona, Daniela Briola and V. Mascardi. Global protocols as rst
class entities for self-adaptive agents. AAMAS2015, 2015.
12. G. Di Marzo Serugendo, M.-P. Gleizes, and A. Karageorgos. Self-organization in
multi-agent systems. Knowl. Eng. Rev., 20(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ):165{189, 2005.
13. N. Fornara, F. Vigan, and M. Colombetti. Agent communication and arti cial
institutions. Autonomous Agents and Multi-Agent Systems, 14(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ):121{142, 2007.
14. N. Fornara, F. Vigan, M. Verdicchio, and M. Colombetti. Arti cial institutions: a
model of institutional reality for open multiagent systems. Arti cial Intelligence
and Law, 16(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):89{105, 2008.
15. M.-P. Gleizes. Self-adaptive complex systems. In M. Cossentino, M. Kaisers,
K. Tuyls, and G. Weiss, editors, Multi-Agent Systems, volume 7541 of Lecture
Notes in Computer Science, pages 114{128. Springer Berlin Heidelberg, 2012.
16. T. Juan and L. Sterling. The ROADMAP meta-model for intelligent adaptive
multi-agent systems in open environments. In P. Giorgini, J. Muller, and J. Odell,
editors, Agent-Oriented Software Engineering IV, volume 2935 of Lecture Notes in
Computer Science, pages 53{68. Springer Berlin Heidelberg, 2004.
17. C. B. M. Baldoni and F. Capuzzimati. Reasoning about social relationships with
      </p>
      <p>Jason. Autonomous Agents and Multi-Agent Systems, 2014.
18. V. Mascardi and D. Ancona. Attribute global types for dynamic checking of
protocols in logic-based multiagent systems. TPLP, 13(4-5-Online-Supplement), 2013.
19. D. Okouya, N. Fornara, and M. Colombetti. An infrastructure for the design
and development of open interaction systems. In M. Cossentino, A. El
Fallah Seghrouchni, and M. Winiko , editors, Engineering Multi-Agent Systems,
volume 8245 of Lecture Notes in Computer Science, pages 215{234. Springer Berlin
Heidelberg, 2013.
20. J. G. Quenum, S. Aknine, O. Shehory, and S. Honiden. Dynamic protocol selection
in open and heterogeneous systems. In Proceedings of the 2006 IEEE/WIC/ACM
International Conference on Intelligent Agent Technology, Hong Kong, China,
1822 December 2006, pages 333{341, 2006.
21. J. G. Quenum, F. Ishikawa, and S. Honiden. Protocol selection alongside service
selection and composition. In 2007 IEEE International Conference on Web Services
(ICWS 2007), July 9-13, 2007, Salt Lake City, Utah, USA, pages 719{726, 2007.
22. R. de Lemos, H. Giese, H. A. Muller, et al. Software engineering for self-adaptive
systems: A second research roadmap. In Software Engineering for Self-Adaptive
Systems II, pages 1{32, 2013.
23. A. S. Rao and M. P. George . BDI agents: From theory to practice. In V. R.</p>
      <p>
        Lesser and L. Gasser, editors, Proceedings of the First International Conference
on Multiagent Systems, June 12-14, 1995, San Francisco, California, USA, pages
312{319. The MIT Press, 1995.
24. G. Salvaneschi, C. Ghezzi, and M. Pradella. An analysis of language-level support
for self-adaptive software. ACM Trans. Auton. Adapt. Syst., 8(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ):7:1{7:29, 2013.
25. D. Weyns and M. George . Self-adaptation using multiagent systems. Software,
      </p>
      <p>
        IEEE, 27(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ):86{91, 2010.
26. F. Zambonelli, N. Bicocchi, G. Cabri, L. Leonardi, and M. Puviani. On
selfadaptation, self-expression, and self-awareness in autonomic service component
ensembles. In Self-Adaptive and Self-Organizing Systems Workshops (SASOW),
2011 Fifth IEEE Conference on, pages 108{113, 2011.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D.</given-names>
            <surname>Ancona</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Barbieri</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Mascardi</surname>
          </string-name>
          .
          <article-title>Constrained global types for dynamic checking of protocol conformance in multi-agent systems</article-title>
          . In S. Y. Shin and J. C. Maldonado, editors,
          <source>Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC '13</source>
          ,
          <string-name>
            <surname>Coimbra</surname>
          </string-name>
          , Portugal, March
          <volume>18</volume>
          -22,
          <year>2013</year>
          , pages
          <fpage>1377</fpage>
          {
          <fpage>1379</fpage>
          . ACM,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>D.</given-names>
            <surname>Ancona</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Drossopoulou</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Mascardi</surname>
          </string-name>
          .
          <article-title>Automatic generation of selfmonitoring MASs from multiparty global session types in Jason</article-title>
          . In M. Baldoni,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Dennis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Mascardi</surname>
          </string-name>
          , and W. Vasconcelos, editors,
          <source>Declarative Agent Languages and Technologies X - 10th International Workshop</source>
          , DALT 2012, Valencia, Spain, June 4,
          <year>2012</year>
          , Revised Selected Papers, volume
          <volume>7784</volume>
          of Lecture Notes in Computer Science, pages
          <volume>76</volume>
          {
          <fpage>95</fpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Baldoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Baroglio</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Capuzzimati</surname>
          </string-name>
          .
          <article-title>A commitment-based infrastructure for programming socio-technical systems</article-title>
          .
          <source>ACM Trans. Internet Technol</source>
          .,
          <volume>14</volume>
          (
          <issue>4</issue>
          ):
          <volume>23</volume>
          :1{
          <fpage>23</fpage>
          :
          <fpage>23</fpage>
          ,
          <string-name>
            <surname>Dec</surname>
          </string-name>
          .
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>M.</given-names>
            <surname>Baldoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Baroglio</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Capuzzimati</surname>
          </string-name>
          .
          <article-title>Typing multi-agent systems via commitments</article-title>
          . In F. Dalpiaz,
          <string-name>
            <given-names>J.</given-names>
            <surname>Dix</surname>
          </string-name>
          , and M. van Riemsdijk, editors,
          <source>Engineering Multi-Agent Systems</source>
          , volume
          <volume>8758</volume>
          of Lecture Notes in Computer Science, pages
          <volume>388</volume>
          {
          <fpage>405</fpage>
          . Springer International Publishing,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>M.</given-names>
            <surname>Baldoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Baroglio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Capuzzimati</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Micalizio</surname>
          </string-name>
          .
          <article-title>Programming with commitments and goals in JaCaMo+</article-title>
          .
          <source>In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, AAMAS '15</source>
          , pages
          <fpage>1705</fpage>
          {
          <fpage>1706</fpage>
          ,
          <string-name>
            <surname>Richland</surname>
            ,
            <given-names>SC</given-names>
          </string-name>
          ,
          <year>2015</year>
          . International Foundation for Autonomous Agents and
          <string-name>
            <given-names>Multiagent</given-names>
            <surname>Systems</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>D.</given-names>
            <surname>Briola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Mascardi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Ancona</surname>
          </string-name>
          .
          <article-title>Distributed runtime veri cation of JADE and Jason multiagent systems with prolog</article-title>
          . In L.
          <string-name>
            <surname>Giordano</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Gliozzi</surname>
          </string-name>
          , and G. L. Pozzato, editors,
          <source>Proceedings of the 29th Italian Conference on Computational Logic</source>
          , Torino, Italy, June 16-18,
          <year>2014</year>
          ., volume
          <volume>1195</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <volume>319</volume>
          {
          <fpage>323</fpage>
          . CEUR-WS.org,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>G.</given-names>
            <surname>Cabri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Puviani</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          .
          <article-title>Towards a taxonomy of adaptive agentbased collaboration patterns for autonomic service ensembles</article-title>
          .
          <source>In Collaboration Technologies and Systems (CTS)</source>
          , 2011 International Conference on, pages
          <volume>508</volume>
          {
          <fpage>515</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>C.</given-names>
            <surname>Chopinaud</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. El</given-names>
            <surname>Fallah-Seghrouchni</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Taillibert</surname>
          </string-name>
          .
          <article-title>Automatic generation of self-controlled autonomous agents</article-title>
          .
          <source>In Intelligent Agent Technology</source>
          , IEEE/WIC/ACM International Conference on, pages
          <volume>755</volume>
          {
          <fpage>758</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>M.</given-names>
            <surname>Coppo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dezani-Ciancaglini</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Venneri</surname>
          </string-name>
          .
          <article-title>Self-adaptive monitors for multiparty sessions</article-title>
          .
          <source>In 22nd Euromicro International Conference on Parallel, Distributed, and Network-Based Processing, PDP 2014</source>
          , pages
          <fpage>688</fpage>
          {
          <fpage>696</fpage>
          . IEEE,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>N.</given-names>
            <surname>Criado</surname>
          </string-name>
          , E. Argente,
          <string-name>
            <given-names>P.</given-names>
            <surname>Noriega</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V. J.</given-names>
            <surname>Botti</surname>
          </string-name>
          .
          <article-title>Reasoning about constitutive norms in BDI agents</article-title>
          .
          <source>Logic Journal of the IGPL</source>
          ,
          <volume>22</volume>
          (
          <issue>1</issue>
          ):
          <volume>66</volume>
          {
          <fpage>93</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>