test_deep.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?xml version="1.0" ?>
  2. <test>
  3. <!-- based on test originally written by Glenn De Jonghe -->
  4. <statechart>
  5. <semantics
  6. big_step_maximality="take_many"
  7. combo_step_maximality="take_many"
  8. internal_event_lifeline="next_combo_step"/>
  9. <inport name="in">
  10. <event name="start"/>
  11. </inport>
  12. <outport name="out">
  13. <event name="check1"/>
  14. <event name="check2"/>
  15. <event name="check3"/>
  16. </outport>
  17. <root>
  18. <parallel id="parallel">
  19. <state id="orthogonal" initial="wrapper">
  20. <state id="wrapper" initial="state_1">
  21. <state id="state_1" initial="inner_1">
  22. <state id="inner_1"/>
  23. <state id="inner_2"/>
  24. <transition event="to_state_2" target="../state_2"/>
  25. </state>
  26. <state id="state_2" initial="inner_3">
  27. <state id="inner_3">
  28. <transition event="to_inner_4" target="../inner_4"/>
  29. </state>
  30. <state id="inner_4"/>
  31. </state>
  32. <history id="history" type="deep">
  33. <!-- <transition target="../state_1"/> -->
  34. </history>
  35. <transition event="to_outer" target="../outer"/>
  36. </state>
  37. <state id="outer">
  38. <transition event="to_history" target="../wrapper/history"/>
  39. </state>
  40. </state>
  41. <state id="orthogonal_tester" initial="start">
  42. <state id="start">
  43. <transition target="../step1">
  44. <raise event="to_state_2" />
  45. <raise event="to_inner_4" />
  46. </transition>
  47. </state>
  48. <state id="step1">
  49. <transition cond='@in("/parallel/orthogonal/wrapper/state_2/inner_4")' target="../step2">
  50. <raise port="out" event="check1" />
  51. <raise event="to_outer" />
  52. </transition>
  53. </state>
  54. <state id="step2">
  55. <transition cond='@in("/parallel/orthogonal/outer")' target="../step3">
  56. <raise port="out" event="check2" />
  57. <raise event="to_history" />
  58. </transition>
  59. </state>
  60. <state id="step3">
  61. <transition cond='@in("/parallel/orthogonal/wrapper/state_2/inner_4")' target="../end">
  62. <raise port="out" event="check3" />
  63. </transition>
  64. </state>
  65. <state id="end"/>
  66. </state>
  67. </parallel>
  68. </root>
  69. </statechart>
  70. <input>
  71. <event port="in" name="start" time="0 d"/>
  72. </input>
  73. <output>
  74. <big_step>
  75. <event port="out" name="check1"/>
  76. <event port="out" name="check2"/>
  77. <event port="out" name="check3"/>
  78. </big_step>
  79. </output>
  80. </test>