Information Technology Reference
In-Depth Information
The advantage of this definition is that it is safe in the sense that the weaving
of the advice at a join point cannot conflict with the weaving of the advice at
another join point. For instance, let us imagine that a weaving of an aspect
removes a join point. If we weave this aspect into the bSD
M
2inFig.8,and
J
a
b
J
if
1 is the first detected join point, then the messages
and
forming
1are
J
J
removed. In this case, the conflicting join points
4havenomeaning
anymore since one of its constituent messages no longer exists.
However, this answer is debatable. In the proposed example,
3and
2can
form a join point because they don't share the same messages. The ideal solution
is perhaps to give the choice to the user by proposing several semantics of notion
of successive join points. Nevertheless, in the sequel of this paper, we will only
give a definition of the notion of successive join points which is (in an informal
way) a sequence of disjoint join points. Other semantics of successive join points
could be considered as interesting future work.
To define this sequence of disjoint join points, firstly we propose a way to
order the parts of a bSD which are isomorphic to a pointcut in order to find
the first join point matched by the pointcut. Then we show the first join point
is always unique, because the order defined on the parts is a lattice. Secondly,
we define successive join points in an inductive way by considering the first join
point
J
1and
J
J
which appears in a bSD
M
, and by continuing with
M
minus
J
.
Definition 10 (ordered parts). Let
M
=(
I M ,E M , ≤ M ,A M M M , ≺ M )
be a bSD and
P
=(
I P ,E P , ≤ P ,A P P P , ≺ P ) be a pointcut. Let
J 1 and
J 2 be
two parts of
M
such that there exist two bSD isomorphisms
f
=
<f 0 ,f 1 ,f 2 >
:
P → J 1 and
g
=
<g 0 ,g 1 ,g 2
>
:
P → J 2 . We will say that
J 1 precedes
J 2 (or
that
J 2 succeeds
J 1 J 2 ,if and only if:
∀e ∈ E P such that
J 1 ), denoted
T
(
e
)=
send, f 1 (
e
)
M
g 1 (
e
) .
In Fig. 8, with this order we can say that the part
J 1 precedes
J 2 in bSD
M
1. We
can also say that the part formed by the first message
a
and the first message
b
in
the bSD
M
2 precedes all the other parts formed by a message
a
and a message
b
.
Afterwards, we will be especially interested in the
minimum
part of the order
, that is to say the part which precedes all the other parts. For a set
J P,M of all
the parts of a bSD
M
isomorphic to a pointcut
P
, we will denote by
min
(
J P,M )
the minimum part. In the same way, if
J P,M is the set of all the join points of
P
in
M
, we will call the minimum join point the join point equal to
min
(
J P,M ).
However,
does not define a total order. For instance, in Fig. 8,
J
3and
J
4are
not ordered by
. Therefore, it is not obvious that
min
(
J P,M ) is unique. To
demonstrate the uniqueness of
min
(
J P,M ), we show that
is a lattice.
Theorem 1. Let
J P,M be the set of join points of a bSD
M
corresponding to a
pointcut
P
and let
be the order on these join points as defined by Definition 10,
then (
J P,M ,
) is a lattice.
The proof of this theorem is given in Appendix.
Now, we can inductively define successive join points as follows:
 
Search WWH ::




Custom Search