Next: Indirect in event, Previous: Direct out event, Up: Execution Semantics [Contents][Index]
A requires port inevitably triggering multiple out-events (r.a
,
r.b
) is implemented as one function call for each out-event
posting in the component queue, followed by a single flush call to
trigger component processing of the events. The below 2 versions of the
component are indistinguishable looking from the outside.
Notice that the interface declares that a
and b
are
executed atomically. While in the behavior of the component each event
is handled or forwarded independently. However to an observer of the
provides interface of the component a
and b
are again
executed atomically.
interface I { out void a (); out void b (); behavior { on inevitable: {a; b;} } } component direct_multiple_out1 { provides I p; requires I r; behavior { on r.a (): p.a (); on r.b (): p.b (); } }
import direct_multiple_out.dzn; component direct_multiple_out2 { provides I p; requires I r; behavior { on r.a (): {} on r.b (): {p.a (); p.b ();} } }
The third variant is left as an exercise to the reader.