From mira@ccs.neu.edu Thu Jun 11 15:51:43 1998 \subsection*{Strategy Guard Beans} \undeline{Issue:} Traversal Beans are generated from the specification of concrete strategies. They fire events at each step of the concrete traversal graph. On the other side, APPCs are generally written in terms of strategy type edge/node events. A strategy type edge event may in general map to a sequence (a path) of concrete traversal graph events. For illustration consider the following concrete strategy graph: \begin{verbatim} A: B C B: D C: D D: E E: F \end{verbatim} Assume that an APPC implements an strategy type event, as follows: \begin{center} from$<$B$>$To$<$F$>$Event(EdgeEvent ev) \{ ... \} \end{center} The traversal bean will fire concrete edge events, such as: \begin{verbatim} fromBToD fromDToE fromEToF \end{verbatim} However, the APPC is not interested in any of the individual edge events. Instead it is interested in a "path" event. The question is how to produce "path" (or in general subtraversal ???) events? \underline{Here is just a thought:} When the sample APPC above is hooked up with the strategy that created the concrete traversal graph above, the generator will notice that the APPC is interested in a path event, and could consequently create an intermidiate "path" bean, which listen to the edge events of the concrete strategy graph in the interesting path, i,e, the edge events listed above. It "absorbes" these events and keeps track of the "history" -- the sequence in which they occur. The "path" bean will fire the corresponding path event (strategy type event): {\tt from$<$B$>$To$<$F$>$} only if it notices that the following edge events has been fired by the traversal bean in the order below: \begin{verbatim} fromBToD fromDToE fromEToF \end{verbatim} Instead of being hooked up directly with the traversal bean the APPC will be hooked up with the implicitly created "path" bean. In the same vein, "adaptor" beans can be used in general for mapping between concrete node/edge names and class/link-valued variables used in names of the events implemented by the APPCs.