Information Technology Reference
In-Depth Information
Finally, the matching algorithm takes cycles on the pointcut maps into account
in order to avoid infinite loops by not further considering an already visited path
node on the pointcut map. See Appendix A for more details on the matching
algorithm.
The following criteria are taken into account to decide whether a path node
in the pointcut map matches another path node. The names and types of the
path nodes must match. The component names of the path nodes must match
as well as the location of the path node in the component (first, last, or any
path node in the component). Furthermore, the names of conditions have to be
matched and the type of branch (e.g., timeout branch) has to be matched.
When matching a set of next path nodes on the pointcut map against another
set of next path nodes, each matching pair of path nodes must fulfill the cri-
teria listed in the previous paragraph. In addition, the current implementation
requires the number of path nodes to be the same in each set for the match to
be successful. Alternatively, the matching algorithm could provide an option to
relax this requirement for any path node with multiple outgoing or incoming
branches by allowing the set corresponding to a path node on the pointcut map
to be smaller than the other set. For example, this would allow matching an
OR-fork with two branches on the pointcut map against an OR-fork with two
or more branches in the UCM model as long as two of these branches can be
matched.
Base Map
Reservation
start
success
makeReservation
[reservationOK]
[reservationFailed]
n
fail
o
p
Pointcut Map
Reservation
*
Fig. 16. Example of a mapping between pointcut map and base map
Figure 16 shows an example of a mapping that was established by the match-
ing algorithm. The responsibilities are mapped to each other since the wildcard
matches any name. Mappings 1 and 3 contain unnamed start and end points.
In terms of the matching algorithm, one can think of unnamed start and end
points as free matches. They can be matched with anything as long as they are
matched to the path nodes that are closest to the other mappings.
While the mapping of the actual pointcut expression (in this case only the
responsibility — see mapping 2) ensures that the pattern described by the point-
cut map exists in the base map, the other two mappings (1 and 3) turn out to
be the most useful in terms of providing the additional features mentioned at
Search WWH ::




Custom Search