matches.mvc 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. include "primitives.alh"
  2. include "modelling.alh"
  3. include "object_operations.alh"
  4. A B {
  5. Composite schedule {
  6. {Contains} Failure failure {}
  7. {Contains} Success success {}
  8. {Contains} Query match {
  9. LHS {
  10. Pre_Query/Place {
  11. label = "2"
  12. }
  13. Pre_ReachabilityGraph/Place pre_3 {
  14. label = "3"
  15. }
  16. constraint = $
  17. Boolean function constraint(host_model : Element, mapping : Element):
  18. Boolean names_match
  19. Boolean tokens_match
  20. names_match = value_eq(read_attribute(host_model, mapping["2"], "name"), read_attribute(host_model, mapping["3"], "name"))
  21. tokens_match = value_eq(read_attribute(host_model, mapping["2"], "tokens"), read_attribute(host_model, mapping["3"], "tokens"))
  22. return bool_and(names_match, tokens_match)!
  23. $
  24. }
  25. }
  26. }
  27. Initial (schedule, match) {}
  28. OnSuccess (match, success) {}
  29. OnFailure (match, failure) {}
  30. }