pn_print.mvc 1010 B

1234567891011121314151617181920212223242526272829303132
  1. import models/RAM_PetriNets_Runtime as RAM_PN_R
  2. RAM_PN_R print {
  3. Composite schedule {
  4. {Contains} Success success {}
  5. {Contains} ForAll print_tokens {
  6. LHS {
  7. Pre_Place {
  8. label = "0"
  9. }
  10. }
  11. RHS {
  12. Post_Place {
  13. label = "0"
  14. action = $
  15. include "primitives.alh"
  16. include "modelling.alh"
  17. Void function action(host_model : Element, name : String, mapping : Element):
  18. output((cast_v2s(read_attribute(host_model, name, "name")) + " --> ") + cast_v2s(read_attribute(host_model, name, "tokens")))
  19. return!
  20. $
  21. }
  22. }
  23. }
  24. }
  25. OnSuccess (print_tokens, success) {}
  26. OnFailure (print_tokens, success) {}
  27. Initial (schedule, print_tokens) {}
  28. }
  29. export print to models/pn_print