<!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>Developing Multi-Agent Systems Based on MDA</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Beatriz Alves De Maria</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carlos J. P. Lucena</string-name>
          <email>lucena@inf.puc-rio.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Pontifical Catholic University of Rio de Janeiro</institution>
          ,
          <addr-line>Rua Marquês de São Vicente 225</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Viviane Torres da Silva</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we propose an MDA based approach for developing multi-agent systems. MDA specifies a structured software development process divided in modeling stages. In the PIM stage, where platform independent models are specified, we propose to use an MAS modeling language called MASML since it does not restrict or specify implementation platforms. In the PSM stage, where platform specific models are defined, we propose to use the UML modeling language. The MAS-ML models defined in the PIM stage are transformed into UML models at the PSM stage, based on an object-oriented framework for implementing MAS. In the last stage, the application code is generated from the UML models.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Multi-agent systems (MAS) are becoming widely used for building complex and
large-scale systems. Different applications’ domains, like digital libraries, virtual
markets and information systems in general, such as [
        <xref ref-type="bibr" rid="ref16 ref2">2,16</xref>
        ], were developed by using
the MAS approach. For this reason, a variety of methodologies and others MAS
modeling and implementing techniques have been proposed with the purpose of helping
the developers in building such systems.
      </p>
      <p>
        This paper proposes an MDA (Model Driven Architecture) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] based approach for
developing MAS. The MDA architecture considers models as the primary artifact and
covers the complete life cycle of software systems. Four mains stages defining
specific models compose MDA. The tracking of the models is accomplished through
transformations of one model into another.
      </p>
      <p>MDA development process explicitly separates models at three abstractions layers
The most abstract model is the computational independent model (CIM) that are
application conceptual models, independents of the computational characteristics of the
solution. A CIM is refined into a platform independent model (PIM), corresponding to
the second stage of the development process. PIMs are high-level models that contain
already computational information about the system but are independent of
implementation platforms. The less abstract model is the platform specific model (PSM), which
correspond to the third stage, is model created based on PIM by including specific
platform details. In the fourth stage of the MDA development process, PSMs are
transformed into application code. In addition, MDA also defines a set of consecutive
transformations that should be applied to the models in order to allow the
transformation of high-level abstraction models into code.</p>
      <p>The proposed development process defines the MDA stages and the transitions
between the stages according to the characteristics of MAS. The proposed development
process defines a MAS PIM, the transformation of these models into PSM, the
specification of PSM and the transformation of PSM into code. The representation of CIM
as well as the generation of CIM into PIM is beyond the scope of this paper.</p>
      <p>
        In our proposed development process, we use the MAS-ML modeling language
[
        <xref ref-type="bibr" rid="ref12 ref14">12, 14</xref>
        ] to model MAS. MAS-ML is a modeling language that extends UML,
including agent-related abstractions. The MAS-ML models will represent the PIMs defined
in MDA, since MAS-ML does not restrict or specify implementation platforms. To
transform the MAS-ML models into PSMs, we propose to use an object-oriented
framework called ASF (Agent Society Framework) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The ASF framework defines
a set of object-oriented modules that describes abstract classes that should be extended
in order to implement multi-agent applications. By instantiating the ASF framework
from MAS-ML models, these models are transformed into UML models that has
several characteristics and depend on the framework used. Therefore, the UML models
are PSMs. To represent the last stage of MDA approach, the transformation of PSMs
into code, we automatically transform the UML models generated in the previous
stage into objected-oriented code by using the XMI [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] technology.
      </p>
      <p>The use of MDA in the MAS development process offers several advantages. The
MAS-ML models that describe an application are PIMs that are portable to diverse
systems and can be used to generate different computational models by applying
various implementation platforms. Another advantage is the generation of different MAS
viewpoints through the specification of models that have different abstraction levels.
The MAS-ML models are high-level models that focus on the problem definition by
describing the system in an agent-oriented level. The UML models are low-level
models that focus on the solution of the problem by including implementation details and
describing the system in an object-oriented level.</p>
      <p>The article is organized as follows. Section 2 describes our main contribution by
showing the MAS development process using MDA. Section 3 draws some
conclusions and discusses future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Multi-Agent Systems and MDA</title>
      <p>The development process of large-scale systems, as MAS, involves the construction of
different models based on variety requirements. The transformations of a system
specification into models and of these models into code are usually accomplished in a
non-organized way, that is not easily adaptable to technology changes.</p>
      <p>Since MASs are gaining widespread acceptance, it is necessary to create an MAS
development process that clearly specifies the different process stages and the
transitions between these stages. The process proposed in this section aims to specify the
implementation of agent-oriented systems by applying the MDA approach.</p>
      <p>The MAS development process proposed in this paper is illustrated in Fig. 1. In the
CIM stage, the system can be described by using domain-specific ontologies or any
other computational independent technology. For instance, ontologies define the
concepts and relationships related to the problem domain that can be used to specify a
system. The definition of such concepts and relationships do not depend on the
computational abstractions used to solve the system problem. It is not within the scope of
this paper either to exemplify the CIM models of MAS or to demonstrate the
transformation from CIMs into PIMs.</p>
      <p>
        Next, the CIM models should be transformed into PIMs by using any platform
independent modeling language, such as AUML [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and MAS-ML. In our approach, we
propose to use the MAS-ML modeling language. The main difference between
MASML and other MAS modeling languages is that MAS-ML defines organizations, roles,
agents and environment as first-class entities. By defining these abstractions as
firstclass entities it is possible to define their properties, relationships, internal executions
and interactions.
      </p>
      <p>
        After the creation of PIMs, PSMs should be generated by choosing an
implementation platform. In order to implement MAS, several architectures, frameworks and
platforms, such as ASF, Jadex [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and RETISINA [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], can be used. In our approach,
the MAS-ML models are transformed into UML models by using the ASF framework.
The ASF framework was chosen since it is possible to implement all MAS-ML
abstractions. Other implementation platforms do not deal with the implementation of
such abstractions. To implement MAS with Jadex from MAS-ML models, new
transformation rules to convert the MAS-ML models in Jadex structure are requested, that
can become very difficult since Jadex does not use the same abstractions as MAS-ML
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Finally, PSMs are transformed into code. The programming language will depend
on the platform used to implement the system. In the proposed approach, MAS will be
implemented in Java since this is the language used by ASF.
MAS-ML is a modeling language focused to MAS. This language is an extension of
UML by including agent-related concepts presented in the TAO conceptual
framework [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Thus, by using MAS-ML it is possible to model not only objects, but also
agents, environments, organizations and roles that are entities defined in TAO and
usually found in MAS.
      </p>
      <p>
        MAS-ML was chosen to model MAS PIMs due to three main factors. First, this
language is not a platform dependent modeling language. Although MAS-ML uses
agent and object-oriented abstraction, MAS-ML does not restrict the implementation
of its models to a specific implementation platform. Second, MAS-ML is a modeling
language that is MOF [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] compliant. This characteristic facilitates the MAS
development process since XMI [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] can be used during the development process. XMI
provides a mapping from MOF to XML and, therefore, can be used to describe MOF
compliant models. XMI is used in our approach to represent the MAS-ML models, to
assist in the transformation from MAS-ML models into UML models, to represent the
UML models and to help the transformation from UML models into code. Finally, as
stated before, MAS-ML models abstractions such as organizations, environments and
roles that are not adequately modeled in other MAS modeling languages [
        <xref ref-type="bibr" rid="ref2 ref3">2,3</xref>
        ].
Without modeling these abstractions it is not possible to model, for instance, agents playing
different roles in different organizations.
2.2
      </p>
      <sec id="sec-2-1">
        <title>Transforming PIMs into PSMs</title>
        <p>After using MAS-ML to model PIMs, the models should be transformed into PSMs.
The transformation of MAS-ML models into UML models occurs in two stages.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Fist Stage: Creating the MAS-ML XMI</title>
        <p>The first stage consists of describing the all the MAS-ML models in a textual
description by using the XMI format. In order to do so, it was necessary to create an
MASML DTD that specifies the MAS-ML models in XMI. The MAS-ML DTD extends
the UML DTD according to the extensions proposed by MAS-ML to the UML
metamodel. The XMI file created by using the MAS-ML DTD represents the MAS-ML
models and is called MAS-ML XMI.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Second Stage: Creating the UML XMI</title>
        <p>In this stage, the MAS-ML XMI generated in the previous phase is converted into a
UML XMI through the instantiation of the ASF Framework. This transformation uses
a UML XMI file that contains the framework specifications. This file describes all
classes and relationships among classes that are defined in the framework. During the
transformation, the UML XMI file of the framework is extended with the application
details that are described in MAS-ML XMI. The extended file characterizes the
instantiation of the framework and the implementation of an application. The UML XMI
has details related to the implementation platform.
2.3</p>
        <p>
          PSM
The UML XMI generated in the previous stage represents a PSM of the application.
By using graphical tools, such as Rational Rose [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] and Poseidon [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ], which import
XMI files, it is possible to generate UML models of the application.
        </p>
        <p>The UML model created in this stage is a UML class diagram that contains the
ASF framework classes and the classes related to the application that instantiate the
framework. All application entities, properties and relationships modeled on the three
MAS-ML structural diagrams generate the UML class diagram of the application.
In the final stage of the MAS development process, the UML models are transformed
into code. This kind of transformation corresponds to the last stage of the MDA
approach that transforms PSMs into code. Almost all graphic tools that import UML
XMI, such as Rational Rose and Poseidon, are capable of automatically generating
code from a UML XMI.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusion and Future Work</title>
      <p>The MAS development process presented in this paper intends to provide an approach
for modeling and implementing MAS by using MDA. The proposed process is
composed of three stages. In the first stage, our approach proposes the use of MAS-ML to
model MAS by creating PIMs. MAS-ML was chosen since it models several MAS
models that are not (appropriately) modeled in other MAS modeling languages. In the
second stage, the MAS-ML models are transformed into UML models by using the
ASF framework. The ASF framework was chosen since it defines a set of
objectoriented models that implement the MAS entities modeled in MAS-ML. Finally, the
UML models are automatically transformed into code in the third stage proposed by
the MAS development process.</p>
      <p>The MAS development process takes advantage of the MDA approach used to
define the process. Four main characteristics can be enumerated: (i) portability and
reusability: MAS-ML models are portable to different implementing platforms because
such models describe MAS without including implementation details. Thus, MAS-ML
models can be reused by several developers to implement the system by using
different platforms; (ii) interoperability: The use of XMI to describe models created during
the process provides interoperable PIM and PSM models. MAS-ML models as well as
UML models are interoperable due to the use of MAS-ML XMI and UML XMI; (iii)
low coupling: Due to the intrinsic characteristics of MDA, PIMs (or conceptual
models) and PSMs (computation models) are low coupling. In our approach, MAS-ML
models are PIMs that do not include details related to a specific platform. Such details
are present just in UML models, PSMs.</p>
      <p>To make the construction of MAS feasible by using our approach, a modeling tool
was developed to support the design and implementation of MAS. The tool allows the
designer to graphically model MAS systems by using MAS-ML and to implement
them while generating Java code by using the ASF framework.</p>
      <p>With the aim of enhancing the tool that gives support to the development of MAS
by using MDA, several important improvements should be carried out. First of all, the
transformer that generates code from MAS-ML models should also consider the
MAS-ML dynamic diagrams. Second, the tool should make the visualization and also
the modification of the UML models that represent the system implementation
feasible. In addition, the tool should provide a model checker to analyze and verify the
consistence among the different models (MAS-ML models and UML models).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1 Braubach,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Pokahr</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            and
            <surname>Lamersdorf</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.</surname>
          </string-name>
          <article-title>Jadex: A Short Overview</article-title>
          . Main Conference Net.ObjectDays, AgentExpo,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2 He,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Jennings</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.R.</given-names>
            and
            <surname>Leung</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <article-title>On Agent-Mediated Electronic Commerce</article-title>
          .
          <source>IEEE Trans on Knowledge and Data Engineering</source>
          ,
          <volume>15</volume>
          :
          <fpage>4</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3 Odell,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Dyke</surname>
          </string-name>
          , Parunak,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Bauer</surname>
            ,
            <given-names>B. Extending</given-names>
          </string-name>
          <article-title>UML for Agents</article-title>
          .
          <source>AOIS Workshop</source>
          at AAAI,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>4</surname>
            <given-names>OMG</given-names>
          </string-name>
          ,
          <source>OMG MDA Guide. Version 1.0.1</source>
          .
          <year>2002</year>
          . Available at: http://www.omg.org/docs/omg/03-06-01.pdf.
          <source>Accessed in: 11/2004</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>5</surname>
            <given-names>OMG</given-names>
          </string-name>
          ,
          <article-title>Meta Object Facility (MOF) 2.0 Core Specification</article-title>
          .
          <source>Version 20</source>
          ,
          <year>2003</year>
          . Available at: http://www.omg.org/docs/ptc/03-10-04.pdf. Accessed in: 11/
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>6</surname>
            <given-names>OMG</given-names>
          </string-name>
          ,
          <source>OMG XML Metadata Interchange. Version 1.2</source>
          .
          <year>2003</year>
          . Available at: http://www.omg.org/docs/formal/02-01-01.pdf. Accessed in: 11/
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>7</surname>
            <given-names>OMG</given-names>
          </string-name>
          ,
          <source>OMG Unified Modeling Language Specification. Version 1.5</source>
          ,
          <year>2003</year>
          . Available at: http://www.omg.org/docs/formal/03-03-01.pdf. Accessed in: 11/
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8 Pokahr,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Braubach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            and
            <surname>Lamersdorf</surname>
          </string-name>
          and W. Jadex:
          <article-title>Implementing a BDIInfrastructure for Jade Agents</article-title>
          .
          <source>Exp in Search of Innovation</source>
          ,
          <volume>3</volume>
          :
          <fpage>3</fpage>
          ,
          <year>2003</year>
          . Available at: http://exp.telecomitalialab.com. Accessed in: 11/
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9 Poseidon. Available at: http://www.gentleware.com. Accessed in: 11/
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10
          <string-name>
            <given-names>Rational</given-names>
            <surname>Rose</surname>
          </string-name>
          . Available at: http://www-306.ibm.com/software/rational/. Accessed in: 11/2004
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11 Silva,V.;
          <string-name>
            <surname>Garcia</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Brandao</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chavez</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lucena</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Alencar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <article-title>Taming Agents and Objects in Software Engineering</article-title>
          .
          <article-title>Software Engineering for Large-Scale Multi-Agent Systems</article-title>
          , LNCS
          <volume>2603</volume>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12 Silva,
          <string-name>
            <given-names>V.</given-names>
            and
            <surname>Lucena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>From</surname>
          </string-name>
          <article-title>a Conceptual Framework for Agents and Objects to a MultiAgent System Modeling Language</article-title>
          . Journal of Autonomous Agents and
          <string-name>
            <surname>Multi-Agent</surname>
            <given-names>Systems</given-names>
          </string-name>
          , Kluwer Academic Publishers, ISSN
          <volume>1387</volume>
          -
          <issue>2532</issue>
          ,
          <issue>9</issue>
          :1 and
          <issue>2</issue>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13 Silva,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Cortés</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            and
            <surname>Lucena</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>An Object-Oriented Framework for Implementing Agent Societies</article-title>
          .
          <source>MCC32/04. Technical Report</source>
          , PUC-Rio. Rio de Janeiro, Brazil,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14 Silva,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Choren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            and
            <surname>Lucena</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Using the MAS-ML to Model a Multi-Agent System</article-title>
          . Lucena,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Garcia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Romanovky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Castro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Alencar</surname>
          </string-name>
          , P. (Eds.) Software Engineering for Large-Scale
          <string-name>
            <surname>Multi-Agent Systems</surname>
            <given-names>II</given-names>
          </string-name>
          , LNCS 2940, Springer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15 Sycara,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Paolucci</surname>
          </string-name>
          ,M.,
          <string-name>
            <surname>van Velsen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Giampapa</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>The RETSINA MAS Infrastructure</article-title>
          .
          <article-title>Special joint issue of Autonomous Agents and MAS, 7:1 and 2</article-title>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16 Wooldridge,
          <string-name>
            <given-names>M.</given-names>
            and
            <surname>Jennings</surname>
          </string-name>
          ,
          <string-name>
            <surname>N.</surname>
          </string-name>
          <article-title>Applications of Intelligent Agents</article-title>
          .
          <source>Agent Technology: Foundations, Applications, and Markets</source>
          ,
          <volume>3</volume>
          :
          <fpage>28</fpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>