1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?xml version="1.0" ?>
- <statechart>
- <semantics
- big_step_maximality="take_many"/>
- <datamodel>
- a = 7;
- b = 2;
- </datamodel>
- <inport name="in">
- <event name="start"/>
- </inport>
- <outport name="out">
- <event name="done">
- <param type="int"/>
- <param type="int"/>
- </event>
- </outport>
- <root initial="Invar">
- <parallel id="Invar">
- <state id="I1" initial="S1">
- <state id="S1">
- <transition target="../S2">
- <code> b = 2 * b; </code>
- </transition>
- </state>
- <state id="S2">
- <transition target="../S3">
- <code> b = 2 * a + b; </code>
- </transition>
- </state>
- <state id="S3"/>
- </state>
- <state id="I2" initial="S4">
- <state id="S4">
- <transition target="../S5">
- <code> a = a + b; </code>
- </transition>
- </state>
- <state id="S5">
- <transition target="../S6">
- <code> a = 3 * a; </code>
- </transition>
- </state>
- <state id="S6">
- <transition cond='@in("/Invar/I1/S3")' target="/Done"/>
- </state>
- </state>
- </parallel>
- <!-- this state is not in the example, but we introduce it to allow a final transition with output event the values of a and b -->
- <state id="Done">
- <onentry>
- <raise port="out" event="done">
- <param expr="a"/>
- <param expr="b"/>
- </raise>
- </onentry>
- </state>
- </root>
- </statechart>
|