test_parallel_deep.xml 2.6 KB

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