test_20_chemplant_combo.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. </inport>
  19. <outport name="out">
  20. <event name="start_process"/>
  21. </outport>
  22. <root>
  23. <parallel id="Plant">
  24. <state id="Process_1" initial="Idle_1">
  25. <state id="Idle_1">
  26. <transition port="in" event="inc_one" target="../Wait_1">
  27. <code> a += 1; b += 1; </code>
  28. <raise event="process"/>
  29. </transition>
  30. </state>
  31. <state id="Wait_1">
  32. <transition port="in" event="end_process" target="../Idle_1"/>
  33. </state>
  34. </state>
  35. <state id="Process_2" initial="Idle_2">
  36. <state id="Idle_2">
  37. <transition port="in" event="inc_two" target="../Wait_2">
  38. <code> a += 2; b += 2; </code>
  39. <raise event="process"/>
  40. </transition>
  41. </state>
  42. <state id="Wait_2">
  43. <transition port="in" event="end_process" target="../Idle_2"/>
  44. </state>
  45. </state>
  46. <state id="Controller" initial="Idle">
  47. <state id="Idle">
  48. <transition event="process" target="../Wait">
  49. <raise event="start_process">
  50. <param expr="a"/>
  51. <param expr="b"/>
  52. </raise>
  53. </transition>
  54. </state>
  55. <state id="Wait">
  56. <transition port="in" event="end_process" target="../Idle">
  57. <code> a = 0; b = 0; </code>
  58. </transition>
  59. </state>
  60. </state>
  61. </parallel>
  62. </root>
  63. </statechart>
  64. <input>
  65. <bag time="0 d">
  66. <!-- 2 simultaneous input events -->
  67. <event port="in" name="inc_one"/>
  68. <event port="in" name="inc_two"/>
  69. </bag>
  70. </input>
  71. <output>
  72. <big_step>
  73. <event port="out" name="start_process">
  74. <param val="3"/>
  75. <param val="3"/>
  76. </event>
  77. </big_step>
  78. </output>
  79. </test>