Agent Modeling Language AML A Comprehensive Approa
Agent Modeling Language AML A Comprehensive Approa
net/publication/220166332
CITATIONS READS
139 2,154
2 authors:
All content following this page was uploaded by Radovan Červenka on 03 February 2015.
The Agent Modeling Language (AML) is a semi-formal visual modeling language for specifying, mod-
eling and documenting systems that incorporate features drawn from multi-agent systems theory. It is
specified as an extension to UML 2.0 in accordance with major OMG modeling frameworks (MDA, MOF,
UML, and OCL). The ultimate objective of AML is to provide software engineers with a ready-to-use,
complete and highly expressive modeling language suitable for the development of commercial software
solutions based on multi-agent technologies. This paper presents an overview of AML. The scope of the
language, its structure and extensibility mechanisms are discussed, and the core AML modeling constructs
and mechanisms are introduced and demonstrated by examples.
Povzetek: Opisana je vizualizacija agentnega jezika za modeliranje.
Prometheus [16], MaSE [8]), agent platforms (e.g. elements. It is thus a non-conservative extension of UML,
Jade, FIPA-OS, Jack, Cougaar) and multi-agent driven and therefore an optional part of the language. However,
applications, the extensions contained within are simple and can be eas-
ily implemented in most existing UML-based CASE tools.
– extends the above with new modeling concepts to ac- Upon the AML Metamodel and Notation two UML pro-
count for aspects of multi-agent systems thus far cov- files of AML are specified: UML 1.* Profile for AML
ered insufficiently, inappropriately or not at all, (based on UML 1.*) and UML 2.0 Profile for AML (based
– assembles them into a consistent framework specified on UML 2.0). The primary objective of these profiles is to
by the AML meta-model (covering abstract syntax enable implementation of AML into existing UML 1.* and
and semantics of the language) and notation (cover- UML 2.0 based CASE tools, respectively.
ing the concrete syntax), and
– is specified as an extension to UML in accordance 2.2 Extensibility of AML
with the OMG modeling frameworks (MDA, MOF, AML is designed to encompass a broad set of relevant the-
UML, and OCL). ories and modeling approaches, it being essentially impos-
sible to cover all inclusively. In those cases where AML is
2.1 The Language Definition insufficient, several mechanisms can be used to extend or
customize it as required:
AML is built upon the Unified Modeling Language (UML)
2.0 Superstructure [15], augmenting it with several new – Metamodel extension offers first-class extensibility (as
modeling concepts appropriate for capturing the typical defined by MOF [13]) of the AML metamodel and
features of multi-agent systems (see Fig. 1). notation.
The main advantages of this approach are:
– AML profile extension offers the possibility to adapt
– Reuse of well-defined, well-founded, and commonly AML for a given domain, platform or development
used concepts of UML. method by means of UML Profiles, without the need
– Use of existing mechanisms for specifying and ex- to modify the underlying AML Metamodel and Nota-
tending UML-based languages (metamodel exten- tion.
sions and UML profiles).
– Concrete model extension allows to employ alterna-
– Ease of incorporation into existing UML-based CASE tive MAS modeling approaches as complementary
tools. specifications to the AML model.
needs, motivations, desires, what goal(s) they are commit- 3DObject object
shape
ted to, when and how a particular goal is to be achieved, *
3DPlacement
which plan to execute, etc. Motion *
position
3DSpace
space
3DObject 3DSpace
In order to accommodate special needs for modeling so- semi-entity type. Entity role types are used to model ab-
cial aspects, AML utilizes concepts of: organization units, stractions of coherent set of features, capabilities, behav-
social relationships, entity roles, and role properties. iors, observations, relationships, participation in interac-
tions, and services offered or required by entities partici-
pating in a particular context. Each entity role type should
4.1 Organization Units
be realized by a specific implementation possessed by an
Organization unit type is a specialized environment type, entity that can play that entity role type. An instance of an
and thus inherits features of behaviored, socialized and entity role type is called entity role and exists only while
mental semi-entity types. They are used to specify the type some behavioral entity plays it.
of societies that can evolve within the system from both the For modeling the ability of an entity to play an entity
external as well as internal perspectives. role type, AML provides role properties. Role property is a
From an external perspective, organization units repre- specialized UML property, used to specify that an instance
sent coherent autonomous entities, which can be character- of its owner (i.e. a behavioral entity) can play one or several
ized in terms of their mental and social attitudes, can per- roles of a particular entity role type. The role property can
form behavior, participate in different kinds of (social) rela- be used either in the form of a role attribute or as the end of
tionships, can observe and interact with their environment, a play association.
offer and use services, play roles, etc. Their properties and One entity can at each time play several entity roles.
behavior are both (1) emergent properties and behavior of These entity roles can be of the same as well as of dif-
all their constituents, their mutual relationships, observa- ferent types. The multiplicity defined for a role property
tions and interactions, and (2) the features and behavior of constraints the number of entity roles of given type the par-
organization units themselves. ticular entity can play concurrently. Additional constraints
For modeling organization units from external perspec- which govern playing of entity roles can be specified by
tives, in addition to features defined for UML classes UML constraints.
(structural and behavioral features, owned behaviors, rela- To allow explicit manipulation of entity roles in UML
tionships, etc.), also all the features of behaviored, social- activities and state machines, AML defines a set of actions
ized, and mental semi-entities can be utilized. for entity role creation and disposal, particularly create role
From an internal perspective, organization units are action and dispose role action.
types of environment that specify the social arrangements Fig. 3 (a) contains the diagram depicting an agent of
of entities in terms of structures, interactions, roles, con- type Person which can play entity roles of type Player,
straints, norms, etc. Captain, Coach, and Referee. The possibility of
For this purpose organization unit types usually utilize playing entity roles of a particular type is modeled by
the possibilities inherited from UML structured classifier, play associations. Fig. 3 (b) depicts an organization unit
and model their internal structure by contained parts and SoccerMatch, which comprises three referees (of
connectors, in combination with entity role types used as the Referee entity role type) and two teams (of the
types of the parts. SoccerTeam organization unit type). The SoccerTeam
For an example of an organization unit see Fig. 3 (b). itself consists of one to three coaches, and eleven to
fifteen players of which one is the captain. The
4.2 Social Relationships players are peers to each other (the cooperate con-
nector), and subordinates to the coaches (the manage
Social relationship is a particular type of connection be- connector), and the captain (the lead connector). The
tween social entities related to or having dealings with each referees are superordinate to the both SoccerTeams
other. For modeling such relationships, AML defines a spe- (the control connector).
cial type of UML property, called social property. The so- Fig. 4 shows the instantiation of the previously defined
cial property can be used either in the form of an owned types in a model of a system’s snapshot, where the agent
social attribute, or as the end of a social association, and Lampard, of type Person, plays the entity role player, and
can specify its social role kind4 . the agent Terry, also of type Person, plays the entity role
For an example of modeling social relationships see captain and leads Lampard. The agent Mourinho, play-
Fig. 3. ing the entity role coach manages both players Lampard
and Terry.
4.3 Roles and Role Properties
Roles are used to define a normative behavioral repertoire 5 Modeling Interactions
of entities, and thus provide the basic building blocks of
MAS societies. For modeling roles, AML provides entity To support modeling of interactions in MAS, AML pro-
role type, a specialized behaviored, socialized and mental vides a number of UML extensions, which can be logi-
4 AML predefines peer, subordinate and superordinate social role cally subdivided into: (1) generic extensions to UML in-
kinds, but this set can be extended as required. teractions, (2) speech act based extensions to UML inter-
AGENT MODELING LANGUAGE. . . Informatica 29 (2005) 391–400 395
(a)
{xor}
Person ification of the behavior invoked on the side of the receiver.
name:String
The decision of which behavior should be invoked when
player 0..1 captain 0..1 0..1 coach 0..1 referee
Player Captain Coach Referee the decoupled message is received is up to the receiver what
active:Boolean allows to preserve its autonomy in processing messages.
(b) SoccerMatch Attribute change is a specialized UML interaction frag-
team:SoccerTeam[2] ment used to model the change of attribute values (state)
coach:Coach[1..3] of interacting entities induced by the interaction. Attribute
manage manage change thus enables to express addition, removal, or mod-
captain:Captain player:Player[10..15] ification of attribute values, and also to express the added
lead cooperate attribute values by sub-lifelines. The most likely utiliza-
control tion of attribute change is in modeling of dynamic change
referee:Referee[3] of entity roles played by behavioral entities represented by
lifelines in interactions, and the modeling of entity inter-
actions with respect to the played entity roles (i.e. each
Figure 3: Example of social structure modeling sub-lifeline representing a played entity role can be used
to model interaction of its player with respect to this entity
Mourinho:Person role).
coach Subset is a specialized UML dependency between event
:Coach occurrences owned by two distinct (superset and subset)
manage manage
lifelines used to specify that since the event occurrence on
:Captain :Player
captain player the superset lifeline, some of the instances it represents
lead
Terry:Person Lampard:Person
(specified by the corresponding selector) are also repre-
sented by another, the subset lifeline.
Similarly, join dependency is also a specialized UML de-
Figure 4: Example of the entity role instantiation and play- pendency between two event occurrences on lifelines (sub-
ing set and union ones), used to specify that a subset of in-
stances, which have been until the subset event occurrence
represented by the subset lifeline, is after the union event
actions, (3) observations and effecting interactions, and (4) occurrence represented by the ŞunionŤ lifeline. The union
services. lifeline, thus after the union event occurrence represents the
union of the instances it has been representing before, and
the instances specified by the join dependency.
5.1 Generic Extensions to UML Interactions Send decoupled message action is a specialized UML
Generic extensions to UML interactions provide means to send object action used to model the action of dispatch-
model: (1) interactions between groups of entities (multi- ing a decoupled message, and accept decoupled message
message and multi-lifeline), (2) dynamic change of object’s action is a specialized UML accept event action used to
attributes to express changes in internal structure of orga- model reception of a decoupled message action that meets
nization units, social relationships, or played entity roles, the conditions specified by the associated decoupled mes-
etc., induced by interactions (attribute change), (3) model- sage trigger.
ing of messages and signals not explicitly associated with A simplified interaction between entities taking part in
the invocation of corresponding methods and receptions a player substitution is depicted in Fig. 5. Once the main
(decoupled message), (4) mechanisms for modification of coach decides which players are to be substituted (p1 to
interaction roles of entities (not necessary entity roles) in- be substituted and p2 the substitute), he first notifies player
duced by interactions (subset and join dependencies), and p2 to get ready and then asks the main referee for per-
(5) modeling the actions of dispatch and reception of de- mission to make the substitution. The main referee in
coupled messages in activities (send and decoupled mes- turn replies by an answer. If the answer is “yes”, the
sage actions, and associated triggers). substitution process waits until the game is interrupted. If
Multi-message is a specialized UML message which is so, the coach instructs player p1 to exit and p2 to enter.
used to model a particular communication between (unlike Player p1 then leaves the pitch and joins the group of in-
UML message) multiple participants, i.e. multiple senders active players and p2 joins the pitch and thereby the group
and/or multiple receivers. of active players.
Multi-lifeline is a specialized UML lifeline, used to rep- Fig. 6 shows an example of the communicative inter-
resent (unlike UML lifeline) multiple participants in inter- action in which the attribute change elements are used to
actions. model changes of entity roles played by agents. The dia-
Decoupled message is a specialized multi-message used gram realizes the scenario of a captain change caused by
to model the asynchronous dispatch and reception of a mes- the original captain (player2) substitution.
sage payload without (unlike UML message) explicit spec- At the beginning of the scenario the agent
396 Informatica 29 (2005) 391–400 I. Trencansky et al.
can be either external or internal parts of the service 6 Modeling Capabilities and
provider), called service clients.
Behavior
Service specification is used to specify a service by
means of owned service protocols, i.e. specialized inter- AML extends the capacity of UML to abstract and decom-
action protocols extended with the ability to specify two pose behavior by another two modeling elements: capabil-
mandatory, disjoint and nonempty sets of (not bound) pa- ity and behavior fragment.
rameters, particularly: provider and client template param- Capability is an abstract specification of a behavior
eters. which allows reasoning about and operations on that spec-
The provider template parameters of all contained ser- ification. Technically, a capability represents a unification
vice protocols specify the set of the template parame- of the common specification properties of UML’s behav-
ters that must be bound by the service providers, and the ioral features and behaviors expressed in terms of their in-
client template parameters of all contained service proto- puts, outputs, pre- and post-conditions.
cols specify the set of template parameters that must be Behavior fragment is a specialized behaviored semi-
bound by the service clients. Binding of these complemen- entity type used to model a coherent re-usable fragment of
tary template parameters specifies the features of the par- behavior and related structural and behavioral features. It
ticular service provision/usage which are dependent on its enables the (possibly recursive) decomposition of a com-
providers and clients. plex behavior into simpler and (possibly) concurrently ex-
ecutable fragments, as well as the dynamic modification of
Service provision/usage are specialized dependencies an entities behavior in run-time. The decomposition of a
used to model provision/use of a service by particular enti- behavior of an entity is modeled by owned aggregate at-
ties, together with the binding of template parameters that tributes of the corresponding behavior fragment type.
are declared to be bound by service providers/clients. Fig. 8 (a) shows the decomposition of the Player
Fig. 7 shows a specification of the Motion service entity role type’s behavior into a structure of behavior
defined as a collection of three service protocols. The fragments. In part (b) two fragments, Mobility and
CanMove service protocol is based on the standard FIPA BallHandling, are described in terms of their owned
protocol FIPA-Query-Protocol5 [21] and binds the capabilities (turn, walk, catch, etc.).
proposition parameter (the content of a query-if
message) to the capability canMove(what, to) of (a) Player <<perceives>>
Motion
participant
initiator
participant
into a unique framework built on foundations of UML 2.0 Agent Systems. In IEEE/WIC Conference on Intelli-
and OCL 2.0. The structure of the language definition to- gent Agent Technology (IAT’03), pages 539–544, Hal-
gether with the MDA/MOF/UML “metamodeling technol- ifax, Canada, 2003.
ogy” (UML profiles, first-class metamodel extension, etc.,
gives AML the advantage of natural extensibility and cus- [7] S. Cranefield, S. Haustein, and M. Purvis. UML-
tomization. AML is also supported by CASE tools. Based Ontology Modelling for Software Agents.
We feel confident that AML is sufficiently detailed, com- In IProceedings of the Workshop on Ontologies in
prehensive and tangible to be a useful tool for software ar- Agent Systems, 5th International Conference on Au-
chitects building systems based on, or exhibiting character- tonomous Agents, 2001.
istics of, multi-agent technologies. In this respect we antic- [8] S.A. DeLoach. Multiagent Systems Engineering:
ipate that AML may form a significant contribution to the A Methodology and Language for Designing Agent
effort of bringing about widespread adoption of intelligent Systems. In Agent-Oriented Information Systems ’99
agents across varied commercial marketplaces. (AOIS’99), Seattle, WA, 1999.