As shown in Figure 8, since multiple actions can be triggered at the same join point and if more than one such actions are of the same type, we need default precedence rules for the actions:
In Figure 8a, multiple actions are targeting a single join point. The weaving points for a join point in the source code are shown in Figure 8b. All the actions are woven just before the join point in order they are specified. All the actions are woven just after the join point. The call to foo is replaced by the call to the first action, which in turn can call the second action through its function, and so on.
An important point to notice here is that the default ordering rules of AspectMatlab are simpler and more restrictive than the precedence rules of AspectJ [1]. However, our action weaving strategy avoids complicated dependency rules, will not lead to any dependency cycles between actions, and is easy to comprehend from a scientific programmer's point of view. Since our actions have names, it would also be simple for us to introduce a declaration to over-ride the default ordering within each of the around, before and after groups.
Toheed ASLAM 2010-04-24