test_20_chemplant_combo.xml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <test>
  2. <statechart>
  3. <semantics
  4. big_step_maximality="take_many"
  5. combo_step_maximality="take_one"
  6. input_event_lifeline="first_combo_step"
  7. internal_event_lifeline="next_combo_step"
  8. enabledness_memory_protocol="small_step"
  9. assignment_memory_protocol="small_step"
  10. />
  11. <datamodel>
  12. a = 0;
  13. b = 0;
  14. </datamodel>
  15. <inport name="in">
  16. <event name="inc_one"/>
  17. <event name="inc_two"/>
  18. <event name="end_process"/>
  19. </inport>
  20. <outport name="out">
  21. <event name="start_process">
  22. <param type="int"/>
  23. <param type="int"/>
  24. </event>
  25. </outport>
  26. <root>
  27. <parallel id="Plant">
  28. <state id="Process_1" initial="Idle_1">
  29. <state id="Idle_1">
  30. <transition port="in" event="inc_one" target="../Wait_1">
  31. <code> a += 1; b += 1; </code>
  32. <raise event="process"/>
  33. </transition>
  34. </state>
  35. <state id="Wait_1">
  36. <transition port="in" event="end_process" target="../Idle_1"/>
  37. </state>
  38. </state>
  39. <state id="Process_2" initial="Idle_2">
  40. <state id="Idle_2">
  41. <transition port="in" event="inc_two" target="../Wait_2">
  42. <code> a += 2; b += 2; </code>
  43. <raise event="process"/>
  44. </transition>
  45. </state>
  46. <state id="Wait_2">
  47. <transition port="in" event="end_process" target="../Idle_2"/>
  48. </state>
  49. </state>
  50. <state id="Controller" initial="Idle">
  51. <state id="Idle">
  52. <transition event="process" target="../Wait">
  53. <raise event="start_process">
  54. <param expr="a"/>
  55. <param expr="b"/>
  56. </raise>
  57. </transition>
  58. </state>
  59. <state id="Wait">
  60. <transition port="in" event="end_process" target="../Idle">
  61. <code> a = 0; b = 0; </code>
  62. </transition>
  63. </state>
  64. </state>
  65. </parallel>
  66. </root>
  67. </statechart>
  68. <input>
  69. <bag time="0 d">
  70. <!-- 2 simultaneous input events -->
  71. <event port="in" name="inc_one"/>
  72. <event port="in" name="inc_two"/>
  73. </bag>
  74. </input>
  75. <output>
  76. <big_step>
  77. <event port="out" name="start_process">
  78. <param val="3"/>
  79. <param val="3"/>
  80. </event>
  81. </big_step>
  82. </output>
  83. </test>