test_expressions_ortho.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" ?>
  2. <test>
  3. <statechart>
  4. <semantics/>
  5. <root>
  6. <parallel id="p">
  7. <transition event="e" port="in" target="."/>
  8. <state id="comparisons" initial="s1">
  9. <state id="s1">
  10. <transition cond="1 == 1" target="../s2"/>
  11. </state>
  12. <state id="s2">
  13. <transition cond="1 != 2" target="../s3"/>
  14. </state>
  15. <state id="s3">
  16. <transition cond="1 &lt; 2" target="../s4"/>
  17. </state>
  18. <state id="s4">
  19. <transition cond="2 &gt; 1" target="../ok"/>
  20. </state>
  21. <state id="ok">
  22. <onentry>
  23. <raise event="ok" port="out"/>
  24. </onentry>
  25. </state>
  26. </state>
  27. <state id="arithmetic" initial="s1">
  28. <state id="s1">
  29. <transition cond="1 + 1 == 2" target="../s2"/>
  30. </state>
  31. <state id="s2">
  32. <transition cond="42 == 52 - 11 + 1" target="../s3"/>
  33. </state>
  34. <state id="s3">
  35. <transition cond="2 * 3 == 6" target="../s4"/>
  36. </state>
  37. <state id="s4">
  38. <transition cond="21 // 3 == 7" target="../s5"/>
  39. </state>
  40. <state id="s5">
  41. <transition cond="256 == 2 ** 2 ** 3" target="../s6"/>
  42. </state>
  43. <state id="s6">
  44. <transition cond="5 % 2 == 1" target="../ok"/>
  45. </state>
  46. <state id="ok">
  47. <onentry>
  48. <raise event="ok" port="out"/>
  49. </onentry>
  50. </state>
  51. </state>
  52. <state id="boolean_logic" initial="s1">
  53. <state id="s1">
  54. <transition cond="True" target="../s2"/>
  55. </state>
  56. <state id="s2">
  57. <transition cond="False or True" target="../s3"/>
  58. </state>
  59. <state id="s3">
  60. <transition cond="True and not False" target="../s4"/>
  61. </state>
  62. <state id="s4">
  63. <transition cond="not (True and False or False)" target="../s5"/>
  64. </state>
  65. <state id="s5">
  66. <transition cond="not (False or False and True)" target="../ok"/>
  67. </state>
  68. <state id="ok">
  69. <onentry>
  70. <raise event="ok" port="out"/>
  71. </onentry>
  72. </state>
  73. </state>
  74. </parallel>
  75. </root>
  76. </statechart>
  77. <input>
  78. <event name="e" port="in" time="0 d"/>
  79. </input>
  80. <output>
  81. <big_step>
  82. <event name="ok" port="out"/>
  83. <event name="ok" port="out"/>
  84. <event name="ok" port="out"/>
  85. </big_step>
  86. </output>
  87. </test>