Top Banner
Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis
29

Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Dec 14, 2015

Download

Documents

Joan Bingley
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Debugging Multi-agent Systems Using Design Artifacts:

The Case of Interaction Protocols

By David Poutakidis

Page 2: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Introduction

Agents are softwareDeveloping agents is developing

softwareNeed appropriate design

methodologies and tools (Prometheus)Debugging and Testing are an

important part of any system development.

Page 3: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Debugging is important.

Up to 50% of the total cost/time of development

Much of this time is spent trying to: Locate bugs Determine the cause of a problem

Debugging problem exacerbated by the flexibility and complexity of agent systems

Page 4: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Current Debugging Techniques

Information gathering and visualisation Filtering applied Color Coded messages displayed at

runtimeLimitations

Too much information to digest No process for choosing the info to display Relies on programmer interpreting

message flow properly

Page 5: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Our Approach: Make use of Design Documents

During design, documents are produced: which represent the developers description

of the system that describe how the system should operate that guide the programmers during coding

Design Artifacts: interaction protocols, interaction diagrams,

scenario diagrams, capability diagrams, plan descriptors, etc

Page 6: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Central Thesis:

is that the design documents and system models developed when following an agent based software engineering methodology can be valuable resources during the debugging process and should facilitate the automatic or semi-automatic detection of errors.

Page 7: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Interaction Protocols

Capture interaction patterns between agents

Allow choices and describe all allowable interactions

Existing protocol’s developed, eg FIPA (based on AUML)

Page 8: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Buy bookBuy book

Delivery info.Delivery info.

Delivery choiceDelivery choice

Card detailsCard details

Card details requestCard details requestCard detailsCard details

ApprovalApprovalThanksThanks OrderOrder

User Shop ass. Warehouse Cashier

Credit check requestCredit check request

Details requestDetails request

Use case:

1. Customer orders book

2. Customer specifies delivery

3. Shop ass. Obtains & checks credit details

4. Shop ass. thanks customer and places order

Use Case and Interaction Diagram

Page 9: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Merchant Bank

x

Credit check request (CCR)

Card details request (CDR)

Card details (CCD)

Approve

Reject-2

Fraud

Reject-1

M1

M2

M3

M4

M5

M6

B1

B2

Page 10: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Debugging with Interaction Protocols

Agent AgentMessages

Debugger

User

Page 11: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

AUML not suitable for debugger

AUML not used internally by the debugger AUML is not precisely defined, no formal

semantics decouple the underlying representation to

allow for future versions of AUML or other notations altogether.

We use equivalent Petri Nets internally Clear formal semantics, algorithms and tools

for checking properties (liveness, deadlock…)

Page 12: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Petri Nets Explained

•Consists of Places (depicted as circles) and Transitions depicted as squares.

•Places and Transitions linked by arrows.

•Places can contain tokens which indicate it’s marking and the state the net is in.

Before Firing

After Firing

Page 13: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Converting AUML protocol to a Petri net equivalent.

a aP Q

P a

QQ

P a

Page 14: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Translating AUML Connectors

a

b

AUML: Selection

Petri net: Selection

P

P

Q

Q

a b

R

R

Page 15: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

M1

CCR

B1

CDR

M2

CCD

B2

Fraud

M6

M3

M5M4

B2’’B2’

Reject-2

Reject-1

Approve

Bank

x

Credit check request (CCR)

Card details request (CDR)

Card details (CCD)

Approve

Reject-2

Fraud

Reject-1

M1

M2

M3

M4

M5

M6

B1

B2

Merchant

Page 16: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CCRB1

CDR

M2

CCD

M6

B2

M3

B2’ B2’’

M4 M5

Execution of the Debugging Agent

Repeat:

1. Receive message m

2. Check m against existing protocol instances

3. Fire the Petri Net(s)

4. Examine the Petri Net(s) for erroneous conditions.

Page 17: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

B1

Page 18: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

B1

Page 19: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

B2

Page 20: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD•Token placed on CCD

•Fire Net

Page 21: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD•Token placed on CCD

•Fire Net

Page 22: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•New protocol instance created and token placed on M1

•Token placed on CCR

•Fire net

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD•Token placed on CCD

•Fire Net

Page 23: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD

•Token placed on CCD

•Fire Net

•Bank to Merchant: Approve•Token placed on approve

•Fire net

Page 24: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD

•Token placed on CCD

•Fire Net

•Bank to Merchant: Approve•Token placed on approve

•Fire net

Page 25: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•Bank to Merchant: CDR

•Token placed on CDR

•Fire net

•Merchant to Bank:CCD

•Token placed on CCD

•Fire Net

•Bank to Merchant: Approve•Token placed on approve

•Fire net

Page 26: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•Bank to Merchant: CDR

•Merchant to Bank:CCD

•Token placed on CCD

•Fire Net

•Bank to Merchant: Approve

•Token placed on approve

•Fire net

•Bank to Merchant: Fraud•Token placed on Fraud

•Fire Net

Fraud

Page 27: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Consider the following sequence of messages:

•Merchant to bank: CCR

•Bank to Merchant: CDR

•Merchant to Bank:CCD

•Token placed on CCD

•Fire Net

•Bank to Merchant: Approve

•Token placed on approve

•Fire net

•Bank to Merchant: Fraud•Token placed on Fraud

•Fire Net

Fraud

Page 28: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Reject-2

Reject-1

Approve

M1

CDR

M2

CCD

M6

B2

B2’ B2’’

M4 M5

M3

CCR

Error encountered!!!

•No transition enabled (because there is no token on B2)

•The debugging agent reports a bug: the fraud message was unexpected

Fraud

Page 29: Debugging Multi-agent Systems Using Design Artifacts: The Case of Interaction Protocols By David Poutakidis.

Future Work

Currently implementing the debugging agent

Provide tool support to automatically convert AUML protocols to Perti nets

Investigate how other design artifacts can be used for debugging