Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction...

35
Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Agent Interaction Protocols Protocols Richer Role Specification Richer Role Specification Package Extension Package Extension Deployment Diagram Deployment Diagram Extension Extension Conclusion Conclusion

Transcript of Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction...

Page 1: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Overview

UML Extensions for Agents

UMLUML Agent UML (AUML)Agent UML (AUML)

Agent Interaction ProtocolsAgent Interaction ProtocolsRicher Role SpecificationRicher Role SpecificationPackage ExtensionPackage ExtensionDeployment Diagram ExtensionDeployment Diagram Extension

ConclusionConclusion

Page 2: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

UML

Static models: class, package Static models: class, package diagramsdiagrams Dynamic models:Dynamic models:

Interaction diagrams (sequence Interaction diagrams (sequence and collaboration)and collaboration)State diagramsState diagramsActivity diagramsActivity diagrams

Implementation models: component, Implementation models: component, deployment diagramsdeployment diagrams Object constraint language (OCL)Object constraint language (OCL)

Page 3: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

AUML: Agent UML

Both FIPA and OMG are exploring and Both FIPA and OMG are exploring and recommending extensionsrecommending extensionsto UMLto UML Applications:Applications:

Specification of Agent Interaction Specification of Agent Interaction Protocols (AIP)Protocols (AIP)Richer role specificationRicher role specificationPackage extensionPackage extensionDeployment diagram extensionDeployment diagram extension

Page 4: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Agent Interaction Protocols

AIP describes a communication AIP describes a communication pattern as an allowed sequence ofpattern as an allowed sequence ofmessages between agents and the messages between agents and the constraints of the content ofconstraints of the content ofthose messages.those messages. FIPA has specified many protocolsFIPA has specified many protocols

Request Protocol, Query Protocol, Request Protocol, Query Protocol, Request-when Protocol, Contract-Request-when Protocol, Contract-net Protocol, Iterated-Contract-Net net Protocol, Iterated-Contract-Net Protocol, Auction-English Protocol, Protocol, Auction-English Protocol, Auction-Dutch ProtocolAuction-Dutch Protocol

Page 5: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

FIPA Contract-net Protocol

The manager solicits proposals from other agents by The manager solicits proposals from other agents by issuing a call for proposals, which specifies the task and issuing a call for proposals, which specifies the task and any conditions the manager is placing upon the execution any conditions the manager is placing upon the execution of the task.of the task.

Agents receiving the call for proposals are viewed as Agents receiving the call for proposals are viewed as potential contractors, and are able to generate proposals to potential contractors, and are able to generate proposals to perform the task as propose acts.perform the task as propose acts.

The contractor’s proposal includes the preconditions that The contractor’s proposal includes the preconditions that the contractor is setting out for the task, which may be the the contractor is setting out for the task, which may be the price, time when the task will be done, etc.price, time when the task will be done, etc.

The contractor may refuse to propose.The contractor may refuse to propose.

Page 6: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

FIPA Contract-net Protocol, Cont’d.

The manager receives back replies from all of the contractors,The manager receives back replies from all of the contractors,evaluates the proposals and makes its choice of which agents willevaluates the proposals and makes its choice of which agents willperform the task. One, several, or no agents may be chosen. Theperform the task. One, several, or no agents may be chosen. Theagents of the selected proposal(s) will be sent an acceptanceagents of the selected proposal(s) will be sent an acceptancemessage, the others will receive a notice of rejection.message, the others will receive a notice of rejection.

Once the manager accepts the proposal the contractor acquires aOnce the manager accepts the proposal the contractor acquires acommitment to perform the task. Once the contractor has completed the commitment to perform the task. Once the contractor has completed the task, it sends a completion message to the manager.task, it sends a completion message to the manager.

The protocol requires the manager to know when it has received all The protocol requires the manager to know when it has received all replies. In the case that a contractor fails to reply with either a propose or replies. In the case that a contractor fails to reply with either a propose or a refuse, the manager may potentially be left waiting indefinitely. To guard a refuse, the manager may potentially be left waiting indefinitely. To guard against this, the cfp includes a deadline by which replies should be against this, the cfp includes a deadline by which replies should be received by the manager.received by the manager.

Page 7: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

FIPA Notation

Page 8: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

AUML Approach to Protocols

AUML adopts a layered approach to protocols:AUML adopts a layered approach to protocols:Level 1 - Represent the overall protocol (sequence Level 1 - Represent the overall protocol (sequence diagrams, packages, templates)diagrams, packages, templates)Level 2- Represent interactions among agents Level 2- Represent interactions among agents (sequence,(sequence,collaboration, activity, state diagrams)collaboration, activity, state diagrams)Level 3- Represent internal Agent Processing (activity Level 3- Represent internal Agent Processing (activity and state diagrams)and state diagrams)

Page 9: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

A Layered Approach to Protocols

Page 10: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Level 1:Overall protocol

Page 11: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Level 1: Overall Protocol(Packages)

Packages aggregate modeling elements into Packages aggregate modeling elements into conceptual wholesconceptual wholes

in UML 1.3 packages only group class diagramsin UML 1.3 packages only group class diagrams Protocols can be codified as patterns of agent Protocols can be codified as patterns of agent interactioninteraction

in AUML packages can group sequence diagrams in AUML packages can group sequence diagrams (to model protocol patterns)(to model protocol patterns)

Page 12: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Level 1: Using Packages to Express Nested Protocols

Purchasing protocol (Broker X Retailer)Purchasing protocol (Broker X Retailer) Supplying protocol (Retailer X Wholesaler)Supplying protocol (Retailer X Wholesaler)

Page 13: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Level 1- Overall Protocol : Templates

In order for a package to be a true pattern (not simply a In order for a package to be a true pattern (not simply a reusable component) customization must be supportedreusable component) customization must be supported

A template is a parameterized model element whose A template is a parameterized model element whose parameters are bound at model timeparameters are bound at model time

Represented by doted box in upper right corner of the Represented by doted box in upper right corner of the packagepackage

Page 14: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Contract Net Protocol

Level 1 Scenario Involving Level 1 Scenario Involving Buyers and SellersBuyers and Sellers

Page 15: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Level 2: Interactions Among Agents

Extended sequence diagrams (concurrent threads of Extended sequence diagrams (concurrent threads of interaction)interaction)

Collaboration diagramsCollaboration diagrams

Activity diagramsActivity diagrams

Page 16: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Extended Sequence Diagrams

The multiple vertical bars indicate that the The multiple vertical bars indicate that the receiving agent is processing several receiving agent is processing several communication threads concurrently.communication threads concurrently.

ConcurrentConcurrentCommunicationCommunication

Page 17: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Extended Sequence Diagrams

A decision box will decide which CAs A decision box will decide which CAs (zero or more) will be sent.(zero or more) will be sent.

If more than one CA is sent, the If more than one CA is sent, the communication is concurrentcommunication is concurrent

Page 18: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Extended Sequence Diagrams

Exclusive OR, so exactly one CA will be sentExclusive OR, so exactly one CA will be sent

Page 19: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Extended Sequence Diagrams Expressing the roles an agent play: Agent/RoleExpressing the roles an agent play: Agent/Role

Page 20: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Collaboration Diagrams Another way of showing pattern of interaction among agentsAnother way of showing pattern of interaction among agents

Page 21: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Activity Diagrams Provides an explicit thread of controlProvides an explicit thread of control

Useful for complex interaction protocols that involve concurrentUseful for complex interaction protocols that involve concurrentprocessingprocessing

ECN:ElectronicCommerceNetworkAgent

Page 22: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Internal Agent Processing Processing within an Order Processor agent

Page 23: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Internal Agent Processing

Payment Receiver and Invoice Sender Agents

Page 24: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Other AUML Considerations

Richer role specification

Package extension

Deployment diagram extension

Page 25: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Richer Role Specification

Often we need to express the role an agent may play in the course of its interaction with other agents

If the number of agent and roles increases, UML diagrams becomegraphically to complex

Page 26: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Agent/Role Extension

Four agents playing 6 Roles:Customer, Negotiator, Contractor,Competitor Analyzer, Competitor, Debtor

Page 27: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Reducing Visual Complexity

Each role with its own lifeline

Page 28: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Reducing Visual ComplexityReducing Visual Complexity Each agent with a single lifeline and each activation is labeled

with the appropriate roll name

Page 29: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Role and Collaboration DiagramsRole and Collaboration Diagrams

UML has no facility to represent agent roles on interaction lines Labeling messages with the role

Page 30: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Role and Activity DiagramRole and Activity Diagram

Roles can be associated with activities

Page 31: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Role and Activity DiagramRole and Activity Diagram

Roles can be represented by notes

Page 32: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Package ExtensionsPackage Extensions

The interface can be an agent itself

Page 33: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

Deployment Diagram ExtensionsDeployment Diagram Extensions

Indication of mobility paths and at-home declarations

Page 34: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

ConclusionsConclusions

(A)UML provides tools for provides tools for Specifying agent interaction protocols Representing the internal behavior of an agent Representing role specification, packages with agent

interfaces, deployment diagrams indicating mobility, etc.

Page 35: Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.

ReferencesReferences

James Odell, H. Van Dyke Parunak, Bernhard Bauer. Representing Agent Interaction Protocols in UML, 1999.

James Odell, H. Van Dyke Parunak, Bernhard Bauer. Extending UML for Agents, 2000.

James Odell, Conrad Bock. OMG document ad/99-12-01. Suggested UML Extensions for Agents. Submitted to the OMG’s Analysis and Design Task Force (ADTF) in response to the Request of Information (RFI) entitled “UML2.0 RFI”. Dec. 1999.

Bernhard Bauer. OMG document ad/99-12-03. Extending UML for the Specification of Agent Interaction Protocols. FIPA submission to the OMG’s Analysis and Design Task Force (ADTF) in response to the Request of Information (RFI) entitled “UML2.0 RFI”. Dec. 1999.