plant_to_EPN.mvc 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. include "primitives.alh"
  2. include "modelling.alh"
  3. include "object_operations.alh"
  4. A B {
  5. Composite schedule {
  6. {Contains} Success success {}
  7. {Contains} Failure failure {}
  8. {Contains} Atomic init_ports {
  9. LHS {}
  10. RHS {
  11. Post_Encapsulated_PetriNet/Place post_ports_00 {
  12. label = "00"
  13. value_name = $
  14. String function value(model : Element, name : String, mapping : Element):
  15. return "up"!
  16. $
  17. value_tokens = $
  18. Integer function value(model : Element, name : String, mapping : Element):
  19. return 0!
  20. $
  21. }
  22. Post_Encapsulated_PetriNet/Port post_ports_10 {
  23. label = "10"
  24. value_name = $
  25. String function value(model : Element, name : String, mapping : Element):
  26. return "up"!
  27. $
  28. }
  29. Post_Encapsulated_PetriNet/PortPlace (post_ports_10, post_ports_00) {
  30. label = "20"
  31. }
  32. Post_Encapsulated_PetriNet/Place post_ports_01 {
  33. label = "01"
  34. value_name = $
  35. String function value(model : Element, name : String, mapping : Element):
  36. return "neutral"!
  37. $
  38. value_tokens = $
  39. Integer function value(model : Element, name : String, mapping : Element):
  40. return 0!
  41. $
  42. }
  43. Post_Encapsulated_PetriNet/Port post_ports_11 {
  44. label = "11"
  45. value_name = $
  46. String function value(model : Element, name : String, mapping : Element):
  47. return "neutral"!
  48. $
  49. }
  50. Post_Encapsulated_PetriNet/PortPlace (post_ports_11, post_ports_01) {
  51. label = "21"
  52. }
  53. Post_Encapsulated_PetriNet/Place post_ports_02 {
  54. label = "02"
  55. value_name = $
  56. String function value(model : Element, name : String, mapping : Element):
  57. return "down"!
  58. $
  59. value_tokens = $
  60. Integer function value(model : Element, name : String, mapping : Element):
  61. return 0!
  62. $
  63. }
  64. Post_Encapsulated_PetriNet/Port post_ports_12 {
  65. label = "12"
  66. value_name = $
  67. String function value(model : Element, name : String, mapping : Element):
  68. return "down"!
  69. $
  70. }
  71. Post_Encapsulated_PetriNet/PortPlace (post_ports_12, post_ports_02) {
  72. label = "22"
  73. }
  74. Post_Encapsulated_PetriNet/Place post_ports_03 {
  75. label = "03"
  76. value_name = $
  77. String function value(model : Element, name : String, mapping : Element):
  78. return "interrupt"!
  79. $
  80. value_tokens = $
  81. Integer function value(model : Element, name : String, mapping : Element):
  82. return 0!
  83. $
  84. }
  85. Post_Encapsulated_PetriNet/Port post_ports_13 {
  86. label = "13"
  87. value_name = $
  88. String function value(model : Element, name : String, mapping : Element):
  89. return "interrupt"!
  90. $
  91. }
  92. Post_Encapsulated_PetriNet/PortPlace (post_ports_13, post_ports_03) {
  93. label = "23"
  94. }
  95. Post_Encapsulated_PetriNet/Place post_ports_04 {
  96. label = "04"
  97. value_name = $
  98. String function value(model : Element, name : String, mapping : Element):
  99. return "objDetected"!
  100. $
  101. value_tokens = $
  102. Integer function value(model : Element, name : String, mapping : Element):
  103. // Set the detected output based on the initial state
  104. Element states
  105. String state
  106. states = allInstances(model, "PW_Plant/State")
  107. while (read_nr_out(states) > 0):
  108. state = set_pop(states)
  109. if (value_eq(read_attribute(model, state, "isInitial"), True)):
  110. if (read_type(model, state) == "PW_Plant/ErrorState"):
  111. return 1!
  112. else:
  113. return 0!
  114. $
  115. }
  116. Post_Encapsulated_PetriNet/Port post_ports_14 {
  117. label = "14"
  118. value_name = $
  119. String function value(model : Element, name : String, mapping : Element):
  120. return "objDetected"!
  121. $
  122. }
  123. Post_Encapsulated_PetriNet/PortPlace (post_ports_14, post_ports_04) {
  124. label = "24"
  125. }
  126. Post_Encapsulated_PetriNet/Place post_ports_05 {
  127. label = "05"
  128. value_name = $
  129. String function value(model : Element, name : String, mapping : Element):
  130. return "no_objDetected"!
  131. $
  132. value_tokens = $
  133. Integer function value(model : Element, name : String, mapping : Element):
  134. // Set the detected output based on the initial state
  135. Element states
  136. String state
  137. states = allInstances(model, "PW_Plant/State")
  138. while (read_nr_out(states) > 0):
  139. state = set_pop(states)
  140. if (value_eq(read_attribute(model, state, "isInitial"), True)):
  141. if (read_type(model, state) == "PW_Plant/ErrorState"):
  142. return 0!
  143. else:
  144. return 1!
  145. $
  146. }
  147. Post_Encapsulated_PetriNet/Port post_ports_15 {
  148. label = "15"
  149. value_name = $
  150. String function value(model : Element, name : String, mapping : Element):
  151. return "no_objDetected"!
  152. $
  153. }
  154. Post_Encapsulated_PetriNet/PortPlace (post_ports_15, post_ports_05) {
  155. label = "25"
  156. }
  157. Post_Encapsulated_PetriNet/Place post_ports_06 {
  158. label = "06"
  159. value_name = $
  160. String function value(model : Element, name : String, mapping : Element):
  161. return "objPresent"!
  162. $
  163. value_tokens = $
  164. Integer function value(model : Element, name : String, mapping : Element):
  165. return 0!
  166. $
  167. }
  168. Post_Encapsulated_PetriNet/Port post_ports_16 {
  169. label = "16"
  170. value_name = $
  171. String function value(model : Element, name : String, mapping : Element):
  172. return "objPresent"!
  173. $
  174. }
  175. Post_Encapsulated_PetriNet/PortPlace (post_ports_16, post_ports_06) {
  176. label = "26"
  177. }
  178. Post_Encapsulated_PetriNet/Place post_ports_07 {
  179. label = "07"
  180. value_name = $
  181. String function value(model : Element, name : String, mapping : Element):
  182. return "no_objPresent"!
  183. $
  184. value_tokens = $
  185. Integer function value(model : Element, name : String, mapping : Element):
  186. return 0!
  187. $
  188. }
  189. Post_Encapsulated_PetriNet/Port post_ports_17 {
  190. label = "17"
  191. value_name = $
  192. String function value(model : Element, name : String, mapping : Element):
  193. return "no_objPresent"!
  194. $
  195. }
  196. Post_Encapsulated_PetriNet/PortPlace (post_ports_17, post_ports_07) {
  197. label = "27"
  198. }
  199. }
  200. }
  201. {Contains} ForAll create_states {
  202. LHS {
  203. Pre_PW_Plant/State {
  204. label = "0"
  205. }
  206. }
  207. RHS {
  208. Post_PW_Plant/State post_cs_0 {
  209. label = "0"
  210. }
  211. Post_Encapsulated_PetriNet/Place post_cs_1 {
  212. label = "1"
  213. value_name = $
  214. String function value(model : Element, name : String, mapping : Element):
  215. return read_attribute(model, mapping["0"], "name")!
  216. $
  217. value_tokens = $
  218. Integer function value(model : Element, name : String, mapping : Element):
  219. if (value_eq(read_attribute(model, mapping["0"], "isInitial"), True)):
  220. return 1!
  221. else:
  222. return 0!
  223. $
  224. }
  225. Post_PLANT2EPN_link (post_cs_0, post_cs_1) {
  226. label = "2"
  227. }
  228. }
  229. }
  230. {Contains} ForAll command_transition {
  231. LHS {
  232. Pre_PW_Plant/State pre_ct_0{
  233. label = "0"
  234. }
  235. Pre_PW_Plant/State pre_ct_1{
  236. label = "1"
  237. }
  238. Pre_PW_Plant/Transition pre_ct_2 (pre_ct_0, pre_ct_1) {
  239. label = "2"
  240. }
  241. Pre_Encapsulated_PetriNet/Place pre_ct_3{
  242. label = "3"
  243. }
  244. Pre_Encapsulated_PetriNet/Place pre_ct_4{
  245. label = "4"
  246. }
  247. Pre_PLANT2EPN_link P2E_l1 (pre_ct_0, pre_ct_3) {
  248. label = "5"
  249. }
  250. Pre_PLANT2EPN_link P2E_l2(pre_ct_1, pre_ct_4) {
  251. label = "6"
  252. }
  253. Pre_Encapsulated_PetriNet/Place pre_ct_7 {
  254. label = "7"
  255. constraint_name = $
  256. Boolean function constraint(value : String):
  257. return (bool_or(bool_or(value == "up", value == "neutral"), value == "down"))!
  258. $
  259. }
  260. Pre_Encapsulated_PetriNet/Port pre_ct_8 {
  261. label = "8"
  262. constraint_name = $
  263. Boolean function constraint(value : String):
  264. return (bool_or(bool_or(value == "up", value == "neutral"), value == "down"))!
  265. $
  266. }
  267. Pre_Encapsulated_PetriNet/PortPlace pp_l (pre_ct_8, pre_ct_7) {
  268. label = "9"
  269. }
  270. constraint = $
  271. Boolean function constraint(model : Element, mapping : Element):
  272. String transition_type
  273. String port_name
  274. transition_type = read_type(model, mapping["2"])
  275. port_name = read_attribute(model, mapping["8"], "name")
  276. log("TT " + transition_type)
  277. log("PN " + port_name)
  278. if (transition_type == "PW_Plant/OnUp"):
  279. log(cast_v2s(port_name == "up"))
  280. return (port_name == "up")!
  281. elif (transition_type == "PW_Plant/OnNeutral"):
  282. log(cast_v2s(port_name == "neutral"))
  283. return (port_name == "neutral")!
  284. elif (transition_type == "PW_Plant/OnDown"):
  285. log(cast_v2s(port_name == "down"))
  286. return (port_name == "down")!
  287. else:
  288. log("FALSE")
  289. return False!
  290. $
  291. }
  292. RHS {
  293. Post_PW_Plant/State post_ct_0{
  294. label = "0"
  295. }
  296. Post_PW_Plant/State post_ct_1{
  297. label = "1"
  298. }
  299. Post_PW_Plant/Transition post_ct_2 (post_ct_0, post_ct_1) {
  300. label = "2"
  301. }
  302. Post_Encapsulated_PetriNet/Place post_ct_3{
  303. label = "3"
  304. }
  305. Post_Encapsulated_PetriNet/Place post_ct_4{
  306. label = "4"
  307. }
  308. Post_PLANT2EPN_link (post_ct_0, post_ct_3) {
  309. label = "5"
  310. }
  311. Post_PLANT2EPN_link (post_ct_1, post_ct_4) {
  312. label = "6"
  313. }
  314. Post_Encapsulated_PetriNet/Place post_ct_7 {
  315. label = "7"
  316. }
  317. Post_Encapsulated_PetriNet/Port post_ct_8 {
  318. label = "8"
  319. }
  320. Post_Encapsulated_PetriNet/PortPlace (post_ct_8, post_ct_7) {
  321. label = "9"
  322. }
  323. Post_Encapsulated_PetriNet/Transition post_ct_10 {
  324. label = "10"
  325. value_name = $
  326. String function value(model : Element, name : String, mapping : Element):
  327. return string_join(read_attribute(model, mapping["0"], "name"), read_type(model, mapping["2"]))!
  328. $
  329. }
  330. Post_Encapsulated_PetriNet/P2T (post_ct_3, post_ct_10) {
  331. label = "11"
  332. }
  333. Post_Encapsulated_PetriNet/T2P (post_ct_10, post_ct_4) {
  334. label = "12"
  335. }
  336. Post_Encapsulated_PetriNet/P2T (post_ct_7, post_ct_10) {
  337. label = "13"
  338. }
  339. Post_Encapsulated_PetriNet/T2P (post_ct_10, post_ct_7) {
  340. label = "14"
  341. }
  342. Post_PLANT2EPN_tlink (post_ct_2, post_ct_10) {
  343. label = "100"
  344. }
  345. }
  346. }
  347. {Contains} ForAll check_object {
  348. LHS {
  349. Pre_PW_Plant/State pre_co_0{
  350. label = "0"
  351. }
  352. Pre_PW_Plant/State pre_co_1{
  353. label = "1"
  354. }
  355. Pre_PW_Plant/Transition pre_co_2 (pre_co_0, pre_co_1) {
  356. label = "2"
  357. constraint_objPresent = $
  358. Boolean function constraint(value : String):
  359. return (bool_or(value == "Y", value == "N"))!
  360. $
  361. }
  362. Pre_Encapsulated_PetriNet/Place pre_co_3{
  363. label = "3"
  364. }
  365. Pre_Encapsulated_PetriNet/Place pre_co_4{
  366. label = "4"
  367. }
  368. Pre_PLANT2EPN_link (pre_co_0, pre_co_3) {
  369. label = "5"
  370. }
  371. Pre_PLANT2EPN_link (pre_co_1, pre_co_4) {
  372. label = "6"
  373. }
  374. Pre_Encapsulated_PetriNet/Place pre_co_8 {
  375. label = "8"
  376. }
  377. Pre_Encapsulated_PetriNet/Port pre_co_11 {
  378. label = "11"
  379. constraint_name = $
  380. Boolean function constraint(value : String):
  381. return (bool_or(value == "objPresent", value == "no_objPresent"))!
  382. $
  383. }
  384. Pre_Encapsulated_PetriNet/PortPlace (pre_co_11, pre_co_8) {
  385. label = "12"
  386. }
  387. Pre_Encapsulated_PetriNet/Transition pre_co_15 {
  388. label = "15"
  389. }
  390. Pre_Encapsulated_PetriNet/P2T (pre_co_3, pre_co_15) {
  391. label = "16"
  392. }
  393. Pre_Encapsulated_PetriNet/T2P (pre_co_15, pre_co_4) {
  394. label = "17"
  395. }
  396. Pre_PLANT2EPN_tlink (pre_co_2, pre_co_15) {
  397. label = "100"
  398. }
  399. constraint = $
  400. Boolean function constraint (host_model : Element, mapping : Element):
  401. // Check whether the bound primary places match with the state
  402. String objPresent
  403. String port_name
  404. objPresent = read_attribute(host_model, mapping["2"], "objPresent")
  405. port_name = read_attribute(host_model, mapping["11"], "name")
  406. if (objPresent == "Y"):
  407. return (port_name == "objPresent")!
  408. elif (objPresent == "N"):
  409. return (port_name == "no_objPresent")!
  410. else:
  411. return False!
  412. $
  413. }
  414. RHS {
  415. Post_PW_Plant/State post_co_0{
  416. label = "0"
  417. }
  418. Post_PW_Plant/State post_co_1{
  419. label = "1"
  420. }
  421. Post_PW_Plant/Transition post_co_2 (post_co_0, post_co_1) {
  422. label = "2"
  423. }
  424. Post_Encapsulated_PetriNet/Place post_co_3{
  425. label = "3"
  426. }
  427. Post_Encapsulated_PetriNet/Place post_co_4{
  428. label = "4"
  429. }
  430. Post_PLANT2EPN_link (post_co_0, post_co_3) {
  431. label = "5"
  432. }
  433. Post_PLANT2EPN_link (post_co_1, post_co_4) {
  434. label = "6"
  435. }
  436. Post_Encapsulated_PetriNet/Place post_co_8 {
  437. label = "8"
  438. }
  439. Post_Encapsulated_PetriNet/Port post_co_11 {
  440. label = "11"
  441. }
  442. Post_Encapsulated_PetriNet/PortPlace (post_co_11, post_co_8) {
  443. label = "12"
  444. }
  445. Post_Encapsulated_PetriNet/Transition post_co_15 {
  446. label = "15"
  447. }
  448. Post_Encapsulated_PetriNet/P2T (post_co_3, post_co_15) {
  449. label = "16"
  450. }
  451. Post_Encapsulated_PetriNet/T2P (post_co_15, post_co_4) {
  452. label = "17"
  453. }
  454. Post_Encapsulated_PetriNet/P2T (post_co_8, post_co_15) {
  455. label = "9"
  456. }
  457. Post_Encapsulated_PetriNet/T2P (post_co_15, post_co_8) {
  458. label = "10"
  459. }
  460. Post_PLANT2EPN_tlink (post_co_2, post_co_15) {
  461. label = "100"
  462. }
  463. }
  464. }
  465. {Contains} ForAll detect {
  466. LHS {
  467. Pre_PW_Plant/NormalState pre_de_0{
  468. label = "0"
  469. }
  470. Pre_PW_Plant/ErrorState pre_de_1{
  471. label = "1"
  472. }
  473. Pre_PW_Plant/Transition pre_de_2 (pre_de_0, pre_de_1) {
  474. label = "2"
  475. }
  476. Pre_Encapsulated_PetriNet/Place pre_de_3{
  477. label = "3"
  478. }
  479. Pre_Encapsulated_PetriNet/Place pre_de_4{
  480. label = "4"
  481. }
  482. Pre_PLANT2EPN_link (pre_de_0, pre_de_3) {
  483. label = "5"
  484. }
  485. Pre_PLANT2EPN_link (pre_de_1, pre_de_4) {
  486. label = "6"
  487. }
  488. Pre_Encapsulated_PetriNet/Transition pre_de_7 {
  489. label = "7"
  490. }
  491. Pre_Encapsulated_PetriNet/P2T (pre_de_3, pre_de_7) {
  492. label = "8"
  493. }
  494. Pre_Encapsulated_PetriNet/T2P (pre_de_7, pre_de_4) {
  495. label = "9"
  496. }
  497. Pre_Encapsulated_PetriNet/Place pre_de_10 {
  498. label = "10"
  499. }
  500. Pre_Encapsulated_PetriNet/Port pre_de_11 {
  501. label = "11"
  502. }
  503. Pre_Encapsulated_PetriNet/PortPlace (pre_de_11, pre_de_10) {
  504. label = "12"
  505. }
  506. Pre_Encapsulated_PetriNet/Place pre_de_13 {
  507. label = "13"
  508. }
  509. Pre_Encapsulated_PetriNet/Port pre_de_14 {
  510. label = "14"
  511. constraint_name = $
  512. Boolean function constraint(value : String):
  513. return (value == "interrupt")!
  514. $
  515. }
  516. Pre_Encapsulated_PetriNet/PortPlace (pre_de_14, pre_de_13) {
  517. label = "15"
  518. }
  519. Pre_Encapsulated_PetriNet/Place pre_de_16 {
  520. label = "16"
  521. }
  522. Pre_Encapsulated_PetriNet/Port pre_de_17 {
  523. label = "17"
  524. constraint_name = $
  525. Boolean function constraint(value : String):
  526. return (value == "no_objDetected")!
  527. $
  528. }
  529. Pre_Encapsulated_PetriNet/PortPlace (pre_de_17, pre_de_16) {
  530. label = "18"
  531. }
  532. Pre_Encapsulated_PetriNet/Place pre_de_19 {
  533. label = "19"
  534. }
  535. Pre_Encapsulated_PetriNet/Port pre_de_20 {
  536. label = "20"
  537. constraint_name = $
  538. Boolean function constraint(value : String):
  539. return (value == "objDetected")!
  540. $
  541. }
  542. Pre_Encapsulated_PetriNet/PortPlace (pre_de_20, pre_de_19) {
  543. label = "21"
  544. }
  545. Pre_PLANT2EPN_tlink (pre_de_2, pre_de_7) {
  546. label = "100"
  547. }
  548. constraint = $
  549. Boolean function constraint (host_model : Element, mapping : Element):
  550. // Check whether the bound primary places match with the state
  551. String source_type
  552. String port_name
  553. source_type = read_type(host_model, mapping["2"])
  554. port_name = read_attribute(host_model, mapping["11"], "name")
  555. if (source_type == "PW_Plant/OnUp"):
  556. return (port_name == "up")!
  557. elif (source_type == "PW_Plant/OnNeutral"):
  558. return (port_name == "neutral")!
  559. elif (source_type == "PW_Plant/OnDown"):
  560. return (port_name == "down")!
  561. else:
  562. return False!
  563. $
  564. }
  565. RHS {
  566. Post_PW_Plant/NormalState post_de_0{
  567. label = "0"
  568. }
  569. Post_PW_Plant/ErrorState post_de_1{
  570. label = "1"
  571. }
  572. Post_PW_Plant/Transition post_de_2 (post_de_0, post_de_1){
  573. label = "2"
  574. }
  575. Post_Encapsulated_PetriNet/Place post_de_3{
  576. label = "3"
  577. }
  578. Post_Encapsulated_PetriNet/Place post_de_4{
  579. label = "4"
  580. }
  581. Post_PLANT2EPN_link (post_de_0, post_de_3) {
  582. label = "5"
  583. }
  584. Post_PLANT2EPN_link (post_de_1, post_de_4) {
  585. label = "6"
  586. }
  587. Post_Encapsulated_PetriNet/Transition post_de_7 {
  588. label = "7"
  589. }
  590. Post_Encapsulated_PetriNet/P2T (post_de_3, post_de_7) {
  591. label = "8"
  592. }
  593. Post_Encapsulated_PetriNet/T2P (post_de_7, post_de_4) {
  594. label = "9"
  595. }
  596. Post_Encapsulated_PetriNet/Place post_de_10 {
  597. label = "10"
  598. }
  599. Post_Encapsulated_PetriNet/Port post_de_11 {
  600. label = "11"
  601. }
  602. Post_Encapsulated_PetriNet/PortPlace (post_de_11, post_de_10) {
  603. label = "12"
  604. }
  605. Post_Encapsulated_PetriNet/Place post_de_13 {
  606. label = "13"
  607. }
  608. Post_Encapsulated_PetriNet/Port post_de_14 {
  609. label = "14"
  610. }
  611. Post_Encapsulated_PetriNet/PortPlace (post_de_14, post_de_13) {
  612. label = "15"
  613. }
  614. Post_Encapsulated_PetriNet/Place post_de_16 {
  615. label = "16"
  616. }
  617. Post_Encapsulated_PetriNet/Port post_de_17 {
  618. label = "17"
  619. }
  620. Post_Encapsulated_PetriNet/PortPlace (post_de_17, post_de_16) {
  621. label = "18"
  622. }
  623. Post_Encapsulated_PetriNet/Place post_de_19 {
  624. label = "19"
  625. }
  626. Post_Encapsulated_PetriNet/Port post_de_20 {
  627. label = "20"
  628. }
  629. Post_Encapsulated_PetriNet/PortPlace (post_de_20, post_de_19) {
  630. label = "21"
  631. }
  632. Post_Encapsulated_PetriNet/P2T (post_de_10, post_de_7) {
  633. label = "22"
  634. }
  635. Post_Encapsulated_PetriNet/T2P (post_de_7, post_de_13) {
  636. label = "23"
  637. }
  638. Post_Encapsulated_PetriNet/P2T (post_de_16, post_de_7) {
  639. label = "24"
  640. }
  641. Post_Encapsulated_PetriNet/T2P (post_de_7, post_de_19) {
  642. label = "25"
  643. }
  644. Post_PLANT2EPN_tlink (post_de_2, post_de_7) {
  645. label = "100"
  646. }
  647. }
  648. }
  649. {Contains} ForAll remove_detect {
  650. LHS {
  651. Pre_PW_Plant/ErrorState pre_rd_0{
  652. label = "0"
  653. }
  654. Pre_PW_Plant/NormalState pre_rd_1{
  655. label = "1"
  656. }
  657. Pre_PW_Plant/Transition pre_rd_2 (pre_rd_0, pre_rd_1){
  658. label = "2"
  659. }
  660. Pre_Encapsulated_PetriNet/Place pre_rd_3{
  661. label = "3"
  662. }
  663. Pre_Encapsulated_PetriNet/Place pre_rd_4{
  664. label = "4"
  665. }
  666. Pre_PLANT2EPN_link (pre_rd_0, pre_rd_3) {
  667. label = "5"
  668. }
  669. Pre_PLANT2EPN_link (pre_rd_1, pre_rd_4) {
  670. label = "6"
  671. }
  672. Pre_Encapsulated_PetriNet/Transition pre_rd_7 {
  673. label = "7"
  674. }
  675. Pre_Encapsulated_PetriNet/P2T (pre_rd_3, pre_rd_7) {
  676. label = "8"
  677. }
  678. Pre_Encapsulated_PetriNet/T2P (pre_rd_7, pre_rd_4) {
  679. label = "9"
  680. }
  681. Pre_Encapsulated_PetriNet/Place pre_rd_10 {
  682. label = "10"
  683. }
  684. Pre_Encapsulated_PetriNet/Port pre_rd_11 {
  685. label = "11"
  686. constraint_name = $
  687. Boolean function constraint(value : String):
  688. return (value == "objDetected")!
  689. $
  690. }
  691. Pre_Encapsulated_PetriNet/PortPlace (pre_rd_11, pre_rd_10) {
  692. label = "12"
  693. }
  694. Pre_Encapsulated_PetriNet/Place pre_rd_13 {
  695. label = "13"
  696. }
  697. Pre_Encapsulated_PetriNet/Port pre_rd_14 {
  698. label = "14"
  699. constraint_name = $
  700. Boolean function constraint(value : String):
  701. return (value == "no_objDetected")!
  702. $
  703. }
  704. Pre_Encapsulated_PetriNet/PortPlace (pre_rd_14, pre_rd_13) {
  705. label = "15"
  706. }
  707. Pre_PLANT2EPN_tlink (pre_rd_2, pre_rd_7) {
  708. label = "100"
  709. }
  710. }
  711. RHS {
  712. Post_PW_Plant/ErrorState post_rd_0{
  713. label = "0"
  714. }
  715. Post_PW_Plant/NormalState post_rd_1{
  716. label = "1"
  717. }
  718. Post_PW_Plant/Transition post_rd_2 (post_rd_0, post_rd_1){
  719. label = "2"
  720. }
  721. Post_Encapsulated_PetriNet/Place post_rd_3{
  722. label = "3"
  723. }
  724. Post_Encapsulated_PetriNet/Place post_rd_4{
  725. label = "4"
  726. }
  727. Post_PLANT2EPN_link (post_rd_0, post_rd_3) {
  728. label = "5"
  729. }
  730. Post_PLANT2EPN_link (post_rd_1, post_rd_4) {
  731. label = "6"
  732. }
  733. Post_Encapsulated_PetriNet/Transition post_rd_7 {
  734. label = "7"
  735. }
  736. Post_Encapsulated_PetriNet/P2T (post_rd_3, post_rd_7) {
  737. label = "8"
  738. }
  739. Post_Encapsulated_PetriNet/T2P (post_rd_7, post_rd_4) {
  740. label = "9"
  741. }
  742. Post_Encapsulated_PetriNet/Place post_rd_10 {
  743. label = "10"
  744. }
  745. Post_Encapsulated_PetriNet/Port post_rd_11 {
  746. label = "11"
  747. }
  748. Post_Encapsulated_PetriNet/PortPlace (post_rd_11, post_rd_10) {
  749. label = "12"
  750. }
  751. Post_Encapsulated_PetriNet/Place post_rd_13 {
  752. label = "13"
  753. }
  754. Post_Encapsulated_PetriNet/Port post_rd_14 {
  755. label = "14"
  756. }
  757. Post_Encapsulated_PetriNet/PortPlace (post_rd_14, post_rd_13) {
  758. label = "15"
  759. }
  760. Post_Encapsulated_PetriNet/P2T (post_rd_10, post_rd_7) {
  761. label = "16"
  762. }
  763. Post_Encapsulated_PetriNet/T2P (post_rd_7, post_rd_13) {
  764. label = "17"
  765. }
  766. Post_PLANT2EPN_tlink (post_rd_2, post_rd_7) {
  767. label = "100"
  768. }
  769. }
  770. }
  771. }
  772. Initial (schedule, init_ports) {}
  773. OnSuccess (init_ports, create_states) {}
  774. OnSuccess (create_states, command_transition) {}
  775. OnSuccess (command_transition, check_object) {}
  776. OnSuccess (check_object, detect) {}
  777. OnSuccess (detect, remove_detect) {}
  778. OnSuccess (remove_detect, success) {}
  779. OnFailure (init_ports, create_states) {}
  780. OnFailure (create_states, command_transition) {}
  781. OnFailure (command_transition, check_object) {}
  782. OnFailure (check_object, detect) {}
  783. OnFailure (detect, remove_detect) {}
  784. OnFailure (remove_detect, success) {}
  785. }