Aspectos @ PUC-Rio
nomes
PUC-Rio
http://www.teccomm.les.inf.puc-rio.br/SoCAgents
Estudos Empíricos
Sistemas Multi-Agentes
- Padrões OO vs. Aspectos -
- O Domínio -
Sensor
send()
...
Learning
Interaction
Collaboration
collaboratingAgents
collaborationProtocol
getName()
addAgent()
removeAgent()
…
...
papers
learningComponents
submissionDeadline
reviewDeadline
addLC()
removeLC()
notifyLC()
distributeProposal()
...
processInformation()
getLR()
…
Agent
RevisionProposal
goals
plans
sensors
effectors
addAgent()
sendMsg()
receiveMsg()
…
paper
deadlines
currentPaperInterest
proposalEvaluation
isAccepted()
…
getPaperInterest()
getEvaluation()
…
Reviewer
UserAgent
chairName
papersToReview
learningComponents
setChair()
addLC()
removeLC()
notifyLC()
returnJudgement()
…
CVUpdatePlan
learningComponents
researchInterests
addLC()
publications
removeLC()
reviews
notifyLC()
learningComponents
execute ()
addPCparticipation()
public Result judgeProposal(...) {
updateCV()
...
addLC()
...
lc.processInformation();
removeLC()
...
notifyLC()
}
…
learningComponents
addLC()
removeLC()
notifyLC()
execute ()
judgeProposal()
emitJudgement()
...
Plan
Middle
Agent
Proposal
User
Agent
Information
Agent #2
Caller
#4
Editor
Answerer
#4
Interaction
ailability
Plan
Basic
Concerns
Point
Line
getX
getY
getColor
addObserver
removeObserver
notify
setX
setY
setColor
getP1
getP2
getColor
addObserver
removeObserver
notify
setP1
setP2
setColor
Screen
update
Display
Comparação
Counter
Proposal
Resultados
Judgement
ReceptionPlan
learningComponents
addLC()
removeLC()
notifyLC()
execute ()
evaluateResponse()
...
16
Resultados
80
70
60
50
40
30
20
IT
O
BC
C
O
LC
D
C
O
A
O
W
N
C
LO
Métricas
- Avaliação -
Knowledge
Adaptation
Adaptation
Behavior
Adaptation
...
getInterest()
...
<< crosscutting
interface >>
Information
Gathering
Reviewer
events_()
UserAgent
Reviewer
Learning
init()
learn()
getResponse()
...
TDLearning
processInformation()
getTD()
getReward()
setReward()
…
JudgementPlan
Knowledge
Updating
Message
Reception
Interaction
Services
execute()
judgeProposal()
...
Traveling
Message
Sending
Kernel
Legend:
Goal
Creation
aspectual component
component
crosscutting interface
normal interface
Autonomy
Execution
Autonomy
Collaboration
Automatização
Automatização
Role
Binding
+66%
12
10
8
+29%
+33%
+33%
6
-50%
4
0%
-50%
-40%
+25% +25%
0% 0%
0
Before After
Before After
Before After
Before After
Before After
Before After
Before After
Observer
Subject
Mediator
Colleague
Context
Strategy
Prototype
Medição
Counts how far down in the inheritance hierarchy a class or aspect is
declared.
Lack of Cohesion in
Operations (LCOO)
Measures the lack of cohesion of a class or an aspect in terms of the
amount of method and advice pairs that do not access the same instance
variable.
Lines of Code (LOC)
Number of Attributes (NOA)
Weighted Operations per
Component (WOC)
Counts the lines of code.
Counts the number of attributes of each class or aspect.
Counts the number of methods and advices of each class or aspect and the
number of its parameters.
SoC
Concern Diffusion over
Operations (CDO)
Referências
Mobility
Extrinsic
Collaboration Knowledge
Protocol
14
Depth of Inheritance Tree
(DIT)
Coupling
learningRate
processInformation()
...
+67%
Cohesion
Additional Properties
paperInterest
evaluation
*
Prototype
Pattern
AO
OO
Concern Diffusion over
LOC (CDLOC)
Coupling Between
Components (CBC)
Learning
Component
Refinamento
Refinamento
Agenthood
Strategy
Pattern
Size
- Implementação -
Learning
reviewer
paper
deadlines
isAccepted()
getReviewer()
getPaper()
…
Mediator
Pattern
Definition
Counts the number of classes and aspects whose main purpose is to
contribute to the implementation of a concern and the number of other
classes and aspects that access them.
Counts the number of methods and advices whose main purpose is to
contribute to the implementation of a concern and the number of other
methods and advices that access them.
Counts the number of transition points through lines of code. A transition
point is a place in the code where there is a “concern switch”.
Counts the number of other classes and aspects to which a class or an
aspect is coupled.
Concern Diffusion over
Components (CDC)
- Projeto -
events_()
- Arquitetura -
Answerer
#4
2
Metrics
RevisionProposal
Observer
Pattern +88%
43
18
Modularização
init()
learn()
adaptKnowledge()
...
Caller
#4
Editor
#2 Evolution and Reuse Scenario
90
Aspects
Learning
Knowledge
Information
Agent #2
100
Patterns
<< crosscutting
interface >>
Proposal
User
Agent
Content
Supplier
0
Information
Gathering
Middle
Agent
System Viewpoint
Medição
Método para SMAs
Collaboration
Knowledge
50
20
– interaction-specific members
– methods with some interaction code
interaction-specific classes
<< crosscutting
interface >>
Searching
Plan
#2 Evolution and Reuse Scenario
VS
– learning-specific members
– methods with some learning code
learning-specific classes
Adaptation
update
10
Legend:
Agent
Collaboration
Content
Supplier
...
JudgementPlan
Observer
Interface
Agent
Knowledge
Plan
goal
agent
…
clone()
execute ()
…
*
Autonomy
<<interface>>
Searching
Plan
Interface
Agent
Counter
Proposal
Role
Chair
processInformation()
getTD()
getReward()
setReward()
…
receive()
senseEvent()
...
Comparação
LMS
1
FigureElement
addObserver
removeObserver
notify
Interaction
ailability
Plan
Figure
Subject
Adaptation
Strategy
pattern
learningRate
processInformation()
…
TD-Learning
Agent
<<interface>>
Padrões GoF
Number ofNumber
Operations
of Operations
Effector
getName()
moveAgent()
beforeMove()
 Colaboração
 Mobilidade
 Aprendizagem
addLC()
removeLC()
notifyLC()
Observer
pattern
JADEAgent
Plan
Learning
Component
Observable
Percentage
 Interação
 Adaptação
 Autonomia
Agenda
getUserAnswer()
getAnswerTime()
addAppointment()
… public void addPublication(...){
…
...
sensor.senseEvent();
...
}
addResearchKW()
addPublication()
addAward()
addConference()
…
Autonomy
Environment
DSInterface
PersistentCV
Brasil
Automatização
Abordagem
Gerativa
- Ver Poster 12 -
[1] A. GARCIA, C. SANT'ANNA, C. CHAVEZ, V. SILVA, C. LUCENA, A. STAA. Separation of Concerns in Multi-Agent Systems: An Empirical Study.
In: Software Engineering for Multi-Agent Systems II, Springer, LNCS 2940, March 2004, pp. 49-72.
[2] A. GARCIA, C. LUCENA, D. COWAN. Agents in Object-Oriented Software Engineering. Software: Practice & Experience, Elsevier, 34(5): 489 521, May 2004.
[3] C. SANT'ANNA, A. GARCIA, C. CHAVEZ, C. LUCENA, A STAA. On the Reuse and Maintenance of Aspect-Oriented Software: An Assessment
Framework. Proceedings of 17th Brazilian Symposium on Software Engineering, Manaus, Brazil, October 2003, pp. 19-34.
[4] C. SANT'ANNA, A. GARCIA, U. KULESZA, C. LUCENA, A. STAA. Design Patterns as Aspects: A Quantitative Assessment. Proceedings of the
XIX Brazilian Symposium on Software Engineering, Brasília, Brazil, October 2004.
[5] A. GARCIA, U. KULESZA, C. LUCENA. Aspectizing Multi-Agent Systems: From Architecture to Implementation. In: “Software Engineering
for Multi-Agent Systems III”, LNCS, Springer, December 2004. (To Appear)
[6] U. KULESZA, A. GARCIA, A. LUCENA, A. STAA. Integrating Generative and Aspect-Oriented Technologies. Proceedings of the XIX Brazilian
Symposium on Software Engineering, Brasília, Brazil, October 2004.
Aspectos @ PUC-Rio
PUC-Rio
Download

PPT