test_functions2.xml 738 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" ?>
  2. <test>
  3. <!-- a simpler functions test - no imports -->
  4. <statechart>
  5. <datamodel>
  6. add42 = func(i: int) {
  7. return i + 42;
  8. };
  9. </datamodel>
  10. <inport name="in">
  11. <event name="start"/>
  12. </inport>
  13. <outport name="out">
  14. <event name="ok"/>
  15. </outport>
  16. <root initial="ready">
  17. <state id="ready">
  18. <transition event="start" cond="add42(10) == 52" target="../final">
  19. <raise event="ok"/>
  20. </transition>
  21. </state>
  22. <state id="final"/>
  23. </root>
  24. </statechart>
  25. <input>
  26. <event port="in" name="start" time="0 d"/>
  27. </input>
  28. <output>
  29. <big_step>
  30. <event port="out" name="ok"/>
  31. </big_step>
  32. </output>
  33. </test>