Behavioural Aspects and Weaving - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

Behavioural Aspects and Weaving

Description:

identified by the MIT as one of the 10 key technologies of the ... new attempt. try again. Static Weaving of Behavioural Aspects. save. Advice: user. server ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 51
Provided by: JK148
Category:

less

Transcript and Presenter's Notes

Title: Behavioural Aspects and Weaving


1
Behavioural Aspects and Weaving
PhD Thesis work
  • Jacques Klein
  • IRISA / INRIA University of Rennes 1 Triskell

Supervisor Jean-Marc Jézéquel Assistant
supervisor Loïc Hélouët
Luxembourg, 21/02/2007
2
Building Large Software Systems
  • Importance of non-functional properties
  • distributed reactive systems, persistence,
    monitoring,
  • quality of service reliability, latency,
    performance...
  • Variations in functional aspects
  • notion of product lines (space, time)

How modularize each concern to manage changes?
1.0
3
Modeling Weaving
  • Challenges
  • Automatic Weaving

4
Aspect-Oriented Software Development (AOSD)
  • Avoid the "tyranny of the dominant
    decomposition"Tar99
  • which prevents from modularize some concerns
  • AOSD Concepts
  • these concerns are encapsulated in aspects
  • a aspect defines un set of join points specified
    by a pointcut
  • the composition of the aspects is called weaving
  • AOSD emerged at the programming level (AOP) with
    AspectJ
  • Kiczales et al., ECOOP 97
  • gtgt identified by the MIT as one of the 10 key
    technologies of the decade

expected benefits ? better modularisation,
maintainable upgradeable reusable
5
Model Weaving
  • Weaving of structural models relatively well
    defined (France et al.)
  • Weaving of behavioural aspects only at the
    runtime
  • pattern matching at the runtime (event AOP,
    Douence et al)
  • mechanism of "cflow" proposed by AspectJ
  • ? dynamic weaving problems of performance, of
    validation and possible weavings
  • What is the (static) weaving of behavioural
    aspects?
  • ? use scenarios (MSCs)
  • formal basis, simplicity and power,

6
Static Weaving of Behavioural Aspects
Behavioural Aspect
Base Scenario
Aspect
user
server
Pointcut
log in
try again
user
server
new attempt
new attempt
try again
try again
new attempt
Advice
try again
new attempt
user
server
new attempt
new attempt
new attempt
ok
save
save
save
try again
try again
try again
7
Plan of the presentation
  • Introduction of the language of scenarios used
  • Several definitions of join points
  • Detection in infinite scenarios
  • Composition of scenarios
  • Implementation

8
Message Sequence Charts (MSCs) (or SD) low
level bMSC
bMSC M
A
B
C
m1
m2
a
m3
- bMSC defines a set of events and a partial
order on these events
9
Message Sequence Charts high level HMSC
HMSC H
s0
bMSC log
user
server
log in
s1
bMSC Accept
bMSC newAttempt
user
server
user
server
try again
ok
new attempt
s2
10
Plan of the presentation
  • Introduction of the language of scenarios used
  • Several definitions of join points
  • Detection in infinite scenarios
  • Composition of scenarios
  • Implementation

11
Join Point and language of pointcut
  • combined with a pointcut language which allows
    the specification of the areas where an aspect
    has to be woven with the base model
  • A join point represents an area where an aspect
    is interleaved with a other concern
  • The pointcut language is the mechanism which
    allows the separation of a crosscut concern (an
    aspect) from a base model.

12
Join Point Definition
J
Pointcut
base
A
B
A
B
C
m1
m1
m2
m3
m3
  • A part J of a base scenario is a join point
    whether there exists an bMSC isomorphism from the
    pointcut and J.

13
4 definitions of join points
  • 2 main strategies of detection LMO06, TAOSD 07
  • non-strict sequence of messages
  • strict sequence of messages

facilitates the weaving of several aspects
  • decidability for infinite scenarios
  • as the user
  • chooses
  • sud-bMSC
  • closed part
  • safe part
  • general part

14
A join point can be a sub-bMSC
M1
M2
C1
C2
C1
C2
m0
m0
Pointcut
m1
m1
m2
m2
C1
C2
m3
m1
m2
M4
M3
C1
C2
C1
C2
m1
m1
m4
m3
m2
m2
15
A join point can be a closed part
M1
M2
C1
C2
C1
C2
m0
m0
Pointcut
m1
m1
m2
m2
C1
C2
m3
m1
m2
M4
M3
C1
C2
C1
C2
m1
m1
m4
m3
m2
m2
16
Weaving of several aspects at the same join point
Aspect 2
Aspect 1
Pointcut
Pointcut
base
user
server
user
server
log in
log in
user
server
try again
try again
log in
save
try again
Advice
Advice
user
server
display
user
server
log in
log in
update
save
try again
try again
update
17
A join point can be a safe pattern
M1
M2
C1
C2
C1
C2
m0
m0
Pointcut
m1
m1
m2
m2
C1
C2
m3
m1
m2
M4
M3
C1
C2
C1
C2
m1
m1
m4
m3
m2
m2
18
A join point can be a general part
M1
M2
C1
C2
C1
C2
m0
m0
Pointcut
m1
m1
m2
m2
C1
C2
m3
m1
m2
M4
M3
C1
C2
C1
C2
m1
m1
m4
m3
m2
m2
19
Successive join points
M
Pointcut
C1
C2
m1
C1
C2
m1
m1
m2
m2
m1
m2
  • we define a (partial) order on the part
  • we have shown that this order has an unique
    minimum element J
  • we continue on M-?J

20
Plan of the presentation
  • Introduction of the language of scenarios used
  • Several definitions of join points
  • Detection in infinite scenarios
  • Composition of scenarios
  • Implementation

21
What do we propose? Detection based on the
semantics of the language AOSD 2006
A base scenario
A behavioural Aspect
HMSC H
Aspect
bMSC Propose
Pointcut
customer
server
customer
server
log in
new attempt
try again
bMSC Accept
bMSC Retry
Advice
customer
server
customer
server
customer
server
new attempt
try again
ok
save bad attempt
new attempt
try again
22
Result
unfold once
customer
server
try again
new attempt
23
Result
customer
server
try again
new attempt
24
Result
HMSC H'
customer
server
log in
customer
server
customer
server
try again
try again
new attempt
customer
server
try again
try again
new attempt
new attempt
new attempt
customer
server
ok
25
Result
HMSC H'
L(H)L(H')
customer
server
log in
customer
server
customer
server
try again
try again
new attempt
customer
server
customer
server
new attempt
new attempt
save bad attempt
save bad attempt
try again
try again
new attempt
26
HMSC Transformation
A base scenario
Pointcut
HMSC H
s0
customer
server
bMSC Propose
new attempt
try again
customer
server
log in
s1
bMSC Accept
bMSC Retry
customer
server
customer
server
try again
ok
new attempt
s2
27
HMSC Transformation
- First step compute the potential matches
s0,Me
Propose
Retry
s1,Me
Retry
s1,Pm
Accept
Pointcut
Accept
customer
server
s2,Me
new attempt
try again
28
HMSC Transformation
- Second step compute the future matches
Propose
Retry
Retry
s1,Pm,Pm
Retry
Accept
Pointcut
Retry
customer
server
new attempt
Accept
try again
29
Transformation de HMSC
- Third step use regular expression, split bMSCs
into atoms and permute these atoms
Retry (Retry) Retry
R1R2 (R1R2) R1R2
R1(R2 R1) R2R1R2
bMSC Retry
customer
server
try again
new attempt
30
HMSC Transformation
Result
Propose
Retry
Accept
Accept
31
Result
HMSC H
customer
server
log in
customer
server
customer
server
try again
try again
new attempt
customer
server
customer
server
new attempt
new attempt
save bad attempt
save bad attempt
try again
try again
new attempt
32
Plan of the presentation
  • Introduction of the language of scenarios used
  • Several definitions of join points
  • Detection in infinite scenarios
  • Composition of scenarios
  • Implementation

33
Composition FMICS 04, LMO 06, TAOSD 07(it
depends on the join point definition)
  • for the sub-bMSCs

sequential composition
base scenario
result
A
A
Advice
JP
Advice
B
B
A JP B
A Advice B
34
AmalgamatedSum
advice
I1
I2
m1
a
m3
35
AmalgamatedSum
result
advice
I1
I2
m1
a
m3
g
f
36
AmalgamatedSum
result
m2
a
advice
I1
I2
m1
a
m3
g
f
37
Plan of the presentation
  • Introduction of the language of scenarios used
  • Several definitions of join points
  • Detection in infinite scenarios
  • Composition of scenarios
  • Implementation

38
Kermeta
  • language dedicated to the handling of models
  • allows the use of existing modelling tools as
    EMF, Topcased, Omondo, etc

39
Implementation
Morphismes PC/Base
MMSC
MMM
Morphismes PC/Base
Pointcut
Morphisms PC/Base
(1) detection
MMSC
Base
(2) Composition
Advice
MMSC
MMSC
MMM
MSC Result
Morphism PC/AD
40
Weaving of an aspect (P,Ad)
If P is connected, the detection problem is
decidable
Set of HMSCs
specific classes of HMSCs
weaving of (P,Ad)
weaving of (P,Ad)
commutation which leads to a solution
41
Result / ConclusionStatic weaving of behavioural
aspects
  • Difficulty for the detection of successive join
    points
  • Difficulty for the weaving of several aspects
  • Necessity to use advanced composition operators
  • Several specific notions of join points
  • Necessity to take the semantics of the model used
    into account

42
Result / ConclusionStatic weaving of behavioural
aspects
  • The result of the weaving can be validated before
    the implementation (productivity gain and time
    gain)
  • Can target non-aspect-oriented platform (when the
    weaving is impossible at the programming level)
  • Specification of pointcuts improved
  • When the aspects have been woven, its difficult
    to identify them traceability problem

43
Perspectives (short term)
  • Conditions which allow the identification of
    classes for the detection problem (in infinite
    scenarios) for which the problem is decidable
  • Identification of conflicts between aspects

44
Widest Perspectives
  • Propose weavers for other types of models (state
    charts, etc)
  • Automatic update of various models
  • Test and development with aspects
  • Methodology for development with aspects

45
Dissemination
  • Several definitions of join points LMO 2006 and
    TAOSD
  • Detection in infinite scenarios AOSD 2006
  • Composition of scenarios FMICS 2004, LMO 2006,
    TAOSD
  • European Network of Excellence AOSD-Europe
  • Collaboration with the team DSG of the Trinity
    College of Dublin

46
  • MERCI

47
Un scenario de base
Un aspect
Comportement Attendu
customer
server
4
1
3
3
3
3
2
48
Limites
Tissage impossible
scénario de base
Aspect
customer
server
Exp. de coupe
a
b
HMSC H
a
customer
server
bMSC M
a
b
a
b
customer
server
a
a
b
b
a
a
Advice
a
customer
server
a
b
m
a
b
a
49
Limites
Tissage impossible
customer
server
Aspect
a
customer
server
b
m
Exp. de coupe
a
b
m
n fois
a
customer
server
m
a
b
a
b
a
m

b
a
Advice
a
customer
server
a
n fois
customer
server
a
b
m
m
a
b
Comportement attendu
a
Comportement attendu
50
Conditions suffisantes
bMSCs non-connexes
bMSCs connexes les algorithmes se terminent
bMSC M
bMSC M
customer
server
customer
server
a
b
a
b
m
bMSC M
bMSC M
server2
server3
customer
server1
server3
customer
server1
server2
m1
m1
b
b
m3
m2
m2
m2
m2
M? M1 M2
M M1 M2
Write a Comment
User Comments (0)
About PowerShow.com