29
Extending UML for Agents ب ئ ا غ ل ا ي عل ر م ع ن س ح: ب للطا ا ف ن ح مد الأ ح م اح$ ت ف م مد ح م: ب للطا ا: ي س م درا$ ق ر6269 : ي س م درا$ ق ر6109 ماري ع ل مد ا ح م ور :$ ت ك لد ل دم$ ق م ماري ع ل مد ا ح م ور :$ ت ك لد ل دم$ ق م ماري ع ل مد ا ح م ور :$ ت ك لد ل دم$ ق م ماري ع ل مد ا ح م ور :$ ت ك لد ل دم$ ق م ماري ع ل مد ا ح م ور :$ ت ك لد ل دم$ ق م

Extending UML for Agents

Embed Size (px)

Citation preview

Page 1: Extending UML for Agents

Extending UML for Agents

علي : عمر حسن الطالبالغائب

محمد : مفتاح محمد الطالباألجنف دراسي : دراسي :6269رقم 6109رقم

العماري : محمد للدكتور العماري : مقدم محمد للدكتور العماري : مقدم محمد للدكتور العماري : مقدم محمد للدكتور العماري : مقدم محمد للدكتور مقدم

Page 2: Extending UML for Agents

Overview

2. Introduction to Agents

3. Introduction to Agent UML

4. Class Diagram

5. Interaction Diagram

1. Introduction to UML

Page 3: Extending UML for Agents

Introduction to UML

• Static models: class, package diagrams

• Dynamic models:Interaction diagrams (sequence and

collaboration)State diagramsActivity diagrams

• Implementation models: component, deployment diagrams

Object constraint language (OCL)

Page 4: Extending UML for Agents

Introduction to Agent

What is an agent ?

An agent is an hardware or software system placed in an environment that enjoys the following properties:

Autonomy . Socialability . Reactivity . Proactivity .

Page 5: Extending UML for Agents

Introduction to Agent UML

What is Agent UML ?

Agent UML is a support notation for agent-oriented systems development.

It consists in using the UML modeling language and extending it in order to represent agents, their behavior and interactions among them.

AUML is not restricted to using UML. Other approaches should be used wherever it makes sense.

Page 6: Extending UML for Agents

Who is interestedin AUML

• OMG Special Interest Group: recommends standards for agent technology where appropriate (www.omg.org)

• FIPA Modeling Technical Commitee: tasked with developing an AUML standard (www.auml.org)

• Other methodologies: MESSAGE, Gaia, Tropos, Prometheus, MaSE, ...

Page 7: Extending UML for Agents

Reference(s) Year Methodology #

(Cockburn and Jennings, 1996) 1991 ARCHON 1

(O’Hare and Wooldridge , 1992) 1992 MADE 2

(Singh et al., 1993) 1993 DRM 3

(Gadomski, 1993) 1993 TOGA 4

(Elammari, 1999) 1999 HIM 5

(Wooldridge et al., 2000; Zamboneli et al., 2005)

2000 Gaia 6

(Caire et al., 2000; Evans et al., 2001)

2000 MESSAGE/UML 7

A survey of agent-oriented software engineeringparadigm: Towards its industrial acceptance

Table 1. List of AOSE methodologies introduced before year 2000.

Page 8: Extending UML for Agents

AOSE methodologies

Page 9: Extending UML for Agents

Common features of agents Agents share some common characteristics:

Identifier :identifies each agent in a multiagent system

Role :defines the behaviour of an agent into the society (es. Seller, Buyer)

Organization :defines the relationships between the roles (similar to human or animal organizations such as hierarchies, markets, groups of interest or herds)

Capability :specifies what an agent is able to do and under what conditions

Service :describes an activity that an agent can perform and is provided to other agents

Page 10: Extending UML for Agents

Representation of agents

UML Class Diagrams can be used to represent the static view of agents.

<<agent>> agent-name

Role

role 1, role 2, …, role nrole dynamic 1, role dynamic 2, …, role dynamic n

Organization

organization 1, organization 2, …, organization norg dynamic 1, org dynamic 2, …, org dynamic n

Page 11: Extending UML for Agents

Capabilities representation (1)A capability is composed of the following parts:

Input Output Input constraints Output constraints Input-output constraints Description

Page 12: Extending UML for Agents

Capabilities representation (2)

<<capability>> addition

Inputx,y:Integer

Outputs:Integer

DescriptionThis capability makes the sum of two integers and returns an integer

<<agent>> sum

Roleaddition, subtractionrd 1

Organizationcalculator

Protocolenter-society, exit-societycompute

<<capability>> subtraction

Inputx,y:Integer

Outputd:Integer

Input Constraintx>=0, y>=0

Input-Output Constraintx-y >=0

DescriptionThis capability makes the difference of two integers and returns an integer

• Example of capability representation:

The agent ‘sum’ has two capabilities expressing the fact that he is able to make additions and subtractions

They can be definedusing OCL or simplelogic expressions

Page 13: Extending UML for Agents

Service representation (1)A service is composed of the following parts:

Name Description Type Protocol Agent communication language Ontology Content language Properties

Page 14: Extending UML for Agents

Service representation (2)

<<agent>> sum

Roleaddition, subtractionrd 1

Organizationcalculator

Protocolenter-society, exit-societycompute

<<service>> computation

DescriptionThis service makes an addition when requested by the request addition protocol and makes a subtraction when requested by the request-subtraction protocol

Typecomputation

Protocolrequest-additionrequest-subtraction

Agent Communication LanguageFIPA ACL

Ontologycomputation ontology

Content LanguageFIPA SL

• Example of service representation:

The agent ‘sum’ exports a service that makes additions and subtractions on demand

Page 15: Extending UML for Agents

Representing interactionsWhat are Sequence Diagrams?

• Sequence Diagrams are interaction diagrams that detail how operations are carried out .

• Interaction diagrams model important runtime interactions between the parts that make up the system .

• Interactions Diagrams

- Sequence diagrams - Interaction overview diagrams -Timing diagrams - Communication diagrams

Page 16: Extending UML for Agents

Representing interactions

Agent interactions can be represented in UML standard using sequence diagrams

Page 17: Extending UML for Agents

Concurrent interactions (1)• UML has been extended in order to represent concurrent communication acts

sent from the sender agent to the receiver.

a) Concurrent communication acts from CA-1 to CA-n are sent in parallel.

b) A selection of the n acts is sent in parallel (zero or more).

Page 18: Extending UML for Agents

c) Exclusive choice: only one of the communication acts is sent.

Concurrent interactions (1)

Page 19: Extending UML for Agents

Concurrent interactions (2)• a) An agent sends 3 concurrent

CA to another agent. The diagram can be interpreted in two different ways:– Every CA is processed from

the same agent/role by a different thread of execution

– Every CA is processed by a different role of the agent (in this case mesages can be annotated specifying the role)

b) The same semantic of (a) but with a simpler notation

Page 20: Extending UML for Agents

Concurrent interactions (2)

• c) Choice from three different communication act received by three different threads (or roles)

• NOTE: each concurrent CA can be sent to different agents

Page 21: Extending UML for Agents

Example of interaction

• The Buyer sends a request-for-proposal to the Seller

• The Seller has three options to choose within the deadline:– make a proposal– refuse (with different reasons)– say he did not understand

• If the Seller has made a proposal, the Buyer has the choice to reject or to accept it

• If the last is the case, the Seller schedules the proposal informing the Buyer about its the state

• The Buyer can cancel the proposal execution at any time

Page 22: Extending UML for Agents

Detailing interaction messages

• Any interaction process can be expressed in more detail.

• The “leveling” can continue down until the problem has been specified adequately to generate code.

• Also activity diagrams and statecharts can be used.

Page 23: Extending UML for Agents

Internal Agent Processing

Processing within an Order Processor agent

Page 24: Extending UML for Agents

Roles management

• UML sequence diagrams can be used to represent changes in agents’ role.

Page 25: Extending UML for Agents

Object role in AOP

• Objects may always be included in an agent-oriented system and can communicate with agents using message passing methods.

Page 26: Extending UML for Agents

Other AUML Considerations

Richer role specification

Package extension

Deployment diagram extension

Page 27: Extending UML for Agents

Deployment Diagram Extensions

Indication of mobility paths and at-home declarations

Page 28: Extending UML for Agents

References (1)

Agents– [Wooldridge et al, 1995]

Wooldridge and JenningsIntelligent Agents: Theory and PracticeKnowledge Engineering ReviewVolume 10 No 2, June 1995Cambridge University Press(www.csc.liv.ac.uk/~mjw/pubs/ker95/ker95-html.html)

– [Shoham, 1993]Y. ShohamAgent-oriented programmingArtificial Intelligence60(1):51-92(http://www.ncat.edu/~esterlin/c7902s02/Notes/Shoham.pdf)

Page 29: Extending UML for Agents

References (2)

Agent UML– http://www.auml.org/– http://www.jamesodell.com/– http://aot.ce.unipr.it/auml/