Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla...

30
Separating Crosscutting Separating Crosscutting Concerns in Agent Oriented Concerns in Agent Oriented Detailed Design: The Social Detailed Design: The Social Patterns Case Patterns Case Carla Silva Carla Silva Advisor: Jaelson Castro Jaelson Castro Co-Advisors: João Araújo João Araújo and Patrícia Tedesco and Patrícia Tedesco [email protected]

Transcript of Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla...

Page 1: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

Separating Crosscutting Concerns Separating Crosscutting Concerns in Agent Oriented Detailed Design: in Agent Oriented Detailed Design:

The Social Patterns Case The Social Patterns Case

Carla SilvaCarla SilvaAdvisor: Jaelson CastroJaelson Castro

Co-Advisors: João Araújo João Araújo

and Patrícia Tedescoand Patrícia Tedesco

[email protected]

Page 2: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

2

ContentContent

Motivation Proposal Case Study Contributions Future Work

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 3: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

3

Agent Oriented Software DevelopmentAgent Oriented Software Development

Multi-agent systems (MAS)

Problem 1: no consensus regarding MAS constructs Problem 2: no standard notation for MAS

Responsibility_C1Responsibility_C2

Responsibility_A1Responsibility_A2

Responsibility_D1Responsibility_D2

Responsibility_B1Responsibility_B2

A B

C D

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 4: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

4

Tropos FrameworkTropos Framework

Tropos supports five phases of the software development lifecycle.

Problem 3: no systematic process for detailed design

<<Discipline>>Early Requirements

<<Discipline>>Late Requirements

<<Discipline>>Architectural Design

<<Discipline>>Detailed Design

<<Discipline>>Implementation

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 5: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

5

Detailed Design PhaseDetailed Design Phase

Additional detail to architectural components Reuse well-tested solutions to recurring problems

Social Patterns Ex.: Monitor, Broker, Matchmaker, Mediator, Embassy,

Wrapper, Booking, Call-for-proposal, Subscription, Bidding Patterns provide easy reuse of good software design

Description_RespA_P1Description_RespB_P1

P1

Description_RespA_P2Description_RespB_P2

P2

Description_RespA_P3Description_RespB_P3

P3

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 6: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

6

Matchmaker Pattern

Problem 4: no standard (and detailed) description of social patterns Problem 5: no guidelines to select social patterns Problem 6: no systematic way to apply social patterns

Description of a Social PatternDescription of a Social Pattern

Request Provider ID

Register Yellow PagesUnregister Yellow PagesLocate Provider

Matchmaker

Request Registration Request Unregistration

Client

Provider

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 7: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

7

ResponsibilityA_P1ResponsibilityB_P1

P1

ResponsibilityA_P2ResponsibilityB_P2

P2

ResponsibilityA_P3ResponsibilityB_P3

P3

Application of a Social Pattern to a MASApplication of a Social Pattern to a MAS

Responsibility_C1Responsibility_C2

Responsibility_A1Responsibility_A2

Responsibility_D1Responsibility_D2

Responsibility_B1Responsibility_B2

A B

C D

Pattern applied to the system

Pattern Description Multi-Agent System

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 8: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

8

Request Provider ID

Register Yellow PagesUnregister Yellow PagesLocate Provider

Matchmaker

Request Registration Request Unregistration

Client

Provider

Contact News AgenciesProduce News

Format News ArticleReviews News Content

Update Website

Decompose GuidelineFormat Newspaper

Editor Chief Editor

Rep-Photo Webmaster

Application of the Matchmaker Pattern to a MASApplication of the Matchmaker Pattern to a MAS

Pattern Description Multi-Agent System

Matchmaker Pattern Description

Multi-Agent System

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 9: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

9

Application of an Social Pattern to a MASApplication of an Social Pattern to a MAS

Problem 7: Matchmaker Pattern concerns are crosscutting concerns Scattering and tangling

Low cohesion High coupling

reusability

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 10: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

10

MotivationMotivation

1. No consensus regarding MAS constructs

2. No standard notation for MAS

3. No systematic process for detailed design

4. No standard (and detailed) description of social patterns

5. No guidelines to select social patterns

6. No systematic way to apply social patterns

7. Matchmaker Pattern concerns are crosscutting concerns

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 11: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

11

ProposalProposal

1. Agency Metamodel

2. MAS Modeling Notation

3. Detailed Design Process

4. Agent Pattern Specifications

5. Heuristics to select Social Patterns

6. A technique to systematically apply Social patterns

7. Advanced separation of Social Patterns concerns

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 12: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

12

Agency metamodelAgency metamodel

Define some constructs to specify MAS Intentional constructs

Agent Role, Agent, Goal, Belief, Intention, Plan, Action, etc. Interaction constructs

Interaction Protocol, Communication Message, Agent Connector, Organizational Port, ACL, etc.

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 13: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

13

MAS modeling notationMAS modeling notation

2 behavioral diagrams Communication diagram

Plan diagram

4 structural diagrams Architectural diagram

Intentional diagram

Rational diagram

Environmental diagram

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 14: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

14

Detailed DesignDetailed Design

A step-by-step to guide the detailed design of MAS

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 15: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

15

Agent Pattern Specifications Agent Pattern Specifications

Specializes the agency metamodel by using model roles (France et al.)

Whittle et al. and Araújo et al. uses model roles to address aspect modeling

The APS technique comprises A description template An Structural Agent Pattern Specification A Communication Agent Pattern Specification

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 16: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

16

The Template for a Pattern DescriptionThe Template for a Pattern Description

Element Description

Name Matchmaker Pattern

Intent To locate a provider for a given service requested by a client and letting the client directly interact with the provider.

Applicability When an agent (client) needs to directly interact with another agent (provider) to use its services, but does not know what agent offers the desired service.

Motivation Example

A reporter agent needs to interact with a news agency to obtain news about a specific subject. The news agency to be contacted is going to be known at run time by any reporter agent.

Problem How can clients locate unknown providers which offer a specific service?

Solution The solution involves an intermediary agent (matchmaker) that receives requests from service providers to subscribe/unsubscribe its services into the yellow pages maintained by it. An agent (client) may need a specific service provided by an unknown agent (provider). The Matchmaker also receives requests from client agents to locate some provider agent which offers a specific service. If there is some provider for the requested service, the Matchmaker gives that provider’s identification to the client which, in its turn, can directly interact with it.

Participants The Client requests the identification of an agent that provides a specific service. The Matchmaker finds the Provider of the requested service and gives its identification to the Client. The Provider must subscribe the Matchmaker yellow page service in order to be found by the clients requesting its services.

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 17: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

17

Matchmaker Structural Agent

Pattern Specification

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 18: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

18

Matchmaker Structural Agent Pattern Specification

Agent Role Dependum MacroPlanGoal NotesComplexAction

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 19: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

19

Matchmaker Communication Agent Pattern SpecificationMatchmaker Communication Agent Pattern Specification

Agent Agent Role Message

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 20: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

20

Towards ImplementationTowards Implementation

Guidelines to implement Social Patterns using an integration of JADE and AspectJ

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 21: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

21

Case StudyCase Study

Conference Management System Content Manager System, called e-NewsContent Manager System, called e-News

Contact News AgenciesProduce News

Format News ArticleReviews News Content

Update Website

Decompose GuidelineFormat Newspaper

Editor Chief Editor

Rep-Photo Webmaster

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 22: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

22

Architectural Diagram for e-NewsArchitectural Diagram for e-News M

oti

vati

on

P

rop

osa

l C

ase

Stu

dy

C

on

trib

uti

on

s

Fu

ture

Wo

rk

Page 23: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

23

Architectural Diagram for e-NewsArchitectural Diagram for e-News

Agent Role

Dependum

Goal

ComplexAction

MacroPlan

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 24: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

24

Selection of Social Patterns Selection of Social Patterns

Some heuristics Observe the system non-functional requirements (NFRs) Analyze the patterns templates Choose the social patterns which better address the

NFRs For example, AvailabilityAvailability

The Matchmaker pattern helps to accomplish this NFR

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 25: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

25

Application of Social PatternsApplication of Social Patterns

Systematic application Bind Model Roles to

Model Elements

Pattern Description

MAS Architectural Diagram

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 26: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

26

Pattern applied to MASPattern applied to MAS

Client Concerns

Provider Concerns

Matchmaker Concerns

Application Concerns

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 27: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

27

ContributionsContributions

Agency metamodel defines a set of concepts to specify MAS

MAS modeling notation can be used in other frameworks/methodologies besides

Tropos is supported by UML CASE tools

Detailed design process guidelines to map i* to MAS modeling notation heuristics to select social patterns systematic application of social patterns

Standard technique to describe social patterns more detailed description promotes advanced separation of patterns concerns guidelines to implement social patterns

integration of JADE and AspectJ

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 28: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

28

Future WorkFuture Work

Real case studies MAS modeling notation Heuristics to select social patterns Description of social patterns

Empirical evaluation Social patterns implemented as aspects Composition of social patterns

Advanced Separation of Patterns Concerns

CASE tool Detailed Design Process

Mo

tiva

tio

n

Pro

po

sal

Cas

e S

tud

y

Co

ntr

ibu

tio

ns

F

utu

re W

ork

Page 29: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

29

PublicationsPublications

12 papers related to the thesis

1 paper

1 poster

1 chapter - SELMAS V LNCS (2007)

1 paper

1 paper

1 paper - WASP’06

1 paper - SELMAS’04

1 paper - SELMAS’06

1 paper

1 paper

1 paper

1 paper

Forum

Pu

blic

atio

ns

Page 30: Separating Crosscutting Concerns in Agent Oriented Detailed Design: The Social Patterns Case Carla Silva Jaelson Castro Advisor: Jaelson Castro João Araújo.

Separating Crosscutting Concerns Separating Crosscutting Concerns in Agent Oriented Detailed Design: in Agent Oriented Detailed Design:

The Social Patterns Case The Social Patterns Case

Carla SilvaCarla SilvaAdvisor: Jaelson CastroJaelson Castro

Co-Advisors: João Araújo João Araújo

and Patrícia Tedescoand Patrícia Tedesco

[email protected]