The action symbol Cancel is not in the
vocabulary.
In order to use features and composition most effectively, we treat the relation between
actions and methods more freely here than in previous examples. The actions
(ResSetup etc.) which were defined at the beginning of Section 14.2 are distinct
from the methods (Res etc.) in the code in Figure 14.1; they have different names
and different parameters. It is the actions that appear in the traces (Figure 14.18
etc.), not the methods.
Each action is associated with its method (ResSetup with Res etc.) by labeling
the method with an Action attribute whose argument indicates the action names and
parameters, following the rules given in Appendix A. Two or more actions may use
the same update rule (that is why actions and methods have different names here). For
example, the setup response and the work response actions ResSetup and ResWork
both use the update rule Res. Furthermore, these actions have three parameters but
the update rule only has two. An underscore in the attribute indicates that the
action??™s third parameter is not used by this update rule. These same two actions are
associated with a different update rule (also named Res) in the cancellation model
program (Figure 14.7). In that rule, it is the action??™s second parameter which is not
used.
In the product model program which is formed by composition, the actions of
the separate model programs are combined.
Pages:
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303