A MDA Approach for Agent-oriented Development using FAML
Carlos Eduardo Pantoja and Ricardo Choren
Military Institute of Engineering, Pça Gen Tibúrio 80, Rio de Janeiro, 22270-290, RJ, Brazil
Keywords: MDA, Agent-oriented Development, Multi-agent Systems.
Abstract: There are several multi-agent development modelling tools to aid system design and implementation. How-
ever, such tools are modelling language specific, which imposes the use of a given modelling technique.
This paper presents a MDA approach for multi-agent system development based on the FAML meta-model.
Thus the approach aims to support a wide range of modelling techniques.
1 INTRODUCTION
Software agents are cognitive and autonomous com-
ponents, situated in an environment, which are capa-
ble of flexible and autonomous actions in this envi-
ronment in order to achieve their projects goals
(Wooldridge, 2000). The multi-agent systems
(MAS) approach allows complex systems modelling
(Bellifemine et al., 2007).
Currently, there are several agent-oriented
modeling techniques like Tropos (Bresciani et al.,
2003), Prometheus (Padgham and Winikoff, 2004),
among others. Besides, there are some development
platforms that generate code from a specific agent-
oriented modeling techniques, such as PDT (Sun et
al., 2010), which generates code from Prometheus to
JACK and IDK (Gomez-Sanz et al., 2008), which
generates from INGENIAS to JADE. To overcome
the issue of specific code generators for specific
modeling languages, it is important to employ meta-
models. FAML (Beydoun et al., 2009) is a meta-
model that unifies common concepts of existent
agent-oriented modeling languages, thus being a
potential candidate for standardization and
engineering a MAS System using the Model-Driven
Development techniques.
This paper proposes a MDA approach for agent-
oriented development that provides a set of explicit
transformation rules in Query, View, Transformation
Language (QVT) to construct a Platform Specific
Model (PSM) and generate code to the Jason agent-
oriented programming language. This paper is
structured as follows: section 2 the describes some
base concepts; section 3 shows the proposed MDA
approach; section 4 presents a simplified working
example of the MDA approach. Section 5 describes
some and section 6 concludes the paper.
2 MODELING MAS
This section describes the FAML meta-model, the
Jason programming language and the concepts used
to develop the transformations, mappings and tem-
plates for the proposed approach.
2.1 FAML
FAML is a meta-model that unifies different agent-
oriented modelling languages inside the same soft-
ware engineering domain for MAS development.
This generic meta-model was validated to guarantee
the concepts promoted by the extant agent-oriented
methodologies (Beydoun et al., 2009).
The FAML is divided into two scopes: the de-
sign-time, where the central concept is the agent’s
system, and the runtime, where the central concept is
the environment where the agent is situated. An
agent is also a central concept in the meta-model,
defining an internal and external scope. Thus, four
levels can be raised: system; environment; agent,
and; agent definition levels.
The internal scope of an agent comprises the
agent and the agent-definition levels. The first level
is responsible for the description of the agents' defi-
nitions and specifications. The second is responsible
for the runtime agent-internal classes, describing the
mental state of an agent, its plans actions, roles and
communications.
The external scope of an agent comprises the
415
Eduardo Pantoja C. and Choren R..
A MDA Approach for Agent-oriented Development using FAML.
DOI: 10.5220/0004158104150420
In Proceedings of the 14th International Conference on Enterprise Information Systems (MDDIS-2012), pages 415-420
ISBN: 978-989-8565-11-2
Copyright
c
2012 SCITEPRESS (Science and Technology Publications, Lda.)
system and the environment-definition levels. The
system level describes the system organizations and
its relationships (roles and tasks). The environment
level describes all agents situated in the environ-
ment, its resources and facets. Furthermore, the
environment also maintains an event history and is
generated by a related system.
2.2 QVT and MTT
QVT is an OMG approach to describe model-to-
model transformations. It is used since queries can
be applied in a source model. Moreover, the view is
a description of the target model and the transfor-
mation is the part where the results of queries are
projected into the view, creating the target model.
QVT can be used to create platform specific
models (PSM) in the MDA viewpoint. Model To
Text (MTT) is an OMG approach to transform mod-
els to text artefacts, e.g. code (OMG, 2008). This
work uses the Acceleo (Obeo, 2012) tool that uses
QVT and MTT. It was projected to allow source
code generation from UML and MOF.
2.3 Jason
Jason is a programming language for MAS devel-
opment. In Jason an agent can be programmed based
on beliefs, goals, plans and actions. The agents have
a belief base, which is changed in consequence of
their perceptions about the environment. A plan has
a trigger event and whenever a belief is changed, a
sequence of actions can be started. In Jason, an agent
also has committed goals that represent a pursued
project goal (Bordini et al., 2007).
However, Jason does not support organizational
programming. Moise+ (Hubner et al., 2002) is an
organizational model that can be integrated to Jason
to support the specification of an agent organization
in three dimensions: structural specification, func-
tional specification and deontic specification. More-
over, Jason does not provide environmental support.
JaCaMo (Boissier et al., 2012) is used to enhance
Jason with environmental concerns.
3 THE PROPOSED APPROACH
This section proposed the MDA approach for agent-
oriented development using FAML and Jason (fig-
ure 1). The approach intends to be modelling lan-
guage independent thus it begins its model transfor-
mation from FAML concepts. Any agent modelling
language that adheres to FAML (Beydoun et al.,
2009) can be used. The approach provides a set of
transformations to map instances of FAML concepts
to the target model based on Jason constructions, in
order to generate MAS code.
Figure 1: The proposed MDA approach.
To design the transformations, it was necessary
to make some extensive modifications in FAML.
For example, originally, in FAML, an agent can
send several messages in a communication. Jason
does not have the communication concept, so each
communication will have only one message. Anoth-
er modification is the unification of the Agent Goal
and System Goal into a single Goal class, since in
Jason (integrated with Moise+ and JaCaMo), an
agent shares the same goals with the System. This
unification decreases the number of mappings per-
formed by the approach. The modified meta-model
can be seen in figure 2.
The Jason model (figure 3) will be populated
from the results of the QVT transformations from
the FAML source meta-model (see figure 4). The
main transformation called PimToPsm receives the
FAML model and returns a Jason model completely
mapped. The main mapping recovers all FAML
model objects and calls FamlToGeaplam.
The initial mapping transforms a FamlMM ob-
ject into a geaplamMM. It maps all the FAML sys-
tems objects to Jason systems objects calling the
SystemToSystem mapping, which transforms roles,
organizations, tasks and environments from FAML
to roles, groups, missions and environments of Ja-
son/Moise+/JaCaMo platform.
The RoleToRole transformation maps the
agentgoal concept from FAML to Jason and calls
itself recursively to determine the roles hierarchy.
The SystemGoalToGoal transformation only maps
the objects attributes. The OrganizationToGroup
transformation determines the groups’ hierarchy and
recovers the roles already mapped previously. The
TaskToMission transformation maps the agentgoal
from FAML to Jason and maps the objects attributes
from task to mission.
The EnvToEnv maps all agents from FAML to
Jason and maps all the facets to percepts calling the
FacetToPercept. The AgentToAgent transformation
ICEIS2012-14thInternationalConferenceonEnterpriseInformationSystems
416
Figure 2: The modified FAML metamodel.
Figure 3: The target model based on Jason, Moise+ and JaCaMo.
maps a MentalState into Beliefs and Goals, in case
of the attribute committed is true. The transfor-
mation also maps Plans and Roles that an agent can
play. The Beliefs are mapped by the MentalState-
ToBelief transformation. The Goals of an agent is
mapped with the MentalStateToGoal transformation,
whenever the attribute committed is true.
The PlanToPlan transformation first checks the
existence of an associated goal pursued by a Plan.
The FAML plan is mapped into two structures: the
Plan and the TriggerEvent. The transformation also
maps the Actions of an agent Plan. The
AMDAApproachforAgent-orientedDevelopmentusingFAML
417
ActionT
o
mation
t
Messag
e
formati
o
Commu
n
tionToE
x
jects att
r
It is
i
ogy, E
n
FacetEv
e
Resourc
e
any tran
s
4 A
S
In this
s
modelle
d
2004), c
a
The do
m
agents:
t
The age
n
ering be
message
o
Action ma
t
o FacetActio
n
e
Action, the
o
n maps an I
n
n
ication and
x
ternalActio
n
r
ibute into an
E
i
mportant to
m
n
vironmentHi
e
nt, Interect
i
e
and Obliga
t
s
formation.
S
IMPLE
E
s
ection, an e
x
d
in Promet
h
a
lled Domest
i
m
estic robot s
y
t
he robot, th
e
n
t robot is re
s
er to its ow
n
from the age
n
k
es the prope
r
n
or Messag
e
ActionToInt
e
n
ternal Actio
n
Message. O
t
n
transformati
E
xternal Acti
o
m
ention that
t
story, Even
t
i
onProtocol,
t
ion concepts
E
XAMP
L
x
ample of a
M
h
eus (Padgh
a
i
c Robot (Bo
r
y
stem (figure
e
owner and
s
ponsible for
n
e
r
. When th
e
n
t owne
r
, it g
o
Figure 4: Th
e
r
action tran
s
e
Action. If it
e
rnalAction t
r
n
from the F
A
t
herwise, the
on maps the
o
n.
t
he FAML O
n
, MessageE
v
MessageSch
e
were not us
e
E
M
AS applica
t
a
m andWini
k
r
dini et al., 2
0
5) contains
t
the superma
r
the goal of d
e
e
robot recei
v
o
es to the fri
d
e
proposed tran
s
s
for-
is a
r
ans-
A
ML
Ac-
ob-
n
tol-
v
ent,
e
ma,
e
d in
t
ion,
k
off,
0
07).
t
hree
r
ket.
e
liv-
v
es a
d
ge,
tak
e
Th
e
co
n
go
a
mo
r
lo
w
ing
tra
n
inc
r
im
p
s
formation set.
e
s a bottle of
b
e
Robot still
n
sumption ru
l
a
l of drink b
e
r
e beer in re
s
w
stock.
The QVT tra
n
the M2M f
r
n
sformations
a
r
ease the m
p
rovements i
n
Figure 5: T
h
b
eer and brin
g
manages the
es. The age
n
e
er. The agen
t
ponse to the
n
sformations
amework for
a
nd mapping
s
a
intainability
the related
m
h
e Domestic R
o
g
s it back to t
h
beer stock
a
n
t owner has
t supermarke
t
agent robot
i
were imple
m
Eclipse plat
f
s
were modu
l
and possib
m
eta-models.
o
bot System m
o
h
e owner.
a
nd some
only the
t
delivers
n case of
m
ented us-
f
orm. All
l
arized to
l
e future
o
del.
ICEIS2012-14thInternationalConferenceonEnterpriseInformationSystems
418
The first step of the approach is to instantiate the
FAML meta-model based on the Domestic Robot
System. It can be done importing a XML file or
creating it using the Ecore tree viewer. The FAML
instantiated objects can be seen in figure 6.
Figure 6: The FAML instance of the System.
The second step of the approach is to execute the
transformation, populating an instance of the PSM
meta-model from the source model, the FAML
model, and generate the code. It can be done in two
manners: directly from PIM to code or transforming
from PIM to PSM and afterwards, generate the code.
The advantage of the second approach is that it al-
lows the modeller to adjust the instance of the PSM
meta-model before generate the code. The domestic
robot.mas2j file was generated as follows:
The agent object is composed of plans, beliefs
and goals. In the agent owner example, it only has
plans and a goal. The model to text then generates
all agents’ files. The owner.asl file was generated as
follows:
The object environment is composed by agents
and percepts. The model to text then generates the
environment classes. The HouseEnvModel.java was
generated as follows:
5 RELATED WORK
There are some works to generate agent code from
agent-oriented models, e.g. (Sun et al, 2010)
(Gomez-Sanz et al., 2008) (Cossentino, 2005).
However, those are initiatives for specific modelling
languages. The INGENIAS development kit is a tool
to generate JADE (Bellifemine et al., 2007) code
from INGENIAS models. The PDT tool generates
JACK (Winikoff, 2005
) code from Prometheus
models. The PASSI toolkit proposes a stepwise
refinement from requirements to code, compiling
PASSI diagrams and generating JACK code.
Such tools do not use an agent-oriented meta-
model: the transformations are done directly from
the model element to a code piece. Thus, such tools
are not prepared to support other modelling lan-
guages. The MDA approach presented in this paper
relies on the FAML meta-model that is capable of
representing meta-models of most existing MAS
methodologies, including INGENIAS, Prometheus
and PASSI (Beydoun et al. 2009). In this sense, the
approach allows for the designer to choose the mod-
elling language to use in the MAS development
(regarding it is FAML-compliant).
They also do not use a platform meta-model.
AMDAApproachforAgent-orientedDevelopmentusingFAML
419
Particularly, the PASSI toolkit does not even use
a MDA approach: code generation is responsibility
of an AgentFactory Tool. Thus they are not devised
to evolve to support other agent-oriented platforms.
The approach uses Jason meta-model since it is
provides a BDI approach that can handle organiza-
tion and environment aspects (through Moise+ and
JaCaMo extensions). JADE is a Java-based platform
that is simple and do not use BDI concepts. JACK is
a BDI-enhanced JADE but it does not support other
agent-oriented concepts.
6 CONCLUSIONS
This paper presented a MDA approach for MAS
development, using a generic agent meta-model for
agent-oriented modelling languages for Jason’s code
generation. The approach realizes a set of transfor-
mations in QVT language to populate the program
language model. Afterwards, texts artefacts are gen-
erated from templates using the model to text lan-
guage.
The paper also presented an example of the Do-
mestic Robot System modelled in Prometheus. The
FAML meta-model is instantiated and transformed
to the Jason Model. The set of transformations were
implemented using the Model To Model do EMF.
The code was generated using the Model to Text
language and was implemented with Acceleo.
The use of MDD techniques provides a standard-
ization of the development, increasing the maintain-
ability and re-usability of the models and facilitating
the developers to transform the modelled project into
code. For future works, a modelling environment
with graphical tools for instantiate the FAML meta-
model will be developed using GMF. The FAML
can be used to generate code for others agent-
oriented program languages like JACK, JADE and
JADEX.
REFERENCES
Bellifemine, F., Caire, G., and Greenwood, D. (2007).
Developing multi-agent systems with JADE. Wiley se-
ries in agent technology.
Beydoun, G., Low, G., Henderson-Sellers, B., Mouratidis,
H., Gomez-Sanz, J. J., Pavon, J., and Gonzalez-Perez,
C. (2009). FAML: a generic metamodel for MAS de-
velopment. IEEE Trans. Softw. Eng., 35(6):841–863.
Boissier, O., Bordini, R. H., Hubner, J. F., Ricci, A., and
Santi, A. (2012). JaCaMo project. http://jacamo.source
forge.net/.
Bordini, R. H., Hubner, J. F., and Wooldridge, W. (2007).
Programming Multi-Agent Systems in AgentSpeak us-
ing Jason. Jonh Wiley and Sons, London.
Bresciani, P., Giorgini, P., Giunchiglia, F., Mylopoulos, J.,
and Perini, A. (2003). Tropos: An Agent-Oriented
Software Development Methodology.
Cossentino, M. (2005). From Requirements to Code with
the PASSI Methodology. In Sellers, H. B. and Gior-
gini, P., editors, Agent-Oriented Methodologies, vol-
ume 3690 of LNCS, pages 79–106. Idea Group Pub.
Gomez-Sanz, J. J., Fuentes, R., Pavón, J., and Garcia-
Magarino, I. (2008). Ingenias development kit: a visu-
al multi-agent system development environment. In
Proceedings of the 7th AAMAS, p. 1675–1676.
Hubner, J. F., Sichman, J. S. a., and Boissier, O. (2002). A
model for the structural, functional, and deontic speci-
fication of organizations in multiagent systems. In
Proceedings of the 16th SBIA, p. 118–128.
Obeo (2012). Acceleo: MDA generator - home. http://
www.acceleo.org/.
OMG (2008). MOF model to text transformation lan-
guage, v 1.0.
Padgham, L. and Winikoff, M. (2004). Developing Intelli-
gent Agent Systems: A Practical Guide. John Wiley.
Sun, H., Thangarajah, J., and Padgham, L. (2010).
Eclipse-based prometheus design tool. In Proceedings
of the 9th AAMAS, p. 1769–1770.
Winikoff, M. (2005). Jack intelligent agents: An industrial
strength platform. In Bordini, R., Dastani, M., Dix, J.,
Fallah Seghrouchni, A., and Weiss, G., editors, Multi-
Agent Programming, volume 15 of Multiagent Sys-
tems, Artificial Societies, and Simulated Organiza-
tions, pages 175–193. Springer US.
Wooldridge, M. (2000). Reasoning about rational agents.
Intelligent robotics and autonomous agents. MIT
Press.
ICEIS2012-14thInternationalConferenceonEnterpriseInformationSystems
420