12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?xml version="1.0" ?>
- <test>
- <statechart>
- <semantics
- big_step_maximality="take_many"
- concurrency="single"
- input_event_lifeline="first_combo_step"/>
- <datamodel>
- <func id="digit(i:int, pos:int)">
- pow = 10 ** pos;
- return i // pow % 10;
- </func>
- <func id="numdigits(i:int)">
- return float_to_int(log10(i)) + 1;
- </func>
- </datamodel>
- <tree>
- <state initial="ready">
- <state id="ready">
- <transition port="in" event="start" target="../final"
- cond="numdigits(123) == 3 and digit(123, 1) == 2">
- <raise port="out" event="ok"/>
- </transition>
- </state>
- <state id="final"/>
- </state>
- </tree>
- </statechart>
- <input>
- <input_event port="in" name="start" time="0 d"/>
- </input>
- <output>
- <big_step>
- <event port="out" name="ok"/>
- </big_step>
- </output>
- </test>
|