20011130 pout a kid is slides

Upload: abhishek-maheshkar

Post on 07-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 20011130 Pout a Kid Is Slides

    1/29

    Debugging Multi-agent Systems

    Using Design Artifacts:

    The Case of Interaction

    Protocols

    By David Poutakidis

  • 8/4/2019 20011130 Pout a Kid Is Slides

    2/29

    Introduction

    Agents are software

    Developing agents is developing software

    Need appropriate design methodologiesand tools (Prometheus)

    Debugging and Testing are an important

    part of any system development.

  • 8/4/2019 20011130 Pout a Kid Is Slides

    3/29

    Debugging is important.

    Up to 50% of the total cost/time ofdevelopment

    Much of this time is spent trying to:

    Locate bugs

    Determine the cause of a problem

    Debugging problem exacerbated by theflexibility and complexity of agent systems

  • 8/4/2019 20011130 Pout a Kid Is Slides

    4/29

    Current Debugging

    Techniques

    Information gathering and visualisation

    Filtering applied

    Color Coded messages displayed at runtime

    Limitations

    Too much information to digest

    No process for choosing the info to display

    Relies on programmer interpreting messageflow properly

  • 8/4/2019 20011130 Pout a Kid Is Slides

    5/29

    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, plandescriptors, etc

  • 8/4/2019 20011130 Pout a Kid Is Slides

    6/29

    Central Thesis:

    is that the designdocumentsandsystem

    modelsdevelopedwhen followinganagentbasedsoftware engineeringmethodologycanbevaluable resourcesduringthe debuggingprocessandshouldfacilitate the automaticor

    semi-automaticdetectionoferrors.

  • 8/4/2019 20011130 Pout a Kid Is Slides

    7/29

    Interaction Protocols

    Capture interaction patterns betweenagents

    Allow choices and describe all allowableinteractions

    Existing protocols developed, eg FIPA

    (based on AUML)

  • 8/4/2019 20011130 Pout a Kid Is Slides

    8/29

    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. Customerspecifies delivery

    3. Shop ass.

    Obtains &

    checks creditdetails

    4. Shop ass.

    thanks customer

    and places order

    Use Case and Interaction

    Diagram

  • 8/4/2019 20011130 Pout a Kid Is Slides

    9/29

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    10/29

    Debugging with Interaction

    Protocols

    Agent AgentMessages

    Debugger

    User

  • 8/4/2019 20011130 Pout a Kid Is Slides

    11/29

    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 othernotations altogether.

    We use equivalent Petri Nets internally

    Clear formal semantics, algorithms and toolsfor checking properties (liveness, deadlock)

  • 8/4/2019 20011130 Pout a Kid Is Slides

    12/29

    Petri Nets Explained

    Consists of Places (depicted as

    circles) and Transitions

    depicted as squares.

    Places and Transitions linked

    by arrows.

    Places can contain tokenswhich indicate its marking and

    the state the net is in.

    Before Firing

    After Firing

  • 8/4/2019 20011130 Pout a Kid Is Slides

    13/29

    Converting AUML protocol to a

    Petri net equivalent.

    a aP Q

    P

    a

    QQ

    P

    a

  • 8/4/2019 20011130 Pout a Kid Is Slides

    14/29

    Translating AUML Connectors

    a

    b

    AUML:

    Selection

    Petri net:

    Selection

    P

    P

    Q

    Q

    a b

    R

    R

  • 8/4/2019 20011130 Pout a Kid Is Slides

    15/29

    M1

    CCR

    B1

    CDR

    M2

    CCD

    B2

    Fraud

    M6

    M3

    M5M4

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    16/29

    Reject-2

    Reject-1

    Approve

    M1

    CCRB1

    CDR

    M2

    CCD

    M6

    B2

    M3

    B2B2

    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.

  • 8/4/2019 20011130 Pout a Kid Is Slides

    17/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    18/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    19/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    20/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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:CCDToken placed on CCD

    Fire Net

  • 8/4/2019 20011130 Pout a Kid Is Slides

    21/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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:CCDToken placed on CCD

    Fire Net

  • 8/4/2019 20011130 Pout a Kid Is Slides

    22/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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:CCDToken placed on CCD

    Fire Net

  • 8/4/2019 20011130 Pout a Kid Is Slides

    23/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    24/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    25/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    26/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    27/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    28/29

    Reject-2

    Reject-1

    Approve

    M1

    CDR

    M2

    CCD

    M6

    B2

    B2B2

    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

  • 8/4/2019 20011130 Pout a Kid Is Slides

    29/29

    Future Work

    Currently implementing the debuggingagent

    Provide tool support to automaticallyconvert AUML protocols to Perti nets

    Investigate how other design artifacts

    can be used for debugging