pn_print.mvc 844 B

12345678910111213141516171819202122232425262728
  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. log("Got mapping: " + dict_to_string(mapping))
  17. output((cast_v2s(read_attribute(model, name, "name")) + " --> ") + cast_v2s(read_attribute(model, name, "tokens")))
  18. return!
  19. $
  20. }
  21. }
  22. }
  23. }
  24. OnSuccess (print_tokens, success) {}
  25. OnFailure (print_tokens, success) {}
  26. Initial (schedule, print_tokens) {}