Information Technology Reference
In-Depth Information
Base Map
Base Map
s2
e1
e1
s1
s1
R
e2
s3
q
s
n o
n o
p
r
p
q
Pointcut Map
Pointcut Map
a) Contradiction at same step
b) Contradiction at different steps
Fig. 17. Contradictory mappings
the beginning of Sect. 4 and discussed in greater detail in Sect. 4.2 and 4.4.
Mappings 1 and 3 are so important because they help determine the joinpoints
and insertion points associated with the joinpoints. The joinpoint in Fig. 16 is
the responsibility in the base map.
As mentioned earlier in the bulleted list, contradictory mappings are the third
reason for unsuccessful matches. One such case is illustrated in Fig. 17a. After
matching the start point in the pointcut map to s1 in the base map (see mapping
1) and the OR-fork in the pointcut map to the OR-fork in the base map (see
mapping 2), the next step attempts to match the successors of the OR-fork in
the pointcut map with the successors of the OR-fork in the base map. In both
cases, the successors are OR-joins (note that the OR-fork in the pointcut map
also has two successors — one for each branch, but the two successors happen to
be the same OR-join). For each successor individually, a match is possible (see
mappings 3 and 4), but these two mappings contradict each other since the same
path node in the pointcut map cannot be mapped to two different path nodes
in the base map (or vice versa). Figure 17a shows a contradiction occurring at
the same step. Figure 17b, on the other hand, shows a similar contradiction that
appears at different steps of the matching algorithm (i.e., the new mapping 6
contradicts mapping 4 established by a previous step of the matching algorithm).
Note that the mappings of one pointcut map to a base map may overlap with
mappings established for another pointcut map. Overlapping mappings, however,
do not conflict with or contradict each other. See Sect. 4.4 for more details.
4.2
Composition Algorithm
Now that the joinpoints have been identified, the composition strategy for an
AoUCM model is fairly straightforward. Given joinpoints, base maps, advice
maps, pointcut maps, and plug-in bindings, the composed system is realized by
adding aspect stubs to the base maps. One such stub links to the appropriate
part of an advice map. The insertion points for the static stubs on the base maps
are defined by the mappings of the joinpoints found by the matching algorithm.
The plug-in bindings for the inserted stubs are also derived from the mappings
of the joinpoints.
Search WWH ::




Custom Search