pn_print.mvc 777 B

123456789101112131415161718192021222324252627
  1. include "primitives.alh"
  2. include "modelling.alh"
  3. Composite schedule {
  4. {Contains} Success success {}
  5. {Contains} ForAll print_tokens {
  6. LHS {
  7. Pre_PetriNet/Place {
  8. label = "0"
  9. }
  10. }
  11. RHS {
  12. Post_PetriNet/Place {
  13. label = "0"
  14. action = $
  15. Void function action(model : Element, name : String, mapping : Element):
  16. output((cast_value(read_attribute(model, name, "name")) + " --> ") + cast_value(read_attribute(model, name, "tokens")))
  17. return!
  18. $
  19. }
  20. }
  21. }
  22. }
  23. OnSuccess (print_tokens, success) {}
  24. OnFailure (print_tokens, success) {}
  25. Initial (schedule, print_tokens) {}