.. */ }
In this example the order of result and s are swapped in the label for the output
action. It is possible to omit some output parameters of the target method from the
output action label if desired. Also, input parameters may appear in the output label.
???Split??? actions. Sometimes (especially in describing scenarios) it is necessary to
say that a method that produces no outputs should be split into start and finish
actions. In this case the start and finish actions can be given explicitly.
[Action(Start="Foo_Start(x)", Finish="Foo_Finish()")]
static void Foo(int x) { /* ... */ }
Multiple attributes per method. More than one action attribute may appear for a
givenmethod. This is interpreted as separate actions that share a common update rule.
[Action("Foo(_, x)"]
[Action("Bar(x)"]
static void MyFoo(int x) { /* ... */ }
Appendices 287
The example above defines two actions with differing signatures that share a
common enabling condition and update. In the example, the MyFoo method is the
implementation of the Foo action and the Bar action. (This case arises when modeling
feature slices.)
Multiple methods per action. The same action attribute (with user-provided label)
may appear in front of methods split across features. This is interpreted as defining
a single action whose preconditions and updates are composed. (This case arises
when modeling feature slices.
Pages:
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375