Information Technology Reference
In-Depth Information
easy: we only search a decomposition of a base bSD
M
such that
M
=
M 1 •J •M 2
(
being the join point). In [18], we have showed that this simplicity allows the
achieving of good decidability results for join point detection in infinite scenarios.
Conversely, the definition of general part is the least restrictive. Some messages
can be present between the messages forming the wanted behavior. This fact can
imply the detection of join points interleaved with behaviors not expected by
the user. Moreover, the partial order defined by the pointcut is not necessarily
preserved in the detected join point. The major advantage of a join point defined
as a general part remains the property to easily weave several aspects at the same
join point.
The definitions of enclosed part and safe part combine the advantages and
the drawbacks of a strict part and a general part. An enclosed part looks like a
strict part, but it can be surrounded by some messages. Therefore, if we want
to look for a strict sequence of messages in a certain way, this definition seems
to be appropriate. However, an enclosed part has the drawback that it does not
tolerate the weaving of multiple aspects at the same join point. If we want to
weave several aspects at the same join point, while the partial order defined
by the pointcut is preserved, the definition of safe part seems to be appropriate.
However, a safe part has the drawback for the detection of join points interleaved
with behaviors not expected by the user, because some messages can be present
between the messages of the join points.
Despite this short discussion on the advantage and the drawbacks of each
definition, the main interest of the proposed approach is that a user can choose
as he/she wishes the semantics of the weaving in finite scenarios. The user is free
to choose the definition of part which suits him/her the better by adapting the
algorithm of detection according to the chosen definition. We will show how this
flexibility can be easily implemented with the Kermeta environment in Sect. 6.
J
4
Join Point Detection
In [18], Klein et al. propose an algorithm to detect a strict part, i.e. a strict
sequence of messages. In this paper we propose three new algorithms to detect
join points defined as an
of a bSD.
Firstly, in Sect. 4.1, we introduce a general algorithm which contains two
“abstract functions” findSetsOfEvent and min . Secondly, in Sect. 4.2, we show
how these functions can be specialized for each notion of join points to obtain
the three new algorithms.
enclosed part
,a
general part
,ora
safe part
4.1
General Algorithm
Algorithm 1 allows the construction of an isomorphism
μ
=(
μ 0 1 2 )froma
M of a bSD
pointcut
μ 2 are identity morphisms.
In this way, the isomorphism indicates the first join point
P
toapart
M
, such that
μ 0 and
M in
M
.Wedenote
by
π i (
M
)
⊆ E M the projection of a bSD
M
on an object
i
of
M
and by
π E (
M
)
the restriction of a bSD
M
toasubset
E ⊆ E M . Moreover, we use a function
 
Search WWH ::




Custom Search