=Paper= {{Paper |id=Vol-242/paper-9 |storemode=property |title=Community based Ubiquitous System Development in Multi-agent Environment |pdfUrl=https://ceur-ws.org/Vol-242/paper9.pdf |volume=Vol-242 |authors=Youna Jung,Jungtae Lee,Minkoo Kim |dblpUrl=https://dblp.org/rec/conf/caise/JungLK06 }} ==Community based Ubiquitous System Development in Multi-agent Environment== https://ceur-ws.org/Vol-242/paper9.pdf
984                                Ubiquitous Mobile Information and Collaboration Systems


      Community based Ubiquitous System Development in
                Multi-agent Environment

                        Youna Jung1, Jungtae Lee2, Minkoo Kim1
                     1 Artificial Intelligence Laboratory, Ajou University,

                                   Suwon, Korea(South)
                           {serazade,minkoo}@ajou.ac.kr
                    2 Programming Language Laboratory, Ajou University,

                                   Suwon, Korea(South)
                                jungtae@ajou.ac.kr



       Abstract. Ubiquitous system can be considered as the intelligent space, in
       which many kinds of component are connected by networks and also each
       component recognizes their connection and cooperates with others for achiev-
       ing some goals. In many case of ubiquitous computing environments, users and
       devices interact and cooperate each other to attain some goals. To develop such
       a ubiquitous system, we should model a ubiquitous system in a cooperation
       view. To do this, in this paper, we model a ubiquitous system using community
       metaphor consistently. In the proposed high-level abstraction model, we can
       represent mission-oriented organizations and interrelationships between mem-
       bers or organizations. In addition, so far, a developer of a ubiquitous system
       should start from scratch and think about the action as an individual component
       and also the action as a member of cooperative organization at same time.
       Therefore, we also introduce the development process, which make it possible
       concerning the cooperative action and the individual action separately. To ex-
       amine the proposed community computing model and the development process,
       we trying to implement a small system in JADE Platform.




1 Introduction

Agents are often used by software developers to more naturally understand, model,
and develop a complex distributed system [1]. A ubiquitous system is a highly com-
plex distributed system [2]. Therefore, it can be regarded as a multi-agent application
which target support for daily-life activities. Multi-agent based ubiquitous systems
are more than just an extension of multi-agent system to ubiquitous domain because
ubiquitous computing systems have unique needs. In many ubiquitous environments,
it is important that cooperation between computing components to offer ubiquitous
services, so we need to represent cooperative organizations and relationships between
them in a conceptual model of a ubiquitous system. In addition, to implement such a
ubiquitous system, developers should concern about the cooperative actions and also
own actions at same time. However, it is hard to develop a highly complex distributed
system in such wise. Therefore, we try to formulate the development process in point
UMICS'06                                                                          985


of separation of concern. In the high-level model, developers concern about only
cooperative relationship in a ubiquitous system. Then, in the detailed model, individ-
ual actions of each computing component are concerned. Such separation of concern
can be made development of a ubiquitous system easy and systematical.
   In this paper, we propose a high-level abstraction model of a multi-agent based
ubiquitous system in which cooperative relationships are important. In this model, we
employ community metaphor to describe mission-oriented organization. Furthermore,
we also propose the development process with model transformation of MDA. Each
model helps in separation of concern.
   The rest of the paper is organized as follows. We first introduce some related
works and motivation in section 2. Then, in section 3, we give a brief description of
the multi-agent based ubiquitous system and its development process. Section 4 pre-
sents each models used in development process, and transformations between the
proposed models. We present a computational model for system implementation in
section 5. Finally, section 6 is dedicated to the conclusion and future works.


2 Related Works and Motivation

    Gaia introduced a methodology for agent-oriented analysis and design because ex-
isting approaches fail to adequately capture an agent’s flexible, autonomous problem
solving behavior, the richness of an agent’s interactions, and the complexity of an
agent system’s organizational structures [3][4]. In Gaia, a multi-agent system is re-
garded as a collection of computational organizations consisting of various interact-
ing roles. Gaia allows an analyst to go systematically from requirement statements to
a design through a process of developing increasingly detailed models of the system
to be constructed.
    However, for developing a multi-agent based ubiquitous system, it is not adequate
to use agent-oriented methodologies including Gaia as it stands. One reason is that
they can not perfectly capture needs of ubiquitous computing. In many ubiquitous
systems, it is much important that structure of organizations to attain goals and rela-
tionship between organizations. However, even in Gaia, an organization is only im-
plicitly defined such structures within the role and interaction models [3]. In some
ubiquitous computing systems, it is important to explicitly define organizations, be-
cause the objective of ubiquitous system is realized by achieving organization’s goals.
Therefore, for developing such a ubiquitous system, we need a high-level abstraction
model to describe organization’s structures and interactive behavior within and be-
tween them.
    To abstract structures of mission-oriented organizations, we employ community
metaphor. Community concept is introduced by several agent cooperation models
[5][6]. In ubiquitous domain, PICO (Pervasive Information Community Organiza-
tion) project [7] used community concept in 2003. PICO’s objective is to meet the
demands of automated, continual, unobtrusive services and proactive real-time col-
laborations among devices and software agents in dynamic, heterogeneous ubiquitous
environments. To do this, PICO dynamically generates mission-oriented communities
that perform tasks for users and devices. The major contribution of the PICO project
986                             Ubiquitous Mobile Information and Collaboration Systems


is the introduction of a concept, called community computing, and using it as a
framework for collaboration among autonomous agents, called as delegent. The
community computing concept provides the necessary platform to enable effective
communication and collaboration among heterogeneous hardware and agents. A
community of PICO is defined as an entity consisting of one or more agents working
towards achieving a common goal. It provides a framework for collaboration and
coordination among agents. The concept of community computing satisfies require-
ments of ubiquitous computing such as proactive real-time collaborations for auto-
mated, continuous services providing in heterogeneous environment. Therefore, we
choose the community as a metaphor describing organization’s structure in a multi-
agent based ubiquitous system, and then describe the interrelationships between
communities. In this paper, we define that the ubiquitous computing system modeled
by community concept as the community computing system.
   Another reason is the need of well defined and automated development process
supporting separation of concern between cooperative concern and individual con-
cern. Agent-oriented models care about two of them in a model at same time. After,
developers should implement a system using the design in which organizational view
and individual view are mixed. This situation requires solid development process
supporting separation of concern. To do this, we employ MDA (Model Driven Archi-
tecture) [8]. MDA is an approach to system development, which increases the power
of models in that work. So far, system development only uses models as a guide for
implementing. However, it is hard that implementing a highly complex distributed
system using only guide. Accordingly, MDA describes the whole development proc-
ess from design to implementation. In order to do this, MDA proposes to start the
process by building high-level abstraction models obtained by requirement analysis,
and then refine them until obtain models that directly represents the final system.
Using MDA approach provides benefit to the development of community computing
systems. It make the ubiquitous systems developers focus on describing the system
using high-level abstraction primitives, community, in the cooperation view. Then,
the high-level abstraction model is transformed to the more detailed model until a
frame of source code is obtained. In the detailed model, an individual view of each
computing component is concerned. Though the model transformation, a portion
describing cooperation of the source code is generated at least.


3 Development Process of Community Computing System

In this paper, we propose a high-level abstraction model and development process for
multi-agent based community computing systems. In the proposed model, using com-
munity concept, we represent proactive, mission-oriented organization and interrela-
tionship between them, explicitly. Additionally, to implement a system, we propose a
development process based on MDA approach. The frame of source code can be
generated from a design through the model transformation process of MDA. In MDA,
several models reflecting different abstraction level are needed. For applying MDA
approach to development of a multi-agent based community computing system, we
also define models representing different abstraction level and modeling languages
UMICS'06                                                                                                                                                    987


for each model. The development process with models and runtime environment of a
community computing system is shown in Fig. 1.
   First of all, CCM (Community Computing Model), the most high-level abstraction
model, describes a system with community metaphor. It models how communities
make up a system and fulfill requirements of a system. To describe the CCM, we
defined a modeling language, CML (Community computing Modeling Language). A
CIM-PI (Platform Independent Community Computing Implementation Model) con-
siders implementation of the system without concern about specific platforms. It
shows the system in detail with computing components and interoperation between
them. The frame of CIM-PI can be derived from a CCM, and the rest should be filled
by developers. As a modeling language of CIM-PI, we define CIL-PI. To describe
system implementation depending on a specific platform, we also define a CIM-PS
(Platform Specific Community computing Implementation Model). The skeleton of
CIM-PS can be also derived from a CIM-PI, but the rest should be filled manually. A
CIM-PS combines the specifications in the CIM-PI with the details that specify how
that system uses a particular type of agent platform. As a modeling language of CIM-
PS, CIL-PS is used. Using the model transformation process from a CCM to a CIM-
PS, the frame of the source code and a portion related cooperation of the code are
generated. This process allows community computing system development to be ease
and systematic, because the developer can advance his thought from cooperation
view over a system to individual view of each component. Furthermore, we can guar-
antee consistency in the entire development process, because we can manage the
process with a coherent metaphor, community.


                                            Member
                                          Template. D                                  Platform
                                                                                     Specification
                                             Protocol. D                                                                         Agent


                          CCM                                      CIM - PI                                 CIM - PS             Agent
                                                                                                                                   …………




 Requirement                              Transformation    (Platform Independent    Transformation    ( Platform Specific                     Deployment
                  (Community Computing         Tool                                       Tool                                                    Tool
                          Model )                                  Community                               Community
                                                            Implementation Model )                    Implementation Model)
                 - describe Requirements &                 - describe Components &             - describe details of uT System
                 Environment of an uT System                Interactions for Implementation     Implementation on a particular
                                                                                                                                                   deploy
                 - focus on Community                      - focus on Member,Community          Platform
   Development                                               , and Interaction between them     ex)JADE Classes
                                                                                                                                 Agent
     Process

     Runtime
   Environment
                               Notebook
                                                                                                                                          Server




                                                                    Workstation




                                                                                                          Notebook
                  Server


     Fig. 1. The development process and runtime environment of a community
                                computing system
988                              Ubiquitous Mobile Information and Collaboration Systems


4 Community Computing Models



4.1 Community Computing Model (CCM)

A CCM is the most high-level abstraction model of a community computing system.
The objective of a CCM is to describe requirements and environment of a ubiquitous
system using the community concept. At runtime, a community computing system
makes the intelligent space combined virtual environment and physical environment.
We called this space as U-space (Ubiquitous space). U-space is a logical and physical
area where ability of a ubiquitous system can influence. U-space can be defined as a
collection of individual agents and communities. At this time, each agent represents
an individual computing component constituting a ubiquitous environment. In addi-
tion, a set of communities represent ability of the ubiquitous system for meeting re-
quirements. Accordingly, to describe the requirement and environment of a commu-
nity computing system, a CCM describes communities and agents can be existed in
the system. In a CCM, the life cycle of agents and communities is described. Using
the life cycle description, a system can manage the creation and termination of com-
munities and agents members (see Section 5, at runtime, a society manager control
the creation and termination of a community). The ability of a system is represented
as goals of communities. The way to achieve community’s goals is presented as pro-
tocols of the community, but is not described in detail. In short, CCM is a sketch of a
multi-agent based community computing system, which shows how the system ful-
fills its requirements in a U-space.
    Before describing the structure of the CCM in detail, it is worth introducing the
basic concepts constructing the core of community computing.
    ƒ Member: it is the building blocks of a community computing system, and be
       implemented as an agent. It can represent a computing device, physical hardware,
       human, and software. Its ability is represented through its attributes and actions
       At ordinary time, it performs its own action. Then, triggering a goal, it forms a
       community and interact others to achieve the goal. In this paper, we assume that
       all types of member, which can be existed in a system, are predefined.
    ƒ Community: It is a metaphor to describe a proactive organization and made up
       with agent members collaborating with others to achieve particular missions. A
       community has goals and protocols. A community can manage the life cycle of
       its own members. In detail, a community can control entry and secession of each
       member by offering joining conditions into a community. As a goal arises dy-
       namically, a community is dynamically generated to achieve the goal. At this
       time, actually, a society manager representing a society creates a community
       manager representing a community. Therefore, the community manager con-
       structs a community by casting individual agents. After then, the community is
       disorganized when the goal is attained. In this paper, we assume that community
       types and the structure of each community are predefined. It means that all com-
       munity types and a community’s goals and protocols should be predefined in a
       system.
UMICS'06                                                                                                  989


   ƒ Goal: It is a particular condition that a community should satisfy. In short, it is
     the objective of a community.
   ƒ Protocol: It is a description of interaction between community’s members to
     achieve a goal. That is, a protocol shows how each role performs its job (coop-
     erative action and individual action) to obtain its objective. It defined as a se-
     quence of communicative messages and member agent’s actions. While a com-
     munity performs a protocol, another goal can be issued to achieve the goal of the
     community.
   ƒ Society: It is a metaphor to represent U-space, a system. It is constructed by
     agent members and communities. At the first time, only members exist in society.
     In detail, when a ubiquitous system starts to operate, a society manager is created.
     Therefore, a society manager broadcast and then each agent recognizes and a so-
     ciety and registers. After the formation of a society, a community can be gener-
     ated when an agent recognizes a goal. Then, if the community attains its objec-
     tive, a community is terminated but the society is alive until the community com-
     puting system is exhausted.
   A CCM has two part, community description and society description. In the com-
munity description, we defined structure, goals, and protocols of each community. To
describe a CCM, we create a modeling language, CML (Community computing Mod-
eling Language). To prove our idea, we apply the proposed development process to
the CHILDCARE scenario. In the CHILDCARE scenario, when a child goes out of
home, a smartbelt of the child requests community generation to the society manager
representing a society. Then, a community manager of CHILDCARE community is
created by a society manager, and then casts agent members for each role. For safety
of the child, the CHILDCARE community informs child’s family of the situation of
the child, and then the child’s mother searches a nearest person who can help the
child to go home. Finally, when the child arrives home, a goal of the CHILDCARE
community is achieved and then the community is disorganized.

 Community Computing Model Description {                          Cast:RELATIONSHIP={CHILD.MOTHER|
   Community Home {                                                  CHILD.FATHER|CHILD.SISTER|CHILD.BROTHER|
     Role HOME_STUFF:1~100000 {                                      CHILD.GRANDMOTHER|CHILD.GRANDFATHER};
        Attribute : ADDRESS; USE;                              Role NEIGHTBOR:1~20 {
       Cast : USE=RESIDENTIAL; }                                  Attribute : RELATIONSHIP;
     Role RESIDENT:1~20 {                                         Cast : RELATIONSHIP=CHILD.NEIGHTBOR; }
       Attribute : LOCATION;                                   Role WATCHER:0~2 {
                       ADDRESS=HOME_STUFF.ADDRESS;                Attribute : MONITORING SERVICE=
       Cast : LOCATION=HOME_STUFF.ADDRESS; }                       {AVAILABLE|NOT AVAILABLE}; LOCATION;
       Goal ANNOUNCE_INFO {                                       Cast : MONITORING SERVICE=AVAILABLE;
          Protocol                                                        LOCATION=CHILD.LOCATION; }
             announce_information_to_human_at_home(info) :        Goal CHILDCARE SERVICE {
             (Initiator=HOME_STUFF,RESIDENT,                        Protocol take_a_child_home :
             Participant=HOME_STUFF,RESIDENT) } }                  (Initiator=CHILD,
   Community CHILDCARE {                                           Participant= FAMILY, NEIGHBOR, WATCHER)} }
     Role CHILD:1 {                                          Society GHODAMCITY{
       Attribute: SAFETY_LEVEL={SAFE|                          Member GHODAMCITIZEN {
              LEVEL-1 WARNING| LEVEL-2 DANGER};                   Attribute : LOCATION=GHODAMCITY;
       Cast:SAFETY_LEVEL={ LEVEL-1 WARNING|                           CITY_ADDRESS=GHODAM;
              LEVEL-2 DANGER}; }                                      SAFETY_LEVEL={SAFE| LEVEL-1 WARNING|
     Role FAMILY:1~50 {                                               LEVEL-2 DANGER};
       Attribute : RELATIONSHIP;                                  Cast : ADDRESS.CITY= GHODAM; } } }
990                                         Ubiquitous Mobile Information and Collaboration Systems


                        Fig. 2. An example of CCM using CML
   As the first step of the development process, a CCM of the childcare scenario is
shown in Fig. 2. As you see, two community types can be existed in the system,
HOME and CHILDCARE. A community type describes roles, goals, and ontology. A
role is defined by attributes and conditions to cast member agent performing the role.
An attribute is represented by an attribute name and a set of possible values. If the
attribute value not be defined, data type can take the place of particular values of the
attribute. Among attributes, cardinality is a mandatory attribute, so it represented in
next of role name. A goal is defined by a goal name and protocol for achieving the
goal. A protocol presents initiator, participant, and sub-protocol can be issued on the
way to perform the protocol. Optionally, an ontology name can be described if the
community uses. In the society description, society name (in Fig.2, GHODAMCITY)
and the condition to join into the society are defined. In our example, the value of
ADDRESS.CITY attribute should be “GHODAM” to belong to the GHODAMCITY
society.


4.2 Platform Independent Community Implementation Model (CIM-PI)

The objective of CIM-PI is to describe the architecture of a system concerning im-
plementation. This model exhibits a specified degree of platform independence so as
to be suitable for use with a number of different platforms of similar type. A CIM-PI
extends community and society descriptions of a CCM in detail. In the community
description of CIM-PI, it is represented that mapping relationships between roles and
member types and cooperative interaction s to achieve a goal. Each role of the com-
munity is matched with certain member types, and the member type should be able to
play the role. In addition, protocols of the community are detailed. A protocol de-
scription consists of the initiator’s communicative action and the participant’s that.
The language for protocol description is based on Occam [9]. Occam enables the
programmer to express a program in terms of concurrent processes which communi-
cate by sending messages through communication channels. We apply constructs of
Occam to our protocol description for concurrency handling. Constructs of the com-
municative action is as follows: SEQ, PAR, ALT, IF and EXIT. The communicative
action can be member’s actions or primitive actions such as SEND and RECIEVE. We
import message types of FIPA (Foundation for Intelligent Physical Agents) [10]. In
the Society description of CIM-PI, all member types are defined. In the member de-
scription, the hierarchy of member types, and member’s attributes and actions are
defined. Using the keyword, extends, we represent the hierarchy of member types.
For examples, Streetlamp extends Electronic Appliance means that Streetlamp type is
a child type of Electronic Appliance type, so Streetlamp type is inherited attributes of
Electronic Appliance. We defined CIL-PI to model a CIM-PI. An example of CIM-PI
is shown in Fig. 3.

 Platform Independent Community Implementation Description    Protocol take_a_child_home {
 {                                                                 communication of child {
    Community Home {                                         ……………………………..
       Role HOME_STUFF:1~100000 {
UMICS'06                                                                                                                             991


         Attribute : ADDRESS; USE;                                          Society: GHODAMCITY {
        Cast : USE=RESIDENTIAL; }                                            Member Society Member {
     Role RESIDENT:1~20 {                                                     Attribute : LOCATION=GHODAMCITY;
        Attribute : LOCATION;                                                           CITY_ADDRESS=GHODAM;
                      ADDRESS=HOME_STUFF.ADDRESS;                                       SAFETY_LEVEL={SAFE| LEVEL-1 WARNING|
        Cast : LOCATION=HOME_STUFF.ADDRESS; }                                           LEVEL-2 DANGER};
    HOME_STUFF:Household_appliance; RESIDENT:Human ;                          Actions : Wait_for_Msg(MsgType="inform", FromWho,
    Protocol announce_information_to_human_at_home {                                           InformedData); }
      Communication of Initiator {                                           Member Animate Object extends Society Member {
          SEND(MsgType="inform", ToWhom=Participant,                          Attribute : SPECIES=STRING; GENUS=STRING;
                InformedData); }                                                              FAMILY=STRING; }
      Communication of Participant {                                         Member Human extends Animate Object {
            IF(RECEIVE(MsgType="inform",FromWho=Initiator,InformedData))      Attribute : SEX={MALE|FEMALE}; AGE=(0~150) ;
                Display_Info(InformedData);                                           RELATIONSHIP=STRING; JOB=STRING;
            END IF } } }                                                      Actions : Choose_the_nearest_family(Location, NearestFamily);
   Community CHILDCARE {                                                                Request_for_picture(RequestWho=WATCHER.id,
     Role CHILD:1 {                                                                          Location, RequestedPicture);
        Attribute: SAFETY_LEVEL={SAFE|                                                  Take_to(Who, Where);
               LEVEL-1 WARNING| LEVEL-2 DANGER};                                        Choose_the_nearest_person(Location,NearestPerson);
        Cast:SAFETY_LEVEL={ LEVEL-1 WARNING|                                            Choose_responce(Choice1, Choice2, Choice); }
               LEVEL-2 DANGER}; }                                            Member Inanimate Object extends Society Member {
     Role FAMILY:1~50 {                                                       Attribute : STATUS=STRING; }
         Attribute : RELATIONSHIP;                                           Member Electronic Appliance extends Inanimate Object {
         Cast:RELATIONSHIP={CHILD.MOTHER|                                     Attribute : ELECTRONIC_POWER=STRING ;
             CHILD.FATHER|CHILD.SISTER|CHILD.BROTHER|                                  WEIGHT=INTEGER; HIGHT=INTEGER;
             CHILD.GRANDMOTHER|CHILD.GRANDFATHER};                                     USAGE={HOME|INDUSTRY|RESEARCH}; }
     Role NEIGHTBOR:1~20 {                                                   Member Home Appliance extends Electronic Appliance {
        Attribute : RELATIONSHIP;                                             Attribute : USAGE=HOME;
        Cast : RELATIONSHIP=CHILD.NEIGHTBOR; }                                          ASSIGNED_ROOM={LIVINGROOM|KITCHEN|BED
     Role WATCHER:0~2 {                                                                 ROOM|BATH|READING};
        Attribute : MONITORING SERVICE=                                       Actions : Display_Info(InformedData); }
          {AVAILABLE|NOT AVAILABLE}; LOCATION;                             Member Streetlamp extends Electronic Appliance {
        Cast : MONITORING SERVICE=AVAILABLE;                                  Attribute : MONITORING SERVICE=
                 LOCATION=CHILD.LOCATION; }                                                     {AVAILABLE|NOT AVAILABLE};
  CHILD:Human,Smartbelt ; FAMILY:Human ; NEIGHBOR:Human ;                                  LIGHTENING={YES|NO};
  WATCHER:Camcoder,Camera,Streetlamp;                                         Actions : Send_picture(ToWhom, RequestedPicture);} } }
                                  Fig. 3. An example of CIM-PI using CIL-PI


4.3 Platform Specific Community Implementation Model (CIM-PS)

A CIM-PS combines the specifications in the CIM-PI with the details that specify
how that system uses a particular type of platform. At this moment, platform means
that agent platforms such as JAM [11] or JADE [12]. A CIM-PS is represented by
agent codes for a particular platform. Frame of a CIM-PS can be derived from a CIM-
PI. In detail, the cooperation portion and the frame as a programming guide is gener-
ated. In this paper, we implement a multi-agent based community computing system
on JADE platform so our CIM-PS describes java files for each member type, com-
munity type, and GHODAM society in JADE environment. A CIM-PS of our sce-
nario is shown in Fig. 4.

 package GHODAMCITY.agent;                                                   } catch (FIPAException fe) {
 import jade.core.Agent;                                                               fe.printStackTrace(); }
 import jade.core.behaviours.*;                                                addBehaviour(new WaitingRegistration(this));
992                                                     Ubiquitous Mobile Information and Collaboration Systems


 import jade.domain.*;                                                          addBehaviour(new WaitingCommunityCreation());
 import jade.domain.FIPAAgentManagement.*;                                      setCommunities(); }
 import java.util.*;                                                       public void addMember(final String memberName, final String key) {
 import GHODAMCITY.behaviour.*;                                                  addBehaviour(new OneShotBehaviour() {
 import GHODAMCITY.utility.*;                                                          public void action() {
 public class GHODAMCITY extends SocietyTemplate {                                       memberList.put(memberName, key);
    private HashMap memberList = new HashMap();                                           } } ); }
    private ArrayList communityList = new ArrayList();                      protected ServiceDescription setServiceDescription() {
    protected String societyType;                                                 ServiceDescription serviceDesc =
    protected String societyName;                                                           new ServiceDescription();
    public GHODAMCITY() {                                                         serviceDesc.setType(societyType);
         super();                                                                  serviceDesc.setName(societyName);
         societyType = "SOCIETY";                                                  return serviceDesc; }
         societyName = "GHODAMCITY"; }                                      protected void takeDown() {
 protected void setup() {                                                      try {
         DFAgentDescription dfd = new DFAgentDescription();                          DFService.deregister(this);
         dfd.setName(getAID());                                                } catch (FIPAException fe) {
         dfd.addServices(setServiceDescription());                                    fe.printStackTrace(); } }
         try {                                                              public void setCommunities() {
            DFService.register(this, dfd);                                     communityList.add("HOME");
                                                                                communityList.add("CHILDCARE"); } }
       a) Generated GHODAMCITY.java from CIM-PI(GHODAMCITY society)
 package GHODAMCITY.agent;                                                 public ArrayList getMemberList() {
 import jade.core.*;                                                           return members;
 import jade.core.behaviours.*;                                            }
 import java.util.ArrayList;                                               public String getProtocol(AID memberAID) {
 import jade.domain.FIPAAgentManagement.*;                                     for (int i = 0; i < roleBinding.length; i++) {
 import jade.domain.*;                                                             AID[] aids = roleBinding[i].getMemberAIDs();
 import GHODAMCITY.behaviour.*;                                                    for (int j = 0; j < aids.length; j++) {
 import GHODAMCITY.utility.*;                                                         if (aids[j].equals(memberAID)) {
 public class HOME extends CommunityTemplate {                                            return roleBinding[i].getProtocol();
      protected AID initiator;                                                 }}}
      protected String communityName;                                           return null;
      protected String communityType;                                      }
      protected ArrayList members = new ArrayList();                       public RoleBinding[] getRoleBinding() {
      protected RoleBinding[] roleBinding;                                     return roleBinding;
  public HOME() {                                                          }
      super();                                                             protected ServiceDescription setServiceDescription() {
      communityType = "COMMUNITY";                                             ServiceDescription serviceDesc = new ServiceDescription();
      communityName = "HOME"; }                                                serviceDesc.setType(communityType);
 protected void setup() {                                                      serviceDesc.setName(communityName);
     DFAgentDescription dfd = new DFAgentDescription();                        return serviceDesc;
     dfd.setName(getAID());                                                }
     dfd.addServices(setServiceDescription());                             protected void setRoleBindings() {
      try {                                                                    roleBinding = new RoleBinding[2];
         DFService.register(this, dfd);                                        roleBinding[0] = new RoleBinding("HOME_STUFF",
      } catch (FIPAException fe) {                                                      "Household_appliance", "CommunicationofInitiator");
          fe.printStackTrace(); }                                              roleBinding[1] = new RoleBinding("RESIDENT", "Human",
      addBehaviour(new MemberCasting(this));                                                          "CommunicationofParticipant");
      addBehaviour(new SendProtocol(this)); }                              }
 protected void addProtocol(String protocolName) {                         protected void takeDown() {
     try {                                                                     try {
         SimpleBehaviour behaviour =                                               DFService.deregister(this);
            (SimpleBehaviour) Class.forName(protocolName).newInstance();       } catch (FIPAException fe) {
           addBehaviour(behaviour);                                                fe.printStackTrace();
     } catch (ClassNotFoundException e) {                                      }}
        System.out.println(" Behaviour Not Found : " + protocolName);      public void updateMemberList(AID member) {
     } catch (Exception e) {                                                   members.add(member);
UMICS'06                                                                                                                              993


   e.printStackTrace();} }                                       }}
                  b) Generated HOME.java from CIM-PI (HOME community)
 package GHODAMCITY.agent;                                            protected void takeDown() { }
 import jade.core.*;                                                  public void addProtocol(String protocolName) {
 import jade.lang.acl.*;                                                  try {
 import jade.domain.*;                                                        Class c = Class.forName(protocolName);
 import jade.domain.FIPAAgentManagement.*;                                    Constructor con = c.getDeclaredConstructors()[0];
 import jade.core.behaviours.*;                                               addBehaviour((SimpleBehaviour) con.newInstance
 import java.lang.reflect.Constructor;                                                             (new Object[] {this}));
 import java.util.*;                                                      } catch (ClassNotFoundException e) {
 import GHODAMCITY.behaviour.*;                                              System.out.println(" Behaviour Not Found : " + protocolName);
 import GHODAMCITY.utility.*;                                             } catch (Exception e) {
 public class HomeAppliance extends ElectronicAppliance{                      e.printStackTrace(); }}
     protected String memberName;                                     protected ServiceDescription setServiceDescription() {
     protected HashMap communityMembers = new HashMap();                  ServiceDescription serviceDesc = new ServiceDescription();
     private String usage = "HOME";                                       serviceDesc.setType(memberType);
     private SelectiveValue assigned_room = new SelectiveValue            serviceDesc.setName(memberName);
              ("LIVINGROOM|KITCHEN|BEDROOM|BATH|READING");                return serviceDesc; }
     public HomeAppliance() {                                         public boolean done() {
         super();                                                         return false; }
         memberType = "HomeAppliance";                                public void setCommunityMember(String memberDesc) {
         memberName = "HomeAppliance";                                    StringTokenizer st = new StringTokenizer(memberDesc, ";");
     }                                                                    while(st.hasMoreTokens()){
 protected void setup() {                                                     communityMembers.put(st.nextToken(),
     DFAgentDescription dfd = new DFAgentDescription();                             new AID(st.nextToken(), true)); }}
     dfd.setName(getAID());                                           public AID getCommunityMemberAID(String memberName) {
     dfd.addServices(setServiceDescription());                            return (AID)communityMembers.get(memberName); }
     try {                                                            public String getPackagePath() {
         DFService.register(this, dfd);                                   return "GHODAMCITY.agent"; }
     } catch (FIPAException fe) {                                     public String Display_Info(String InformedData) {
         fe.printStackTrace();                                            String returnString = new String();
     }                                                                    return returnString; }
     addBehaviour(new Registration());                                public class Display_Info extends SimpleBehaviour {
     addBehaviour(new ResponseToCasting());                               public Display_Info (String InformedData) { }
     addBehaviour(new ReceiveProtocol(this));                             public void action() { }
     addBehaviour(new CommunityCreation());                               public boolean done() {
     addBehaviour(new ReceiveMemberList());}                             return false; } } }
   c) Generated HomeAppliance.java from CIM-PI (HomeAppliance member type)
                         Fig. 4. An example of CIM-PS



4.4 Model Transformation

Model transformation is the process of converting one model to another model of the
same system. To develop a system, MDA performs model transformation from a
high-level abstraction model to a low-level abstraction model representing the final
implementation. In our proposal, the model transformation process starts the process
by building a CCM and refine them until obtain the source code. The first step of the
model transformation is conversion of a CCM into a CIM-PI. Skeleton of a CIM-PI is
derived from a CCM, and the rest is filled using additional information. To complete
such interpretation process, information concerning implementation is needed such as
member type description, hierarchy of member type, mapping between roles and
member types, and protocol description. In the second step, we convert a CIM-PI into
994                                 Ubiquitous Mobile Information and Collaboration Systems


a CIM-PS using specification of particular agent platform. A CIM-PS is a collection
of agent classes representing each member type, each community type, and a society.
The configuration of agent classes differs with agent platforms. That is, a CIM-PS
should describe the java files, if the system is basis on JADE platform. After we gain
a CIM-PS, we can generate the source code, for examples, java files. In each model
of our development process, a developer can focus on the model’s view. In model
description, only cooperative behavior of the system is concerned. After the model
transformation, a developer programs the individual action portion of source code
additionally. Finally, the finished code is deployed into a system. That is the end of
development process for a multi-agent based community computing system. After
deployment, at runtime, deployed agents build up a U-space, and then organize com-
munities as occasion demands until the system is destroyed. The conversion relation-
ships between models and additional information used for model transformation are
shown in Fig. 5.

                   CCM                            CIM-PI                          CIM -PS
      Community Description               Community Description                  Agent class

                   Roles                  Role- Member Mapping
        C1




                                                                                      …
                   Goals
                                               Protocols                         Agent class
                   Roles
        C2                                Role- Member Mapping                    Agent class
                   Goals
                                               Protocols
                   Roles                                                         Agent class
        C3
                   Goals
                                          Role- Member Mapping
        Society Description                    Protocols                         Agent class
                                                                                      ……
             Society Member
                Template                Society Description

                                           Member Template
                                             Description                         Agent class

             CCM to CIM - PI

      Member Template Description

       Member Template Hierarchy                                       CIM-PI to CIM - PS
          Role-Member Mapping                                              Specification of
                                                                      Particular Agent Platform
             Protocol Description


  Fig. 5. Model transformation from CCM to CIM-PS with additional information


5 Implementation

   To examine the proposed community computing model and the development proc-
ess, we develop a small community computing system to serve CHILDCARE in
JADE platform. JADE (Java Agent Development Framework) is a software develop-
ment framework aimed at developing multi-agent systems and applications conform-
ing to FIPA standards for intelligent agents [12]. To run a multi-agent based commu-
nity system, we propose a computational model and it is shown in Fig. 6.
UMICS'06                                                                                                                     995


                                                      Society Manager
                                                 Community Templates

                                                  Member Templates

                                                  Registration control

                                                Listening Effectors

                               request      context
                                                                              request
                                                  request                                        context
                                                (community context
                                                creation OR
           Community Manager                   Society Entry)                                    Community Manager
             Member control                              Member Agent                               Member control

                                    ……                                       ……
                                                             Attribute
                     Goal                                                                                  Goal
                                                              Action
                    Protocol                                 Protocol                                  Protocol
                                                         Sensors Effectors
            Listening Effectors                                                                   Listening Effectors
    context protocol context       protocol                                           context                context protocol
                                                                                            protocol
 Member Agent                            Member Agent
                                                                              Member Agent                        Member Agent
    Attribute                            Attribute
                                                                                 Attribute                            Attribute
     Action            …………               Action
                                                                                  Action            …………               Action
    Protocol                             Protocol
                                                                                 Protocol                             Protocol
Sensors Effectors                    Sensors Effectors
                                                                             Sensors Effectors                    Sensors Effectors

 Fig. 6. Computational model of a multi-agent based community computing system

   Only agent members exist in a society when a system starts to operate. At this time,
to represent a society, a society manager agent is generated. It contains information
about member types and community types, and society registration protocols of agent
and community manager creation and termination protocols. Each agent should be
registered with a society. Then, the society manager generates a community manager
to achieve a goal when a member agent set particular a goal. A community manager
representing certain community has condition to cast member agent and protocols for
achieving goals. During a community manager performs a protocol, another commu-
nity can be generated to achieve the goal. Such relationships between communities
are described in the protocol description. After the community attains its goal, a soci-
ety manager removes the community instance and announces disorganization to agent
members. Each member agent has its attributes, actions, and default protocols for
society registration and requesting a community creation.
   To develop a community computing system with MDA, we implement the Com-
munity computing system Development ToolKit (CDTK). In the CDTK, a developer
can describe a system as a CCM file, and then CDTK transforms the CCM file to its
CIM-PI file. Of course, the developer fills the particular portion of CIM-PI. Similarly,
the CIM-PI file is transformed java files. At this time, an amount of java code is
automatically derived from the CIM-PI, and then the developer just programs own
behavior of each member. Our CDTK reduce an amount of programming, and it is
valuable in development of complex and huge ubiquitous systems. Implemented
toolkit is shown in Fig. 7.
996      Ubiquitous Mobile Information and Collaboration Systems




      a) The GHODAMCITY CCM
UMICS'06                                                                             997


                         b) Transformed the GHODAM CIM-PI




                      c) Transformed the GHODAM CIM-PI
           Fig. 7. Community computing system development using CDTK


6 Conclusion

In this article, we proposed a high-level conceptual model using community metaphor
to support dynamic management of goal-oriented organization and cooperation in
multi-agent based ubiquitous systems. Then, to fill a gap between a design and im-
plementation, we propose the entire development process through model transforma-
tion from a high-level conceptual model to implementation. To do this, we define
models representing different abstraction level and modeling languages for each
model. For operation of a community computing system, we also propose a computa-
tional model.
    However, there are several issues remaining for future work.
ƒ Dynamic structuring of community – In this paper, we assume that structure of a
   community and community types are predefined. However, this assumption set a
   limit to ability of a system. That is, the system can handle only predefined goals. In
   future, we will make the system to support dynamic formation of community struc-
   ture
998                              Ubiquitous Mobile Information and Collaboration Systems


ƒ Dynamic cooperation of member agents – In this model, the cooperation is static in
  a system, because the community’s goal is fixed. However, it makes a community
  to achieve its goals in always same way. Although another way can offer the more
  efficient methods to accomplish a goal, a community should use a predefined mean
  until such another way is defined as a new protocol.
ƒ Test on variety platforms – we implemented a system on only JADE platform, so
  we are going to verify our idea on other platforms.


7 Acknowledgement

This research is supported by the ubiquitous Autonomic Computing and Network
Project, the Ministry of Information and Communication (MIC) 21st Century Frontier
R&D Program in Korea


References

1. Nicholas R. J. On agent-based software engineering, Elsevier, Artificial Intelli-
   gence 117 (2000), 277-296
2. Weiser M. Ubiquitous Computing. Nikkei Electronics, December 6, 1993, 137-
   143.
3. M. Wooldridge, Nicholas R. J. The Gaia Methodology for Agent-oriented Analy-
   sis and Design, Autonomous Agents and Multi-Agent Systems, 3, 2000, 285-312
4. R. Jennings, et. al. Developing Multiagent Systems: The Gaia Methodology, ACM
   Transactions on Software Engineering and Methodology, Vol.12, No.3, July 2003,
   317-370
5. Jennings, N. R., et. al. Transforming Standalone Expert Systems into a Community
   of Cooperating Agents, Int. Journal of Engineering Applications of Artificial Intel-
   ligence 6 (4), 2003, 317-331.
6. Wooldridge M. An Introduction to Multiagent Systems, John Wiley & Sons, Read-
   ing, 2002
7. Mohan Kumar, et. al. PICO: A Middleware Framework for Pervasive Computing,
   Pervasive Computing, 1536-1268, 2003, 72-79
8.Object Management Group. Model Driven Architecture Guide, 2003
9.INMOS Ltd, OCCAM: Programming Manual. Prentice-Hall, Englewood Cliffs, NJ,
   1984
10.FIPA Standard, SC00037J, FIPA Communicative Act Library Specification, 2002
11.Huber M. j. JAM Agent in a Nutshell, version 0.65+0.76i, November 1, 2001
12.F. Bellifemine, A. Poggi, and G. Rimassa. JADE – A FIFA-compliant Agent
   Framework. In Proc. of Practical Application of Intelligent Agents and Multi-
   Agents (PAAM’ 99), London, UK, April 1999, p.97-10