Formal infrastructure of multiagent system specified by Agent UML and Petri Nets Ph. D. Marijan KUNSTIC, B. Sc. Marina BAGIC Department of Telecommunications, Faculty of Electrical Engineering and Computing University of Zagreb Zagreb, Croatia E-mail: [email protected], [email protected] ABSTRACT “Softwaresation” of telecommunications and increasing penetration of mobile agent technologies into telecommunications has invoked research of well defined techniques to validate and verify system specifications. We present formal model for specification of multiagent system using Agent UML language and Colored Petri Net methods. Agent UML specifies system informally at all levels of abstraction, but has no ability to either simulate or verify system’s behavior. Colored Petri Nets offer this major feature. Therefore, unification of Agent UML and Petri net formalisms provides enough information on system qualities. A lot of time and effort is saved in further phase of system implementation. Increase in system reliability is also significant. Colored Petri Nets are extremely useful, and together with some of the other modeling languages, e. g. AUML, they should be a standard part of the repertoire of advanced system designers and system analysts. Keywords: Mobile Agent, Multiagent System, Formal Specification, Agent UML, Colored Petri Nets 1. INTRODUCTION A multiagent system is a concurrent system based on the notion of autonomous, reactive, and internally-motivated agents in a decentralized environment [1]. To make it possible for agents to communicate with each other, it is essential for them to have a common communication language and to follow common protocols. The underlying agent communication model is usually asynchronous, and an agent may decide whether to perform actions requested by some other agents. Agents are commonly designed to determine their behavior based on individual goals, their knowledge and the environment. They may autonomously and spontaneously initiate internal or external behavior at any time. 2. SPECIFICATION OF MULTIAGENT SYSTEM BY AGENT UML Here we use diagrams of Agent Unified Modelling Language (AUML) to specify agent’s features and their internal and external behaviours within a particular multiagent system. 2.1. Mathematical model of Agent UML diagrams 2.1.1. Sequence diagram Let us first define elements of formal infrastructure for multiagent system. Definitions are given as in [4]. Definition 2.1. Sequence diagram is 5-tuple SD := (I, P, M, O, A) where I is a non-empty set of agents or agent roles. P is a non-empty set of protocols where one is major (sd Protocol), and the others can be either interleaved or nested protocols. M is a set of messages either synchronous or asynchronous. Each message is specified as 2-tuple m := (a, options), where a {as, aa}, as synchronous message, aa - asynchronous message, and options specify whether a message is intended to be received by more than a one receiver (n >= 1), or a range of possible receivers ([m, n] equals m <= r <= n, where r is a number of receivers). Also, an option can specify some special conditions on which an message sending is performed or to explicitly identify a particular agent. O is a set of operators O := {alternative, option, break, parallel, weak, strict, negative, critical, ignore, consider, assertion, loop} such that can be easily extended to an appropriate number of newly introduced operators. A is a non-empty set of directed arcs connecting communication actors, therefore it is A I I, and I I is a set of (i1, i2) for all i1, i2 I such that exists Cartesian product (i1, i2) I I and is defined in A. Shape of arc must correspond to character of message, thus arcs are either synchronous or asynchronous. :Initiator :Participant request alternative refuse [refused] [agreed and notification necerassary] agree alternative failure inform_done N is a complex number k1.k2...kn representing the sequential order of the message within the next higher level of procedural calling. Messages that differ in one integer term are sequentially related at that level of nesting. Communication diagram can also be defined as strongly connected directed graph where each node represents communication actor of interaction and each (virtually, two-headed) arrow represents relation between two actors. Messages supplement arrows with semantics of relation. inform_result 2.1.5. Timing diagram translation Figure 1. FIPA protocol for interagent communication in Telephone exchange 2.1.2. Activity diagram Definition 2.2. Activity diagram AD is 3-tuple AD := (S, A, C) where S is a non-empty set of agent states, A is a set of relations between the states where A S S, and S S is a set of (s1, s2) for all s1, s2 S such that exists Cartesian product (s1, s2) S S and is defined in A. C is a set of conditions or events that decide whether agent can change its state or not. These expressions are represented as informal set of text strings. 2.1.3. Interaction Overview diagram Definition 2.3. Interaction Overview diagram ID is 2tuple ID := (SD, AD) where SD is a set of interactions provided for interagent communication as seen in sequence diagram, i.e. ID is a collection of few sequence diagrams connected into one diagram via AD, elements of activity diagram Interaction Overview Diagrams focus on the overview of the flow of control where the nodes are Interactions or Interaction Occurrences. The Lifelines and the Messages do not appear at this overview level [8]. Interaction Overview Diagrams are specialization of Activity Graphs that represent Interactions, and differ from Activity Diagrams in some respects. Definition 2.5. Timing diagram TD := (T, E) Timing diagrams focus on conditions changing within and among Lifelines along a linear time axis. Timing diagrams describe behavior of both individual classifiers and interactions of classifiers, focusing attention on time of occurrence of events causing changes in the modeled conditions of the Lifelines. An example of each of the above defined diagrams can be found in [4]. 3. COLORED PETRI NET APPROACH TO MULTIAGENT SYSTEMS Petri net is formally defined as [3]; Definition 3.1. A CP-net is a 9-tuple CPN = (, P, T, A, N, C, G, E, I) where is a finite set of non-empty colour sets, P is a finite set of places, T is a finite set of transitions, A is a finite set of arcs such that: P T = P A = T A = Ø, N is a node function. It is defined from A into P TT P. C is a colour function. It is defined from P into . G is a guard function. It is defined from T into expressions such that: t T: [Type(G(t)) = B Type(Var(G(t))) ]. E is an arc expression function. It is defined from A into expressions such that: a A: [Type(E(a)) = C(p)MS Type(Var(E(a))) ] where p is the place of N(a). I is an initialisation function. It is defined from P into closed expressions such that: p P: [Type(I(p)) = C(p)MS]. The set of types determines the data values and the operations and functions that can be used in the net expressions (i.e., arc expressions, guards and initialisation expressions). 2.1.4. Communication diagram Definition 2.4. Communication diagram CD is 3-tuple CD := (I, R, M) where I is a non-empty set of agent identifiers (or agent roles), R is a set of relations where R I I, and I I is a set of (i1, i2) for all i1, i2 I such that exists Cartesian product (i1, i2) I I and is defined in R. M is a set of messages where each message is represented as m := (k,,s) where s is a string value representing message name or content of message in its simplest instantiation, and k 3.1. Petri nets benefits CP-nets provide a framework for the design, specification, validation and verification of systems. CPnets have a wide range of application areas, therefore can also be applied in the area of network management. CPN tools support the construction, simulation, and functional and performance analysis of CPN models. CP-nets are extremely useful, and together with some of the other modelling languages (e.g. AUML, considered here), they should be a standard part of the repertoire of advanced system designers and system analysts. Some of CP-nets properties are [3]: • a well-defined semantics, which unambiguously defines the behaviour of each CP-net; • forms the foundation for the formal analysis methods; • generality which is to be used to describe a large variety of different systems; • very few, but powerful primitives; • an explicit description of both states and actions; • a semantics which builds upon true concurrency instead of interleaving; • hierarchical descriptions; • integration of the description of control and synchronization with the description of data manipulation; • stability towards minor changes of the modelled system; etc. 3.2. Petri net based multiagent system Problems to be solved for multiagent system specification are, but not limited to: • • • • • • • • conversation, or to continue with the current conversation. All communications between agents must be carried out through asynchronous message passing as provided by the MSP mechanism [1]. 3.3. CASE STUDY: Telephone exchange Case study to be discussed here is a simplified model of telephone exchange realized by a set of agents: • • • • • • Initialize_call_agent Analyze_number_agent Establish_call_agent Establish_conference_agent Disconnect_call_agent Disconnect_conference_agent Each agents has its own dedicated task which basically corresponds to its name. At lower levels of abstraction we decompose each agent’s task onto smaller or elementary task (theoretical approach to be seen in [5]). As an example Initialize_call_agent is to be decomposed to tasks of checking the resources, checking the database and checking black list of subscribers. modular approach common communication language common protocols asynchronous message passing autonomous and internally-motivated agent mental state reasoning mechanisms inheritance modelling. To support agent-based design, we use extended G-net model [1]. Five special modules are introduced to make an agent autonomous and internally-motivated. They are the Goal module, the Plan module, the Knowledge-base module, the Environment module and the Planner module. The template for an agent-based G-net model is shown in Figure 5. GSP(G) Goal Plan Knowledge Environment Manager Incoming messages request refuse confirm Outgoing messages info info request refuse confirm Internal activities initialize call Figure 3. Telephone exchange realizeed by G-net based agents message processing MSP(self) message message processing processing MSP(self) MSP(self) message processing MSP(self) message processing message processing message message check subscriber processing processing MSP(G'.Aid) MSP(G'.Aid) MSP(G'.Aid) MSP(G'.Aid) return Figure 2. Initialize_call_ agent as G-net based agent A Manager module is the heart of an agent that may decide to ignore an incoming message, to start a new According to agent-based Petri net model [1] we visualize generic model for interagent communication and internal methods for Initialize_call_agent (Figure). Incoming and outgoing messages represent agent’s communication with other agents. Internal activities correspond to agent’s internal structure and possibilities of dynamic behavior. Modules Goal, Plan, Knowledge and Manager are based on BDI agent model (to be seen in [1]) and correspond to agent formal specification. translated onto arc expressions. Set of messages M are also translated onto arc expressions and tokens moving from one place to another. 4.2. Communication diagram translation Communication diagram CD := (I, R, M) is translated onto Petri places and transitions by creating a collection of these for each agent identifier from I set. There is no explicit mechanism to represent R, a set of relations. Thus, it is expressed via connection between various places of each of agents involved. M, a set of messages is translated via Petri arc expressions and also tokens chosen to carry information between Petri entities. Figure 4. Initialize_call_ agent task decomposed to elementary tasks 4. TRANSLATION MECHANISM FROM AGENT UML ONTO COLORED PETRI NETS 4.1. Sequence diagram translation Translation of set SD := (I, P, M, O, A) toward Petri net concepts sets I, set of agents in a collection of Petri places and transitions. Here, the main issue is to recognize WHAT is to be represented by Petri places and transitions, the communication itself of entities involved in the particular communication. P, protocols are 4.3. Activity diagram translation Activity diagram AD as (S, A, C) is inherently closest to genuine Petri net concept where S is a non-empty set of agent states, A is a set of relations between the states where A S S, and S S is a set of (s1, s2) for all s1, s2 S such that exists Cartesian product (s1, s2) S S and is defined in A. C is a set of conditions or events that decide whether agent can change its state or not. These expressions are represented as informal set of text strings. 4.4. Timing diagram translation Timing diagram TD := (T, E) Timing diagrams focus on conditions changing within and among Lifelines along a linear time axis. Timing diagrams describe behavior of both individual classifiers and interactions of classifiers, focusing attention on time of occurrence of events causing changes in the modeled conditions of the Lifelines. Figure 5. Implemention of agent communication 4.5. Simulation results Results of Petri net simulation are imported in a state space file which is generated automatically. It is shown in a form of table below. Occurrence Graph • Nodes: 8 • Arcs: 10 FIPArequest'InitInfoRes 1 FIPArequest'InitRequested 1 FIPArequest'PartAgreed 1 FIPArequest'PartFailed 1 FIPArequest'PartInfoDone 1 FIPArequest'PartInfoRes 1 FIPArequest'PartRequested 1 Best Upper Multi-set Bounds FIPArequest'InactiveInit 1 FIPArequest'InactivePart 1 FIPArequest'InitAgreed 1 FIPArequest'InitFailed 1 FIPArequest'InitInfoDone 1 FIPArequest'InitInfoRes 1 FIPArequest'InitRequested 1 FIPArequest'PartAgreed 1 FIPArequest'PartFailed 1 FIPArequest'PartInfoDone 1 FIPArequest'PartInfoRes 1 FIPArequest'PartRequested 1 Scc Graph • Nodes: 1 • Arcs: 0 Home Properties • Home Markings: All Liveness Properties • Dead Markings: None Boundedness Properties Best Integers Bounds • FIPArequest'InactiveInit 1 • FIPArequest'InactivePart 1 • FIPArequest'InitAgreed 1 • FIPArequest'InitFailed 1 • FIPArequest'InitInfoDone 1 • • • • • • • Upper Lower 1 0 2 0 1 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1`request 1`request++1`tag 1`agree empty empty 1`inform_result 1`request 1`inform_result empty empty 1`inform_result 1`agree Dead Transitions Instances • FIPArequest'Failured 1 • FIPArequest'InformDone 1 • FIPArequest'InitDoneRet 1 • FIPArequest'InitReturn 1 • FIPArequest'PartDoneRet 1 • FIPArequest'PartReturn 1 • FIPArequest'Return 1 Live Transitions Instances • FIPArequest'Agree 1 • FIPArequest'InformResult 1 • FIPArequest'InitRequest 1 • FIPArequest'InitResRet 1 • FIPArequest'PartResRet 1 • FIPArequest'RepRequest 1 Fairness Properties • FIPArequest'Agree 1 • FIPArequest'Failured 1 • FIPArequest'InformDone 1 • FIPArequest'InformResult 1 • FIPArequest'InitDoneRet 1 • FIPArequest'InitRequest 1 • FIPArequest'InitResRet 1 • FIPArequest'InitReturn 1 • FIPArequest'PartDoneRet 1 • FIPArequest'PartResRet 1 • FIPArequest'PartReturn 1 • FIPArequest'RepRequest 1 • FIPArequest'Return 1 Impartial Fair Fair Impartial Fair Impartial Impartial Fair Fair Impartial Fair Impartial Fair TABLE 5.1. OUTPUT FILE REPORT OF PETRI NET SIMULATION The above statistics show respectively; The first part of the state space report contains some statistical information about the size of the state space in notions of graph nodes and arcs. The integer bounds give us information about the number of tokens, while the multi-set bounds give us information about the values which the tokens may carry. A home marking is a marking which is reachable from all reachable markings. A dead marking is a marking with no enabled transitions. Fairness properties provides information on how often the individual transitions occur. Impartial means that each of them occurs infnitely often in any infinite occurrence sequence. Fair is a weaker fairness property stating that the transition occurs infinitely often in all infinite occurrence sequences where it is infinitely often enabled [2]. 5. CONCLUSION In this paper we have offered formal model for specification of mobile agents in telecommunications systems. We’ve presented the “infrastructure” for formal presentation of agent model as problem solving agent. Hence we’ve defined problem environment, problem space and problem set as well as solver vector space and set of problem solvers. We have also research on mechanism of translation from specification to implementation of agent system and object-oriented techniques were found suitable to easily transform vectors to objects. Major aspect of system development is to ensure system is robust and reliable. Therefore it requires welldefined formal system specification and proper validity and verification methods. Here wide area of research on system specification and design arises. According to agent-oriented model respected multiagent system must support agents features such as autonomy, reactiveness and internal motivation. Colored Petri nets provide a framework for the design, specification, validation and verification of systems. They support the construction, simulation, functional and performance analysis of CPN models. CP-nets together with modeling language, e.g. AUML, should be a standard part of the repertoire of advanced system designers and system analysts 6. REFERENCES H. Xu, and S. M. Shatz, A.B. Smith, “A framework for ModelBased Design of Agent-Oriented Software”, IEEE Transactions on Software Engineering, Vol. 29, No. 1, 2003. [2] L. M. Kristensen, S. Christensen, K. Jensen, “The practitioner’s guide to Coloured Petri nets”, IEEE Transactions on Software Engineering, Int J STTT 2, Springer-Verlag, 1998., pp. 98-132. [3] K. Jensen, “An introduction to the Theoretical Aspects of Coloured Petri nets”, A Decade of Concurrency, Lecture Motes in Computer Science vol. 803, Springer-Verlag, 1994., pp. 230-272. [4] M. Kunstic, M. Bagic, “Verification and validation of multiagent system specified by Agent UML”, 1st International Conference on Information & Communication Technologies from Theory to Applications – ICTTA ’04, Damascus, Syria, 19–23 th April 2004. [5] M. Kunstic, M. Bagic, “Development of formal infrastructure for perception of intelligent agents as problem solvers”, International Conference on Computer, Communication and Control Technologies CCCT ‘03, Proceedings Volume 3 Computer, Communication and Control Technologies, IIIS, Orlando, Florida, USA, July 31 – August 2 2003., pp. 65-69. [6] M. Kunstic, O. Jukic, M. Bagic, “Definition of formal infrastructure for perception of intelligent agents as problem solvers”, International Conference on Software, Telecommunications and Computer Networks Softcom 2002., FESB, Split-Dubrovnik, Venice-Ancon, October 8-11, 2002., pp. 9-12. [7] S. S. Alshir, “UML in a nutshell”, O’Reilly & Associates, Inc., 1998. [8] Object Management Group, Unified Modeling Language (UML) Specification: Infrastructure, ptc/03-09-15. [9] K. Jensen, “An introduction to the Practical Use of Coloured Petri nets”, Advanced Course on Petri Nets, Dagstuhl, Germany, 1996. [10] R. Pooley, P. King, “Derivation of Petri Net Performance Models from UML Specifications of Communications Software”, Proceedings of the fifteenth annual UK Performance Engineering Workshop, July 1999., pp. 45-56. [11] F. Bergenti, A. Poggi, “Exploiting UML in the Design of MultiAgent Systems”, Lecture Notes in Computer Science, In A. Omicini, R. Tolksdorf and F. Zambonelli, Engineering Societiea in the Agents World, Springer, 2000., pp. 106-113. [12] P. Hughes, A.; Pahl, C., “A Generic Model for State-based Agent Systems”, Proceedings of the 1st Irish Workshop on Formal Methods, Dublin, 1997. [1]
© Copyright 2026 Paperzz