environment_to_EPN.mvc 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. include "primitives.alh"
  2. A B {
  3. Composite schedule {
  4. {Contains} Success success {}
  5. {Contains} Failure failure {}
  6. {Contains} ForAll create_ports {
  7. LHS {
  8. Pre_Environment_PW/Event {
  9. label = "1"
  10. }
  11. }
  12. RHS {
  13. Post_Environment_PW/Event {
  14. label = "1"
  15. }
  16. Post_Encapsulated_PetriNet/Place cp_place {
  17. label = "2"
  18. value_name = $
  19. String function value(model : Element, name : String, mapping : Element):
  20. return read_attribute(model, mapping["0"], "name")!
  21. $
  22. }
  23. Post_Encapsulated_PetriNet/Port cp_port {
  24. label = "3"
  25. value_name = $
  26. String function value(model : Element, name : String, mapping : Element):
  27. return read_attribute(model, mapping["0"], "name")!
  28. $
  29. }
  30. Post_ENV2EPN_link (cp_evt, cp_place) {
  31. label = "4"
  32. }
  33. Post_Encapsulated_PetriNet/PortPlace (cp_port, cp_place) {
  34. label = "5"
  35. }
  36. }
  37. }
  38. {Contains} ForAll create_switches {
  39. LHS {
  40. Pre_Environment_PW/Group pre_grp {
  41. label = "1"
  42. }
  43. Pre_Environment_PW/Event pre_evt_a {
  44. label = "2"
  45. }
  46. Pre_Environment_PW/Event pre_evt_b {
  47. label = "3"
  48. }
  49. Pre_Environment_PW/Contains (pre_grp, pre_evt_a) {
  50. label = "4"
  51. }
  52. Pre_Environment_PW/Contains (pre_grp, pre_evt_b) {
  53. label = "5"
  54. }
  55. Pre_ENV2EPN_link (pre_evt_a, pre_place_a) {
  56. label = "6"
  57. }
  58. Pre_ENV2EPN_link (pre_evt_b, pre_place_b) {
  59. label = "7"
  60. }
  61. Pre_Encapsulated_PetriNet/Place pre_place_a {
  62. label = "8"
  63. }
  64. Pre_Encapsulated_PetriNet/Place pre_place_b {
  65. label = "9"
  66. }
  67. }
  68. RHS {
  69. Post_Environment_PW/Group post_grp {
  70. label = "1"
  71. }
  72. Post_Environment_PW/Event post_evt_a {
  73. label = "2"
  74. }
  75. Post_Environment_PW/Event post_evt_b {
  76. label = "3"
  77. }
  78. Post_Environment_PW/Contains (post_grp, post_evt_a) {
  79. label = "4"
  80. }
  81. Post_Environment_PW/Contains (post_grp, post_evt_b) {
  82. label = "5"
  83. }
  84. Post_ENV2EPN_link (post_evt_a, post_place_a) {
  85. label = "6"
  86. }
  87. Post_ENV2EPN_link (post_evt_b, post_place_b) {
  88. label = "7"
  89. }
  90. Post_Encapsulated_PetriNet/Place post_place_a {
  91. label = "8"
  92. }
  93. Post_Encapsulated_PetriNet/Place post_place_b {
  94. label = "9"
  95. }
  96. Post_Encapsulated_PetriNet/P2T (post_place_a, post_transition) {
  97. label = "10"
  98. }
  99. Post_Encapsulated_PetriNet/T2P (post_transition, post_place_b) {
  100. label = "11"
  101. }
  102. Post_Encapsulated_PetriNet/Transition post_transition {
  103. label = "12"
  104. }
  105. }
  106. }
  107. }
  108. Initial (schedule, create_ports) {}
  109. OnSuccess (create_ports, create_switches) {}
  110. OnSuccess (create_switches, success) {}
  111. OnFailure (create_ports, failure) {}
  112. OnFailure (create_switches, failure) {}
  113. }