test_03_trafficlight_single.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" ?>
  2. <test>
  3. <statechart src="statechart_fig9_trafficlight.xml">
  4. <override_semantics concurrency="single"/>
  5. <!-- although according to Day & Atlee, this choice of semantics yields incorrect behavior
  6. because between small steps, the traffic lights could be "yellow" in one direction and
  7. "green" in the other at the same time, in between small steps, I would argue that this
  8. doesn't matter as long as the statechart's input/output from big steps is correct (which
  9. is the case), as this is the only way it can interact with the environment. -->
  10. </statechart>
  11. <input>
  12. <event port="in" name="end" time="15 s"/>
  13. <event port="in" name="change" time="18 s"/>
  14. </input>
  15. <output>
  16. <!-- entering default states -->
  17. <big_step>
  18. <event port="out" name="set_light">
  19. <param val='"NS"'/>
  20. <param val='"Green"'/>
  21. </event>
  22. <event port="out" name="set_light">
  23. <param val='"EW"'/>
  24. <param val='"Red"'/>
  25. </event>
  26. </big_step>
  27. <!-- response to input event 'end' -->
  28. <big_step>
  29. <event port="out" name="set_light">
  30. <param val='"NS"'/>
  31. <param val='"Yellow"'/>
  32. </event>
  33. </big_step>
  34. <!-- response to input event 'change' -->
  35. <big_step>
  36. <event port="out" name="set_light">
  37. <param val='"NS"'/>
  38. <param val='"Red"'/>
  39. </event>
  40. <event port="out" name="set_light">
  41. <param val='"EW"'/>
  42. <param val='"Green"'/>
  43. </event>
  44. </big_step>
  45. </output>
  46. </test>