=Paper= {{Paper |id=Vol-2404/paper17 |storemode=property |title=Extending Message Handlers with Pattern Matching in the Jadescript Programming Language |pdfUrl=https://ceur-ws.org/Vol-2404/paper17.pdf |volume=Vol-2404 |authors=Giuseppe Petrosino,Federico Bergenti |dblpUrl=https://dblp.org/rec/conf/woa/PetrosinoB19 }} ==Extending Message Handlers with Pattern Matching in the Jadescript Programming Language== https://ceur-ws.org/Vol-2404/paper17.pdf
                                      Workshop "From Objects to Agents" (WOA 2019)


Extending Message Handlers with Pattern Matching
     in the Jadescript Programming Language
                                            Giuseppe Petrosino, Federico Bergenti
                                 Dipartimento di Scienze Matematiche, Fisiche e Informatiche
                                                 Università degli Studi di Parma
                                                      43124 Parma, Italy
                                 giuseppe.petrosino@studenti.unipr.it, federico.bergenti@unipr.it


   Abstract—Software agents are characterized by sophisticated      particular, this paper details one of the latest features of the
messaging capabilities that support distributed problem solving     language that has been recently included to ease the reception
and that provide the basic ingredients for interoperability in      of structured messages and to support the management of
open agent-based systems. Jadescript is an agent-oriented pro-
gramming language that has been recently proposed to offer pro-     complex conversations among agents. Jadescript now provides
grammers the abstractions that characterize agents to concretely    a specific support for pattern matching that was carefully
and effectively support the implementation of complex agent-        integrated with the type system of the language to readily
based systems. As expected, the abstractions that Jadescript        state the conditions used to route messages to proper message
provides include native support for the advanced messaging          handlers. The use of the new support for pattern matching, as
capabilities that characterize agents. This paper describes a
recent development of Jadescript that extends the language with     described in Section IV, allows programmers to clearly state
a native support for pattern matching designed to simplify the      the intended scope of message handlers, and it ultimately helps
reception of structured messages and to ease the management         to further raise the level of abstraction of the language with
of complex conversations. The proposed support for pattern          respect to previous versions (e.g., [6], [7]).
matching is intimately correlated with the type system of the          Even if the early JADE prototypes date back more than
language, and it can be used to effectively associate inbound
messages with specific handlers. From the point of view of          twenty years, JADE is still one of the most popular agent
programmers, the proposed support for pattern matching allows       platforms [8], and it is still used for academic and industrial
clearly expressing the intended scope of message handlers, and      projects [8]. In addition, JADE is the solid base for other
it contributes to raise the level of abstraction of the language.   software platforms like WADE (Workflows and Agents Devel-
   Index Terms—Jadescript, JADE, agent-oriented programming,        opment Environment) [9], which supports agent-based business
software agents
                                                                    process management, AMUSE (Agent-based Multi-User Social
                                                                    Environment) [10], which focuses on agent-based multi-player
                      I. I NTRODUCTION
                                                                    games (e.g., [11]), and WANTS (Workflows and AgeNTS) [12],
   Since the introduction of software agents (e.g., [1]), the       which routinely participates in the management of a nation-
interest in AOP (Agent-Oriented Programming) (e.g., [2]) has        wide telecommunication network. Jadescript has been recently
been constantly increasing mainly because AOP is expected           added to the list of projects that use JADE in order to offer a
to deliver effective tools to design and implement complex          new way to reduce the complexity of building JADE systems,
agent-based systems. AOP languages shield programmers from          and to provide concrete support for the adoption of the ab-
many fine-grained details related, for example, to the routing      stractions that most substantially characterize JADE, namely,
of messages or to the deployment of agents to network hosts.        agents, behaviours [13], and ontologies [14]. Jadescript is
AOP languages promote high-level views of agent-based sys-          intended to bring the power of JADE to programmers that
tems that allow programmers to concentrate on the problems          are not interested in directly using an agent platform, but that
at hand, rather than focusing on fine-grained details that tend     are interested in taking advantage of the beneficial features of
to distract attention from problems. All things considered,         software agents. Jadescript is meant to enable the effective use
AOP languages allow programmers to reason on agents at              of agents as software components (e.g., [15]), and it is already
a high level of abstraction because they provide support for        planned that it would allow the adoption of a high-level agent
the abstractions that characterize the agent-oriented view of       model (e.g., [16]) in the near future.
software systems promoted, for example, by the IEEE FIPA               This paper is organized as follows. Section II provides a
Standards Committee (www.fipa.org) or by the literature on          brief survey of some of the most relevant languages proposed
AOSE (Agent-Oriented Software Engineering) [3].                     to support the development of software agents and agent-based
   The main objective of this paper is to summarize the current     systems. Section III describes the major features of Jadescript,
state of the development of Jadescript [4], an AOP language         and it lists the elements of the language provided to support
whose main purpose is to help programmers to deal with the          message passing. Section IV describes the new support for
complexity of building real-world agent-based systems using         pattern matching. Finally, Section V concludes the paper and
JADE (Java Agent DEvelopment framework) (e.g., [5]). In             outlines major future developments of the discussed research.




                                                                113
                                        Workshop "From Objects to Agents" (WOA 2019)

                      II. R ELATED W ORK                               by listing commitment rules that refer to future actions. The
                                                                       communication among agents is accomplished by exchanging
   Several AOP languages have been already proposed in                 simple messages, which are classified into three types: inform
the literature, and for some of them, the needed tools, like           of a belief, request to perform an action, and unrequest of a
interpreters and compilers, have also been implemented. Doc-           previously requested action.
umented experiments on such languages often show that pro-                PLAnning Communicating Agents (PLACA) [17] is a direct
gramming languages specifically designed for AOP are con-              descendant of AGENT-0, and it extends the capabilities of
venient for the development of complex agent-based systems.            AGENT-0 by providing new linguistic constructs and new
However, most of the languages in use to program software              mental categories. The major improvement with respect to
agents and agent-based systems are general-purpose OOP                 AGENT-0 is that agents do not need to request for specific
(Object-Oriented Programming) languages, even if agents and            actions to call for cooperation, but they can refer to high-
objects differ in important ways, which include, most notably,         level goals. Such an improvement has two major benefits.
the degree of autonomy. Objects directly and inevitably invoke         First, agent communication is lighter because the number of
methods on other objects, while agents express their intentions        messages is possibly reduced. Second, it allows agents to focus
to delegate some of their goals to other agents.                       on the desired results of actions, thus easily adding cooperative
   AOP languages are based on specific agent models, and               planning capabilities to agents.
they provide linguistic constructs to ease the adoption of                Concurrent M ETATE M [20] is an AOP language based
such models at a high level of abstraction. Ease of use and            on temporal logics. In this language, sets of rules are used
expressivity are common characteristics of AOP languages.              to describe the lifecycle of agents and the execution of
However, AOP languages differ significantly in terms of the            actions. Such rules can be grouped into temporal rules and
selected agent mental attitudes (if any), of the integration with      non-temporal rules. Non-temporal rules are used to support
an agent platform (if any), and of the underlying programming          application-specific reasoning, while temporal rules are used
paradigm and implementation language. The literature pro-              to govern agents and they are classified into three categories:
vides multiple classifications of AOP languages that consider          start rules, step rules and sometimes rules. In Concurrent
such a diversified landscape. A recent survey [17] proposes            M ETATE M, agents act asynchronously and they interact by
a classification of AOP languages that is based on mental              message passing. The language does not mandate a structure
attitudes. It identifies the following classes of languages: AOP       for messages, and messages are nothing but typed events.
languages, BDI (Belief-Desire-Intention) languages, hybrid                AgentSpeak [21] is an important example of a declarative
languages, and other languages. Such a classification acknowl-         AOP language. In AgentSpeak, an agent program is described
edges that BDI languages follow the AOP paradigm, but, for             as a tuple that collects beliefs, events (internal and exter-
their notable relevance in literature, it reserves special attention   nal), actions, plans, and intentions. The approach adopted by
to them by listing BDI languages in a separate category.               AgentSpeak allows to declaratively program agents based on
Another appreciated survey [18] proposes a classification              the BDI model. Jason [22] can be considered the first usable
in which languages are divided into imperative, declarative,           implementation of AgentSpeak. Jason is tightly integrated with
and hybrid. It is worth noting that, in both classifications,          Java, and it extends AgentSpeak by providing all features
the languages that adhere to the declarative programming               needed to effectively adopt it for the implementation of com-
paradigm are the most numerous because they are natively               plex agent-based systems. Jason is currently one of the most
well-suited to implement automated reasoning. On the con-              popular tools to adopt the declarative programming paradigm
trary, the languages that adopt the imperative programming             for the implementation of agent-based systems.
paradigm are just a minority, and they are frequently obtained            3APL (An Abstract Agent Programming Language) [23]
by extending procedural programming languages with specific            is an AOP language that includes abstractions from both
linguistic constructs to support agents and related abstractions.      declarative and imperative programming paradigms. Agents
In the rest of this section, some of the most relevant AOP             in 3APL are based on the BDI model and for this reason the
languages are briefly described. Only the languages that share         language provides a set of abstractions to implement agents
features with Jadescript are considered.                               with reasoning capabilities. The mental states of agents consist
   The acronym AOP was first introduced by Shoham [19]                 of sets of goals and beliefs, while sets of practical reasoning
together with AGENT-0, a first example of the application of           rules are used to modify mental states and to generate plans to
the AOP paradigm. In AGENT-0, a computation is represented             achieve goals. There are two official implementations of the
by a sequence of collaborative and/or competitive interactions         support tools for 3APL, one in Java and one in Haskell.
among agents. Each agent has a mental state that is composed              JACK [24] is an agent platform commercialized by AOS
of beliefs and commitments. The mental state of an agent               (www.aosgrp.com). It supports the development of agent-
changes over time, which is represented as a sequence of dis-          based systems composed of agents that are programmed in
crete steps. Agents share a sense/act cycle in which incoming          terms of the BDI model. One of the main elements of the
messages are processed, beliefs and commitments are updated,           JACK platform is JAL (JACK Agent Language), an AOP
and actions are executed. An AGENT-0 program is written by             language that is defined as a superset of Java. JAL extends Java
enumerating initial states for beliefs and commitments, and            by introducing features borrowed from logic languages, and it




                                                                   114
                                      Workshop "From Objects to Agents" (WOA 2019)

provides statements to allow the construction of plans. One                           III. JADESCRIPT IN B RIEF
of the most relevant features of JAL is the native support for
organizations and teams, which is provided to enable effective         This paper introduces a new feature of Jadescript intended
distributed problem solving.                                        to embed pattern matching in the core of the language. Such a
   SEA L (Semantic web-Enabled Agent Language) [25], [26]           new feature represents a first attempt at supporting the declar-
is a DSL (Domain-Specific Language) to program agent-based          ative programming paradigm in Jadescript, and it is designed
systems for the Semantic Web. SEA L addresses some of               to make the aims and scope of message handlers explicit. The
the limitations of other development frameworks intended            remaining of this section briefly describes Jadescript and, in
to implement agent-based systems for the Semantic Web. A            particular, it highlights the elements of the language provided
specific modeling language, called SEA ML (Semantic web-            to send and receive messages.
Enabled Agent Modeling Language) [27], is available for the            Jadescript is a novel programming language designed with
graphical modeling of agent-based systems.                          the explicit intent to make agent-oriented code similar to
   CLAIM (A Computational Language for Autonomous Intel-            semantically-equivalent pseudocode. It supports the develop-
ligent and Mobile Agents) [28] is an AOP language designed          ment of JADE agents and agent-based systems, and it is char-
with a focus on agent mobility. CLAIM supports holarchies           acterized by distinctive features designed to make the language
because agents can be built by hierarchically composing other       very expressive. Notably, the language shares characteristics
agents. CLAIM agents have two types of reasoning capa-              with popular scripting languages like, for example, the use of
bilities: forward reasoning, for reactive tasks, and backward       semantically-relevant indentation and collection types.
reasoning, for goal-driven tasks. Agent communication is per-          Every Jadescript source code is intended to be compiled
formed by message passing, and the underlying agent platform        into one or more Java source codes, which are then compiled
uses a set of specific messages to support agent mobility.          into Java bytecode using any off-the-shelf Java compiler. Such
                                                                    a design choice was taken primarily to grant interoperability
   Jadex [29] is a framework to implement agent-based sys-
                                                                    with Java, and to enable Jadescript agents to directly use
tems originally designed to work on top of JADE. A Jadex
                                                                    libraries and frameworks already available for the Java virtual
agent is equipped with a BDI reasoning engine, and it is pro-
                                                                    machine. Despite the close relationship with Java, Jadescript
grammed in terms of beliefs, goals, and plans. Jadex combines
                                                                    is not an OOP language, rather it is an AOP language that
the imperative and the declarative paradigms because it uses
                                                                    follows the path originally traced by AGENT-0. The minimal
ADFs (Agent Definition Files) to define beliefs, goals and
                                                                    interface to Java, which is still present in Jadescript to support
plans, while it uses Java to procedurally define plans. Note
                                                                    integration with the features of the underlying Java virtual
that, even if it does not introduce a specific syntax, Jadex
                                                                    machine, is considered low-level and its use is discouraged.
underpins an AOP language, and for this reason it is often
treated as such. Jadex is intended for practical and commercial        Jadescript is a statically-typed language, and its type system
use, and a number of real-world applications that use it are        comprises the following data types:
documented in the literature. Besides its name, the framework         • Primitive types;
is no longer tightly linked with JADE because now it provides         • Collection types;
the needed tools to interface various agent platforms.                • Ontology types;

   SARL [30] is an AOP language that follows the imperative           • Agent types; and

programming paradigm. It can be considered as an extension            • Behaviour types.

of the Xtend language [31], which is a dialect of Java that         Jadescript provides the following primitive types that are
it is used to implement the procedural parts of SARL agents.        immediately mapped to corresponding Java types: boolean,
SARL is platform-agnostic, even if it is commonly used with a       double, float, integer, and text. It provides collec-
dedicated agent platform called Janus. One of its most peculiar     tion types in terms of lists and maps of typed values. It
features is the support for holarchies by means of specific         supports structured types in terms of ontology types, which
linguistic constructs. SARL compiler is implemented using           can be declared in the scope of ontology declarations us-
Xtext [32], which the same development framework used for           ing concept, action, predicate, and proposition
the Jadescript compiler.                                            declarations. Ontology types are declared (with the exception
   JADEL [33]–[35] is the direct predecessor of Jadescript. It is   of proposition declarations) in terms of sets of typed
an AOP language that targets the Java virtual machine, and it is    properties, and they can include properties inherited from
intended to support the construction of agents and agent-based      other ontology types. Finally, agent and behaviour types are
systems using JADE. JADEL provides specific constructs for          provided for the manipulation of agents and behaviours. Values
message passing, for event handling, and for the definition of      of such types cannot be used freely in expressions, and they
agents, behaviours, and ontologies. It has direct support for       can be used only in the scope of a limited number of linguistic
FIPA interaction protocols [36], and its operational semantics      constructs. The restrictions on the use of agent and behaviour
is formalized [37]. Finally, its procedural parts are based on      types ensure that programmers cannot freely manipulate agents
the Xtend language, and its major support tools are a compiler      and behaviours, and they are coherent with the underlying
and an Eclipse plugin, both built using Xtext.                      management of the same abstractions in JADE.




                                                                115
                                      Workshop "From Objects to Agents" (WOA 2019)

   In order to improve readability, Jadescript is designed to          1 ontology TemperatureSensor
support a limited form of type inference. The Jadescript               2   proposition nonnegative
compiler can identify when new variables are declared, and             3   proposition negative
it can infer the types of new variables in correspondence of           4   concept sample(value as double)
assignment statements. Similarly, the Jadescript compiler can          5

infer the types of properties from the types of expressions used       6   cyclic behaviour ReceiveNonNegative
as initializers. Even if the supported form of type inference is       7     uses ontology TemperatureSensor
sufficient to improve readability, it is worth noting that it is       8

limited with respect to the form of type inference that other          9     on inform m
languages provide. Actually, the types of some of the elements       10        when content of m is sample do
referenced in source codes like, for example, the types of           11        s = content of m
the formal parameters of procedures, need to be explicitly           12

stated because the language does not provide to the compiler         13        if value of s >= 0 do
sufficient information to infer them.                                14          send inform nonnegative
   Agents are the core abstractions used to build Jadescript         15            to sender of m
agent-based systems, and they depend completely on JADE              16        else do
agents. Each Jadescript agent operates within a JADE con-            17          send inform s to aid of agent
tainer, it is identified by a unique AID (Agent IDentifier), and     18

it can be in one of several lifecycle states. Agents operate         19    cyclic behaviour ReceiveNegative
by engaging one or more behaviours. For each agent, active           20      uses ontology TemperatureSensor
behaviours are executed following the characteristic non-            21

preemptive scheduling mechanisms of JADE behaviours [5].             22      on inform m
Currently, Jadescript supports two types of behaviour: one           23        when content of m is sample do
shot behaviours and cyclic behaviours. Interested readers            24        s = content of m
should consult the official JADE documentation [5] for de-           25

tailed descriptions of the behaviour scheduling mechanisms           26        if value of s < 0 do
and of possible agent-lifecycle states.                              27          send inform negative
   The runtime state of agents and behaviours is stored in           28            to sender of m
properties, which are declared using the keyword property            29        else do
in the scope of agent and behaviour declarations. Similarly,         30          send inform s to aid of agent
ontology types are also declared in terms of properties. Prop-
erties can be accessed in expressions using the of operator,
                                                                     Fig. 1. Example of the limitations of the traditional approach used to associate
which mimics how the preposition of is used in English as a          incoming messages to appropriate message handlers in Jadescript.
synonym of belonging to. Agent and behaviour declarations
can also include parameterized blocks of procedural code in
the scope of function and procedure declarations.                    Event handlers, just like functions and procedures, have a body
   Jadescript agents are fully interoperable with JADE agents,       where procedural code is included by means of statements
and they communicate by exchanging FIPA ACL (Agent                   and expressions. Moreover, message handlers can specify a
Communication Language) messages. Jadescript provides a set          when clause that is used to state a condition that interesting
of linguistic constructs to send and receive messages, with          messages are required to satisfy. In detail, Jadescript allows
message reception expressed in terms of a specific type of           the use of an expression after the optional keyword when in
event. Jadescript agents can react to events using dedicated         the declaration of a message handler to allow programmers
linguistic constructs. Future versions of the language are           to state a condition that messages must satisfy in order to
planned to support application-specific types of events, for         be extracted from the message queue of the agent. Such
example, to let agents easily interface with the physical world      expressions are not arbitrary Boolean expressions, but they
(e.g. [38]) through the underlying agent container. For the time     are conditions, which can be composed using the ordinary
being, Jadescript supports only three types of events:               logical connectives, on the performative, the ontology, and the
   • Agent-lifecycle events, handled by the on create and            type of the content of messages. For the sake of readability, a
      the on destroy constructs in agent declarations, to            condition on the performative of messages can also be declared
      allow agents to react to changes of their lifecycle states;    by stating the accepted performative after the keyword on
   • Behaviour-activation events, handled by the on create           so that, for example, on inform can be used to declare a
      construct in behaviour declarations, to support the initial-   message handler that processes inform messages. Fig. 1 shows
      ization of the internal state of behaviours; and               an example of the use of the discussed mechanism to route
   • Message events, handled by the on message construct             inbound messages to appropriate message handlers. Note that
      and its variants in behaviour declarations, to allow the       the described mechanism also provides valuable compile-time
      reception of messages with specific characteristics.           information about handled messages that is used to infer types.




                                                                 116
                                     Workshop "From Objects to Agents" (WOA 2019)

      IV. PATTERN M ATCHING IN M ESSAGE H ANDLERS                   1   cyclic behaviour ReceiveNonNegative
                                                                    2     uses ontology TemperatureSensor
   The urge to extend Jadescript with an improved mechanism         3
to declare message handlers is mainly motivated by the need         4     on inform m
to provide more expressive linguistic constructs to associate       5       when
inbound messages with appropriate handlers. In particular, the      6         content of m matches sample(v) and
major weakness of the described support for message dispatch-       7         v >= 0 do
ing becomes evident when several behaviours work on similar         8       send inform nonnegative
messages. Consider, for example, the behaviours shown in            9         to sender of m
Fig. 1. If the two behaviours are activated by the same agent,    10
then they would work on the same message queue, and they          11    cyclic behaviour ReceiveNegative
would handle messages with the same ontology, the same            12      uses ontology TemperatureSensor
performative, and the same content type. However, behavior        13
ReceiveNonNegative is designed to handle messages for             14      on inform m
which the property value is nonnegative, while behaviour          15        when
ReceiveNegative has the opposite requirement on the               16          content of m matches sample(v) and
same property. In this example, both behaviours reinsert the      17          v < 0 do
received message into the message queue of the agent when         18        send inform negative
the message does not meet the intended requirements. Even if      19          to sender of m
the reinsertion into the message queue ensures that messages
are eventually processed by appropriated handlers, the example
                                                                  Fig. 2. Example of message handlers that use the matches operator with
emphasizes that the current support for message dispatching       appropriate ontology patterns.
is probably too limited.
   A simple solution to the mentioned weakness of the support
for message dispatching that Jadescript has been providing           The pattern matching mechanism for composite patterns
since its early releases could be based on the possibility of     works by comparing each term of the pattern, from left to
allowing generic Boolean expressions to guard the activation      right, to the corresponding value at the left-hand side of the
of handlers. However, such a solution is not fully satisfactory   matches operator. In the case of a literal term, the value
because generic Boolean expressions could have uncontrol-         represented by the literal is simply compared for equality.
lable side effects. This is the reason why Jadescript has been    The same sort of comparison is performed for identifier terms
recently extended to allow the use of pattern matching in the     that refer to variables already present in the current scope.
guard expressions of message handlers. In particular, the new     However, if the pattern refers to an identifier that cannot
support for pattern matching in message handlers is made          be resolved to a declared variable in the current scope, the
available to programmers by means of a new binary operator        matches operator binds the identifier to the corresponding
called matches that allows to compare a value against a           values in the left-hand side operand. Such bindings are then
specified pattern. Such an operator evaluates to true when        treated as if they were declared variables. In particular, when
the value matches to the provided pattern, and it evaluates to    the checking of a pattern results in the implicit declaration of a
false otherwise. Currently, Jadescript supports the following     variable, such a new variable becomes accessible in the current
four types of patterns:                                           scope. Similarly, if the term to be checked is an underscore
  • Ontology patterns, used to check a value of an ontology       placeholder, any value is considered to be a valid match
    type against a pattern;                                       because the pattern is treated as a dummy variable. Finally,
  • List patterns, used to check a list against a pattern;        when the term to be checked is a sub-pattern, the described
  • Map patterns, used to check a map against a pattern; and      matching mechanism is performed recursively. Fig. 2 shows
  • Regular-expression patterns, used to check if a text sat-     an example of the use of ontology patterns.
    isfies a regular expression.                                     List and map patterns are similar to list and map literals,
                                                                  with the addition of the possibility of using the Prolog-inspired
Ontology, list, and map patterns are called composite patterns
                                                                  optional pipe symbol to separate the head from the tail (also
because they are defined as sequences of terms. Each term in
                                                                  known as rest) of the collection. Note that the optional pipe
a composite pattern can be:
                                                                  symbol is particularly relevant because it is used to express
  • A text, integer, float, double, or boolean                    patterns that match lists and maps of unknown size.
    literal;                                                         Regular expression patterns, as the name suggests, are
  • A variable identifier, possibly not yet declared in the       regular expressions for strings of characters. The matches
    current scope;                                                operator checks if the value at the left-hand side of the operator
  • An underscore placeholder symbol (_), which acts as a         is a text, and if it is, returns true if the text matches the
    dummy variable; or                                            pattern. The syntax of this type of patterns is inspired from
  • A pattern, which acts as a sub-pattern.                       the syntax of regular-expression literals in Javascript.




                                                              117
                                               Workshop "From Objects to Agents" (WOA 2019)

                            V. C ONCLUSION
                                                                                   [18] R. H. Bordini, L. Braubach, M. Dastani, A. El Fallah Seghrouchni, J. J.
   This paper described a recent development of Jadescript that                         Gomez-Sanz, J. Leite, G. O’Hare, A. Pokahr, and A. Ricci, “A survey
extends the language with a native support for pattern match-                           of programming languages and platforms for multi-agent systems,”
                                                                                        Informatica, vol. 30, no. 1, 2006.
ing. The proposed support for pattern matching is intimately                       [19] Y. Shoham, “AGENT-0: A simple agent language and its interpreter,” in
related with the type system of the language, and it can be                             Proc. 9th National Conference on Artificial Intelligence (AAAI), vol. 91,
used to effectively associate inbound messages with specific                            1991, pp. 704–709.
                                                                                   [20] M. Fisher, “A survey of concurrent MetateM – The language and its
handlers. From the point of view of programmers, such a                                 applications,” in Temporal Logic. Springer, 1994, pp. 480–505.
new feature of the language allows clearly expressing the                          [21] A. S. Rao, “AgentSpeak(L): BDI agents speak out in a logical com-
intended aims and scope of message handlers, and it ultimately                          putable language,” in MAAMAW 1996: Agents Breaking Away. Springer,
                                                                                        1996, pp. 42–55.
contributes to raise the level of abstraction of the language.
                                                                                   [22] R. H. Bordini, J. F. Hübner, and M. Wooldridge, Programming multi-
                                                                                        agent systems in AgentSpeak using Jason. John Wiley & Sons, 2007.
                               R EFERENCES
                                                                                   [23] K. V. Hindriks, F. S. De Boer, W. Van der Hoek, and J.-J. C. Meyer,
 [1] J. Bradshaw, Software Agents. MIT Press, 1997.                                     “Agent programming in 3APL,” Autonomous Agents and Multi-Agent
 [2] Y. Shoham, “An overview of agent-oriented programming,” in Software                Systems, vol. 2, no. 4, pp. 357–401, 1999.
     Agents, J. Bradshaw, Ed., vol. 4. MIT Press, 1997, pp. 271–290.               [24] M. Winikoff, “JACK intelligent agents: An industrial strength platform,”
 [3] F. Bergenti, M.-P. Gleizes, and F. Zambonelli, Eds., Methodologies and             in Multi-Agent Programming. Springer, 2005, pp. 175–193.
     Software Engineering for Agent Systems: The Agent-Oriented Software           [25] S. Demirkol, M. Challenger, S. Getir, T. Kosar, G. Kardas, and
     Engineering Handbook. Springer, 2004.                                              M. Mernik, “SEA L: A domain-specific language for Semantic Web en-
 [4] F. Bergenti, S. Monica, and G. Petrosino, “A scripting language for                abled multi-agent systems,” in Proc. Federated Conference on Computer
     practical agent-oriented programming,” in Proc. 8th ACM SIGPLAN                    Science and Information Systems (FedCSIS 2012), 2012, pp. 1373–1380.
     International Workshop on Programming Based on Actors, Agents, and            [26] M. Challenger, M. Mernik, G. Kardas, and T. Kosar, “Declarative
     Decentralized Control (AGERE 2018) at ACM SIGPLAN Conference                       specifications for the development of multi-agent systems,” Computer
     Systems, Programming, Languages and Applications: Software for Hu-                 Standards & Interfaces, vol. 43, pp. 91–115, 2016.
     manity (SPLASH 2018). ACM Press, 2018, pp. 62–71.                             [27] M. Challenger, S. Demirkol, S. Getir, M. Mernik, G. Kardas, and
 [5] F. Bellifemine, G. Caire, and D. Greenwood, Developing multi-agent                 T. Kosar, “On the use of a domain-specific modeling language in
     systems with JADE, ser. Wiley Series in Agent Technology. John Wiley               the development of multiagent systems,” Engineering Applications of
     & Sons, 2007.                                                                      Artificial Intelligence, vol. 28, pp. 111–141, 2014.
 [6] F. Bergenti and G. Petrosino, “Overview of a scripting language for           [28] A. El Fallah-Seghrouchni and A. Suna, “Claim: A computational
     JADE-based multi-agent systems,” in Proc. 19th Workshop “From                      language for autonomous, intelligent and mobile agents,” in Proc.
     Objects to Agents” (WOA 2018), ser. CEUR Workshop Proceedings,                     International Workshop Programming Multi-Agent Systems (ProMAS
     vol. 2215. RWTH Aachen, 2018, pp. 57–62.                                           2003). Springer, 2003, pp. 90–110.
 [7] G. Petrosino and F. Bergenti, “An introduction to the major features of       [29] L. Braubach, A. Pokahr, and W. Lamersdorf, “Jadex: A BDI-agent
     a scripting language for JADE agents,” in Proc. 17th Conference of the             system combining middleware and reasoning,” in Software Agent-Based
     Italian Association for Artificial Intelligence (AI*IA 2018), ser. Lecture         Applications, Platforms and Development Kits, R. Unland, M. Calisti,
     Notes in Artificial Intelligence, vol. 11298. Springer, 2018, pp. 3–14.            and M. Klusch, Eds. Birkhäuser, 2005, pp. 143–168.
 [8] K. Kravari and N. Bassiliades, “A survey of agent platforms,” Journal
                                                                                   [30] S. Rodriguez, N. Gaud, and S. Galland, “SARL: A general-purpose
     of Artificial Societies and Social Simulation, vol. 18, no. 1, p. 11, 2015.
                                                                                        agent-oriented programming language,” in Proc. IEEE/WIC/ACM Inter-
 [9] F. Bergenti, G. Caire, and D. Gotta, “Interactive workflows with WADE,”
                                                                                        national Joint Conferences of Web Intelligence (WI 2014) and Intelligent
     in Proc. 21st IEEE International Conference on Collaboration Tech-
                                                                                        Agent Technologies (IAT 2014), vol. 3. IEEE, 2014, pp. 103–110.
     nologies and Infrastructures (WETICE 2012). IEEE, 2012, pp. 10–15.
[10] F. Bergenti, G. Caire, and D. Gotta, “An overview of the AMUSE social         [31] L. Bettini, Implementing Domain-Specific Languages with Xtext and
     gaming platform,” in Proc. Workshop “From Objects to Agents” (WOA                  Xtend. Packt Publishing, 2013.
     2013), ser. CEUR Workshop Proceedings, vol. 1099. RWTH Aachen,                [32] M. Eysholdt and H. Behrens, “Xtext: Implement your language faster
     2013.                                                                              than the quick and dirty way,” in Proc. ACM International Conference
[11] F. Bergenti and S. Monica, “Location-aware social gaming with                      on Object Oriented Programming Systems Languages and Applications
     AMUSE,” in Advances in Practical Applications of Scalable Multi-                   companion (OOPSLA 2010). ACM, 2010, pp. 307–309.
     agent Systems. The PAAMS Collection: 14th International Conference,           [33] F. Bergenti, “An introduction to the JADEL programming language,”
     PAAMS 2016, Y. Demazeau, T. Ito, J. Bajo, and M. J. Escalona, Eds.                 in Proc. IEEE 26th International Conference on Tools with Artificial
     Springer International Publishing, 2016, pp. 36–47.                                Intelligence (ICTAI). IEEE Press, 2014, pp. 974–978.
[12] F. Bergenti, G. Caire, and D. Gotta, “Large-scale network and service         [34] F. Bergenti, E. Iotti, and A. Poggi, “Core features of an agent-oriented
     management with WANTS,” in Industrial Agents: Emerging Applica-                    domain-specific language for JADE agents,” in Trends in Practical
     tions of Software Agents in Industry. Elsevier, 2015, pp. 231–246.                 Applications of Scalable Multi-Agent Systems, the PAAMS Collection.
[13] F. Bellifemine, F. Bergenti, G. Caire, and A. Poggi, “JADE – A                     Springer International Publishing, 2016, pp. 213–224.
     Java agent development framework,” in Multi-Agent Programming:                [35] F. Bergenti, E. Iotti, S. Monica, and A. Poggi, “Agent-oriented model-
     Languages, Platforms and Applications, R. H. Bordini, M. Dastani,                  driven development for JADE with the JADEL programming language,”
     J. Dix, and A. El Fallah Seghrouchni, Eds. Springer, 2005, pp. 125–147.            Computer Languages, Systems & Structures, vol. 50, pp. 142–158, 2017.
[14] M. Tomaiuolo, P. Turci, F. Bergenti, and A. Poggi, “An ontology               [36] F. Bergenti, E. Iotti, S. Monica, and A. Poggi, “Interaction protocols
     support for semantic aware agents,” in Proc. International Workshop                in the JADEL programming language,” in Proc. 6th ACM SIGPLAN
     on Agent-Oriented Information Systems (AOIS 2005), ser. LNAI, vol.                 International Workshop on Programming Based on Actors, Agents, and
     3529. Springer, 2006, pp. 140–153.                                                 Decentralized Control (AGERE 2016) at ACM SIGPLAN Conference
[15] F. Bergenti, “A discussion of two major benefits of using agents in                Systems, Programming, Languages and Applications: Software for Hu-
     software development,” in Engineering Societies in the Agents World                manity (SPLASH 2016). ACM Press, 2016, pp. 11–20.
     III: 3rd International Workshop ESAW 2002, P. Petta, R. Tolksdorf, and        [37] F. Bergenti, E. Iotti, S. Monica, and A. Poggi, “Overview of a formal
     F. Zambonelli, Eds. Springer, 2003, pp. 1–12.                                      semantics for the JADEL programming language,” in Proc. 18th Work-
[16] F. Bergenti and A. Poggi, “A development toolkit to realize autonomous             shop “From Objects to Agents”, ser. CEUR Workshop Proceedings, vol.
     and inter-operable agents,” in Proc. 5th International Conference on               1867. RWTH Aachen, 2017, pp. 55–60.
     Autonomous Agents, 2001, pp. 632–639.                                         [38] S. Monica and F. Bergenti, “Location-aware JADE agents in indoor
[17] C. Bădică, Z. Budimac, H.-D. Burkhard, and M. Ivanovic, “Software                scenarios,” in Proc. 16th Workshop “From Objects to Agents”, ser.
     agents: Languages, tools, platforms,” Computer Science and Information             CEUR Workshop Proceedings, vol. 1382. RWTH Aachen, 2015, pp.
     Systems, vol. 8, no. 2, pp. 255–298, 2011.                                         103–108.




                                                                               118