PM_to_DEVS.mvc 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. include "primitives.alh"
  2. include "modelling.alh"
  3. include "object_operations.alh"
  4. Composite schedule {
  5. {Contains} Success success {}
  6. {Contains} Atomic add_resource_handler {
  7. LHS {}
  8. RHS {
  9. Post_DEVS/DEVSInstance post_resource_1 {
  10. label = "1"
  11. value_name = $
  12. String function value(model : Element, name : String, mapping : Element):
  13. return "resource_handler"!
  14. $
  15. value_type = $
  16. String function value(model : Element, name : String, mapping : Element):
  17. return "ResourceHandler"!
  18. $
  19. }
  20. Post_DEVS/InputPort post_resource_2 {
  21. label = "2"
  22. name = "resource_in"
  23. }
  24. Post_DEVS/DEVSInstanceToPort (post_resource_1, post_resource_2) {
  25. label = "3"
  26. }
  27. Post_DEVS/OutputPort post_resource_3 {
  28. label = "4"
  29. name = "resource_out"
  30. }
  31. Post_DEVS/DEVSInstanceToPort (post_resource_1, post_resource_3) {
  32. label = "5"
  33. }
  34. }
  35. }
  36. {Contains} ForAll initial {
  37. LHS {
  38. Pre_PM/Initial pre_init_0 {
  39. label = "0"
  40. }
  41. }
  42. RHS {
  43. Post_PM/Initial post_init_0 {
  44. label = "0"
  45. }
  46. Post_DEVS/DEVSInstance post_init_1 {
  47. label = "1"
  48. value_name = $
  49. String function value(model : Element, name : String, mapping : Element):
  50. return read_attribute(model, mapping["0"], "name")!
  51. $
  52. value_type = $
  53. String function value(model : Element, name : String, mapping : Element):
  54. return "Initial"!
  55. $
  56. }
  57. Post_Trace (post_init_0, post_init_1) {
  58. label = "1"
  59. }
  60. Post_DEVS/OutputPort post_init_2 {
  61. label = "2"
  62. name = "control_out"
  63. }
  64. Post_DEVS/DEVSInstanceToPort (post_init_1, post_init_2) {
  65. label = "3"
  66. }
  67. }
  68. }
  69. {Contains} ForAll finish {
  70. LHS {
  71. Pre_PM/Initial pre_finish_0 {
  72. label = "0"
  73. }
  74. }
  75. RHS {
  76. Post_PM/Initial post_finish_0 {
  77. label = "0"
  78. }
  79. Post_DEVS/DEVSInstance post_finish_1 {
  80. label = "1"
  81. value_name = $
  82. String function value(model : Element, name : String, mapping : Element):
  83. return read_attribute(model, mapping["0"], "name")!
  84. $
  85. value_type = $
  86. String function value(model : Element, name : String, mapping : Element):
  87. return "Finish"!
  88. $
  89. }
  90. Post_Trace (post_finish_0, post_finish_1) {
  91. label = "2"
  92. }
  93. Post_DEVS/InputPort post_finish_2 {
  94. label = "3"
  95. name = "control_in"
  96. }
  97. Post_DEVS/DEVSInstanceToPort (post_finish_1, post_finish_2) {
  98. label = "4"
  99. }
  100. }
  101. }
  102. {Contains} ForAll activity {
  103. LHS {
  104. Pre_PM/Initial pre_activity_0 {
  105. label = "0"
  106. }
  107. }
  108. RHS {
  109. Post_PM/Initial post_activity_0 {
  110. label = "0"
  111. }
  112. Post_DEVS/DEVSInstance post_activity_1 {
  113. label = "1"
  114. value_name = $
  115. String function value(model : Element, name : String, mapping : Element):
  116. return read_attribute(model, mapping["0"], "name")!
  117. $
  118. value_type = $
  119. String function value(model : Element, name : String, mapping : Element):
  120. return "Activity"!
  121. $
  122. value_parameters = $
  123. String function value(model : Element, name : String, mapping : Element):
  124. return "[" + cast_value(read_attribute(model, mapping["0"], "name")) + ", " + cast_string(read_attribute(model, mapping["0"], "distribution")) + "]"!
  125. $
  126. }
  127. Post_Trace (post_activity_0, post_activity_1) {
  128. label = "1"
  129. }
  130. Post_DEVS/InputPort post_activity_2 {
  131. label = "2"
  132. name = "resource_in"
  133. }
  134. Post_DEVS/DEVSInstanceToPort (post_activity_1, post_activity_2) {
  135. label = "2"
  136. }
  137. Post_DEVS/OutputPort post_activity_3 {
  138. label = "3"
  139. name = "resource_out"
  140. }
  141. Post_DEVS/DEVSInstanceToPort (post_activity_1, post_activity_3) {
  142. label = "4"
  143. }
  144. Post_DEVS/InputPort post_activity_4 {
  145. label = "5"
  146. name = "control_in"
  147. }
  148. Post_DEVS/DEVSInstanceToPort (post_activity_1, post_activity_4) {
  149. label = "6"
  150. }
  151. Post_DEVS/OutputPort post_activity_5 {
  152. label = "7"
  153. name = "control_out"
  154. }
  155. Post_DEVS/DEVSInstanceToPort (post_activity_1, post_activity_5) {
  156. label = "8"
  157. }
  158. }
  159. }
  160. {Contains} ForAll parallelsplit {
  161. LHS {
  162. Pre_PM/Initial pre_split_0 {
  163. label = "0"
  164. }
  165. }
  166. RHS {
  167. Post_PM/Initial post_split_0 {
  168. label = "0"
  169. }
  170. Post_DEVS/DEVSInstance post_split_1 {
  171. label = "1"
  172. value_name = $
  173. String function value(model : Element, name : String, mapping : Element):
  174. return read_attribute(model, mapping["0"], "name")!
  175. $
  176. value_type = $
  177. String function value(model : Element, name : String, mapping : Element):
  178. return "ParallelSplit"!
  179. $
  180. }
  181. Post_Trace (post_split_0, post_split_1) {
  182. label = "2"
  183. }
  184. Post_DEVS/InputPort post_split_2 {
  185. label = "3"
  186. name = "control_in"
  187. }
  188. Post_DEVS/DEVSInstanceToPort (post_split_1, post_split_2) {
  189. label = "4"
  190. }
  191. Post_DEVS/OutputPort post_split_3 {
  192. label = "5"
  193. name = "control_out"
  194. }
  195. Post_DEVS/DEVSInstanceToPort (post_split_1, post_split_3) {
  196. label = "6"
  197. }
  198. }
  199. }
  200. {Contains} ForAll synchronization {
  201. LHS {
  202. Pre_PM/Initial pre_sync_0 {
  203. label = "0"
  204. }
  205. }
  206. RHS {
  207. Post_PM/Initial post_sync_0 {
  208. label = "0"
  209. }
  210. Post_DEVS/DEVSInstance post_sync_1 {
  211. label = "1"
  212. value_name = $
  213. String function value(model : Element, name : String, mapping : Element):
  214. return read_attribute(model, mapping["0"], "name")!
  215. $
  216. value_type = $
  217. String function value(model : Element, name : String, mapping : Element):
  218. return "Synchronization"!
  219. $
  220. }
  221. Post_Trace (post_sync_0, post_sync_1) {
  222. label = "2"
  223. }
  224. Post_DEVS/InputPort post_sync_2 {
  225. label = "3"
  226. name = "control_in"
  227. }
  228. Post_DEVS/DEVSInstanceToPort (post_sync_1, post_sync_2) {
  229. label = "4"
  230. }
  231. Post_DEVS/OutputPort post_sync_3 {
  232. label = "5"
  233. name = "control_out"
  234. }
  235. Post_DEVS/DEVSInstanceToPort (post_sync_1, post_sync_3) {
  236. label = "6"
  237. }
  238. }
  239. }
  240. {Contains} ForAll xor {
  241. LHS {
  242. Pre_PM/Initial pre_xor_0 {
  243. label = "0"
  244. }
  245. }
  246. RHS {
  247. Post_PM/Initial post_xor_0 {
  248. label = "0"
  249. }
  250. Post_DEVS/DEVSInstance post_xor_1 {
  251. label = "1"
  252. value_name = $
  253. String function value(model : Element, name : String, mapping : Element):
  254. return read_attribute(model, mapping["0"], "name")!
  255. $
  256. value_type = $
  257. String function value(model : Element, name : String, mapping : Element):
  258. return "ExclusiveChoice"!
  259. $
  260. }
  261. Post_Trace (post_xor_0, post_xor_1) {
  262. label = "2"
  263. }
  264. Post_DEVS/InputPort post_xor_2 {
  265. label = "3"
  266. name = "control_in"
  267. }
  268. Post_DEVS/DEVSInstanceToPort (post_xor_1, post_xor_2) {
  269. label = "4"
  270. }
  271. Post_DEVS/OutputPort post_xor_3 {
  272. label = "5"
  273. name = "control_out1"
  274. }
  275. Post_DEVS/DEVSInstanceToPort (post_xor_1, post_xor_3) {
  276. label = "6"
  277. }
  278. Post_DEVS/OutputPort post_xor_4 {
  279. label = "7"
  280. name = "control_out2"
  281. }
  282. Post_DEVS/DEVSInstanceToPort (post_xor_1, post_xor_4) {
  283. label = "8"
  284. }
  285. }
  286. }
  287. {Contains} ForAll merge {
  288. LHS {
  289. Pre_PM/Initial pre_merge_0 {
  290. label = "0"
  291. }
  292. }
  293. RHS {
  294. Post_PM/Initial post_merge_0 {
  295. label = "0"
  296. }
  297. Post_DEVS/DEVSInstance post_merge_1 {
  298. label = "1"
  299. value_name = $
  300. String function value(model : Element, name : String, mapping : Element):
  301. return read_attribute(model, mapping["0"], "name")!
  302. $
  303. value_type = $
  304. String function value(model : Element, name : String, mapping : Element):
  305. return "SimpleMerge"!
  306. $
  307. }
  308. Post_Trace (post_merge_0, post_merge_1) {
  309. label = "2"
  310. }
  311. Post_DEVS/InputPort post_merge_2 {
  312. label = "3"
  313. name = "control_in"
  314. }
  315. Post_DEVS/DEVSInstanceToPort (post_merge_1, post_merge_2) {
  316. label = "4"
  317. }
  318. Post_DEVS/OutputPort post_merge_3 {
  319. label = "5"
  320. name = "control_out"
  321. }
  322. Post_DEVS/DEVSInstanceToPort (post_merge_1, post_merge_3) {
  323. label = "6"
  324. }
  325. }
  326. }
  327. {Contains} ForAll multi {
  328. LHS {
  329. Pre_PM/Initial pre_multi_0 {
  330. label = "0"
  331. }
  332. }
  333. RHS {
  334. Post_PM/Initial post_multi_0 {
  335. label = "0"
  336. }
  337. Post_DEVS/DEVSInstance post_multi_1 {
  338. label = "1"
  339. value_name = $
  340. String function value(model : Element, name : String, mapping : Element):
  341. return read_attribute(model, mapping["0"], "name")!
  342. $
  343. value_type = $
  344. String function value(model : Element, name : String, mapping : Element):
  345. return "MultiInstance"!
  346. $
  347. value_parameters = $
  348. String function value(model : Element, name : String, mapping : Element):
  349. return "[" + cast_value(read_attribute(model, mapping["0"], "name")) + ", " + cast_string(read_attribute(model, mapping["0"], "nr_instances")) + ", " + cast_string(read_attribute(model, mapping["0"], "distribution")) + "]"!
  350. $
  351. }
  352. Post_Trace (post_multi_0, post_multi_1) {
  353. label = "2"
  354. }
  355. Post_DEVS/InputPort post_multi_2 {
  356. label = "3"
  357. name = "resource_in"
  358. }
  359. Post_DEVS/DEVSInstanceToPort (post_multi_1, post_multi_2) {
  360. label = "4"
  361. }
  362. Post_DEVS/OutputPort post_multi_3 {
  363. label = "5"
  364. name = "resource_out"
  365. }
  366. Post_DEVS/DEVSInstanceToPort (post_multi_1, post_multi_3) {
  367. label = "6"
  368. }
  369. Post_DEVS/InputPort post_multi_4 {
  370. label = "7"
  371. name = "control_in"
  372. }
  373. Post_DEVS/DEVSInstanceToPort (post_multi_1, post_multi_4) {
  374. label = "8"
  375. }
  376. Post_DEVS/OutputPort post_multi_5 {
  377. label = "9"
  378. name = "control_out"
  379. }
  380. Post_DEVS/DEVSInstanceToPort (post_multi_1, post_multi_5) {
  381. label = "10"
  382. }
  383. }
  384. }
  385. {Contains} ForAll map_resources_to {
  386. LHS {
  387. Pre_DEVS/DEVSInstance pre_mrt_0 {
  388. label = "0"
  389. constraint_name = $
  390. Boolean function constraint(model : Element, name : String):
  391. return (cast_string(read_attribute(model, name, "type")) == "ResourceHandler")!
  392. $
  393. }
  394. Pre_DEVS/Port pre_mrt_1 {
  395. label = "1"
  396. constraint_name = $
  397. Boolean function constraint(model : Element, name : String):
  398. return (cast_string(read_attribute(model, name, "type")) == "resource_in")!
  399. $
  400. }
  401. Pre_DEVS/DEVSInstanceToPort (pre_mrt_0, pre_mrt_1) {
  402. label = "2"
  403. }
  404. Pre_DEVS/DEVSInstance pre_mrt_2 {
  405. label = "3"
  406. constraint_name = $
  407. Boolean function constraint(model : Element, name : String):
  408. return (cast_string(read_attribute(model, name, "type")) != "ResourceHandler")!
  409. $
  410. }
  411. Pre_DEVS/Port pre_mrt_3 {
  412. label = "4"
  413. constraint_name = $
  414. Boolean function constraint(model : Element, name : String):
  415. return (cast_string(read_attribute(model, name, "type")) == "resource_out")!
  416. $
  417. }
  418. Pre_DEVS/DEVSInstanceToPort (pre_mrt_2, pre_mrt_3) {
  419. label = "5"
  420. }
  421. }
  422. RHS {
  423. Post_DEVS/DEVSInstance post_mrt_0 {
  424. label = "0"
  425. }
  426. Post_DEVS/Port post_mrt_1 {
  427. label = "1"
  428. }
  429. Post_DEVS/DEVSInstanceToPort (post_mrt_0, post_mrt_1) {
  430. label = "2"
  431. }
  432. Post_DEVS/DEVSInstance post_mrt_2 {
  433. label = "3"
  434. }
  435. Post_DEVS/Port post_mrt_3 {
  436. label = "4"
  437. }
  438. Post_DEVS/DEVSInstanceToPort (post_mrt_2, post_mrt_3) {
  439. label = "5"
  440. }
  441. Post_DEVS/Channel (post_mrt_3, post_mrt_1) {
  442. label = "6"
  443. }
  444. }
  445. }
  446. {Contains} ForAll map_resources_from {
  447. LHS {
  448. Pre_DEVS/DEVSInstance pre_mrf_0 {
  449. label = "0"
  450. constraint_name = $
  451. Boolean function constraint(model : Element, name : String):
  452. return (cast_string(read_attribute(model, name, "type")) == "ResourceHandler")!
  453. $
  454. }
  455. Pre_DEVS/Port pre_mrf_1 {
  456. label = "1"
  457. constraint_name = $
  458. Boolean function constraint(model : Element, name : String):
  459. return (cast_string(read_attribute(model, name, "type")) == "resource_out")!
  460. $
  461. }
  462. Pre_DEVS/DEVSInstanceToPort (pre_mrf_0, pre_mrf_1) {
  463. label = "2"
  464. }
  465. Pre_DEVS/DEVSInstance pre_mrf_2 {
  466. label = "3"
  467. constraint_name = $
  468. Boolean function constraint(model : Element, name : String):
  469. return (cast_string(read_attribute(model, name, "type")) != "ResourceHandler")!
  470. $
  471. }
  472. Pre_DEVS/Port pre_mrf_3 {
  473. label = "4"
  474. constraint_name = $
  475. Boolean function constraint(model : Element, name : String):
  476. return (cast_string(read_attribute(model, name, "type")) == "resource_in")!
  477. $
  478. }
  479. Pre_DEVS/DEVSInstanceToPort (pre_mrf_2, pre_mrf_3) {
  480. label = "5"
  481. }
  482. }
  483. RHS {
  484. Post_DEVS/DEVSInstance post_mrf_0 {
  485. label = "0"
  486. }
  487. Post_DEVS/Port post_mrf_1 {
  488. label = "1"
  489. }
  490. Post_DEVS/DEVSInstanceToPort (post_mrf_0, post_mrf_1) {
  491. label = "2"
  492. }
  493. Post_DEVS/DEVSInstance post_mrf_2 {
  494. label = "3"
  495. }
  496. Post_DEVS/Port post_mrf_3 {
  497. label = "4"
  498. }
  499. Post_DEVS/DEVSInstanceToPort (post_mrf_2, post_mrf_3) {
  500. label = "5"
  501. }
  502. Post_DEVS/Channel (post_mrf_1, post_mrf_3) {
  503. label = "6"
  504. }
  505. }
  506. }
  507. {Contains} ForAll map_control {
  508. LHS {
  509. Pre_DEVS/DEVSInstance pre_map_0 {
  510. label = "0"
  511. }
  512. Pre_DEVS/Port pre_map_1 {
  513. label = "1"
  514. constraint_name = $
  515. Boolean function constraint(model : Element, name : String):
  516. return (cast_string(read_attribute(model, name, "type")) == "control_out")!
  517. $
  518. }
  519. Pre_DEVS/DEVSInstanceToPort (pre_map_0, pre_map_1) {
  520. label = "2"
  521. }
  522. Pre_DEVS/DEVSInstance pre_map_2 {
  523. label = "3"
  524. }
  525. Pre_DEVS/Port pre_map_3 {
  526. label = "4"
  527. constraint_name = $
  528. Boolean function constraint(model : Element, name : String):
  529. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  530. $
  531. }
  532. Pre_DEVS/DEVSInstanceToPort (pre_map_2, pre_map_3) {
  533. label = "5"
  534. }
  535. Pre_PM/ProcessNode pre_map_4 {
  536. label = "6"
  537. }
  538. Pre_Trace (pre_map_4, pre_map_0) {
  539. label = "7"
  540. }
  541. Pre_PM/ProcessNode pre_map_5 {
  542. label = "8"
  543. }
  544. Pre_Trace (pre_map_5, pre_map_1) {
  545. label = "9"
  546. }
  547. Pre_PM/Next (pre_map_4, pre_map_5) {
  548. label = "10"
  549. }
  550. }
  551. RHS {
  552. Post_DEVS/DEVSInstance post_map_0 {
  553. label = "0"
  554. }
  555. Post_DEVS/Port post_map_1 {
  556. label = "1"
  557. }
  558. Post_DEVS/DEVSInstanceToPort (post_map_0, post_map_1) {
  559. label = "2"
  560. }
  561. Post_DEVS/DEVSInstance post_map_2 {
  562. label = "3"
  563. }
  564. Post_DEVS/Port post_map_3 {
  565. label = "4"
  566. }
  567. Post_DEVS/DEVSInstanceToPort (post_map_2, post_map_3) {
  568. label = "5"
  569. }
  570. Post_PM/ProcessNode post_map_4 {
  571. label = "6"
  572. }
  573. Post_Trace (post_map_4, post_map_0) {
  574. label = "7"
  575. }
  576. Post_PM/ProcessNode post_map_5 {
  577. label = "8"
  578. }
  579. Post_Trace (post_map_5, post_map_1) {
  580. label = "9"
  581. }
  582. Post_PM/Next (post_map_4, post_map_5) {
  583. label = "10"
  584. }
  585. Post_DEVS/Channel (post_map_1, post_map_3) {
  586. label = "11"
  587. }
  588. }
  589. }
  590. {Contains} ForAll map_control_decision_true {
  591. LHS {
  592. Pre_DEVS/DEVSInstance pre_mdt_0 {
  593. label = "0"
  594. }
  595. Pre_DEVS/Port pre_mdt_1 {
  596. label = "1"
  597. constraint_name = $
  598. Boolean function constraint(model : Element, name : String):
  599. return (cast_string(read_attribute(model, name, "type")) == "control_out1")!
  600. $
  601. }
  602. Pre_DEVS/DEVSInstanceToPort (pre_mdt_0, pre_mdt_1) {
  603. label = "2"
  604. }
  605. Pre_DEVS/DEVSInstance pre_mdt_2 {
  606. label = "3"
  607. }
  608. Pre_DEVS/Port pre_mdt_3 {
  609. label = "4"
  610. constraint_name = $
  611. Boolean function constraint(model : Element, name : String):
  612. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  613. $
  614. }
  615. Pre_DEVS/DEVSInstanceToPort (pre_mdt_2, pre_mdt_3) {
  616. label = "5"
  617. }
  618. Pre_PM/ProcessNode pre_mdt_4 {
  619. label = "6"
  620. }
  621. Pre_Trace (pre_mdt_4, pre_mdt_0) {
  622. label = "7"
  623. }
  624. Pre_PM/ProcessNode pre_mdt_5 {
  625. label = "8"
  626. }
  627. Pre_Trace (pre_mdt_5, pre_mdt_1) {
  628. label = "9"
  629. }
  630. Pre_PM/DecisionTrue (pre_mdt_4, pre_mdt_5) {
  631. label = "10"
  632. }
  633. }
  634. RHS {
  635. Post_DEVS/DEVSInstance post_mdt_0 {
  636. label = "0"
  637. }
  638. Post_DEVS/Port post_mdt_1 {
  639. label = "1"
  640. }
  641. Post_DEVS/DEVSInstanceToPort (post_mdt_0, post_mdt_1) {
  642. label = "2"
  643. }
  644. Post_DEVS/DEVSInstance post_mdt_2 {
  645. label = "3"
  646. }
  647. Post_DEVS/Port post_mdt_3 {
  648. label = "4"
  649. }
  650. Post_DEVS/DEVSInstanceToPort (post_mdt_2, post_mdt_3) {
  651. label = "5"
  652. }
  653. Post_PM/ProcessNode post_mdt_4 {
  654. label = "6"
  655. }
  656. Post_Trace (post_mdt_4, post_mdt_0) {
  657. label = "7"
  658. }
  659. Post_PM/ProcessNode post_mdt_5 {
  660. label = "8"
  661. }
  662. Post_Trace (post_mdt_5, post_mdt_1) {
  663. label = "9"
  664. }
  665. Post_PM/DecisionTrue (post_mdt_4, post_mdt_5) {
  666. label = "10"
  667. }
  668. Post_DEVS/Channel (post_mdt_1, post_mdt_3) {
  669. label = "11"
  670. }
  671. }
  672. }
  673. {Contains} ForAll map_control_decision_false {
  674. LHS {
  675. Pre_DEVS/DEVSInstance pre_mdf_0 {
  676. label = "0"
  677. }
  678. Pre_DEVS/Port pre_mdf_1 {
  679. label = "1"
  680. constraint_name = $
  681. Boolean function constraint(model : Element, name : String):
  682. return (cast_string(read_attribute(model, name, "type")) == "control_out2")!
  683. $
  684. }
  685. Pre_DEVS/DEVSInstanceToPort (pre_mdf_0, pre_mdf_1) {
  686. label = "2"
  687. }
  688. Pre_DEVS/DEVSInstance pre_mdf_2 {
  689. label = "3"
  690. }
  691. Pre_DEVS/Port pre_mdf_3 {
  692. label = "4"
  693. constraint_name = $
  694. Boolean function constraint(model : Element, name : String):
  695. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  696. $
  697. }
  698. Pre_DEVS/DEVSInstanceToPort (pre_mdf_2, pre_mdf_3) {
  699. label = "5"
  700. }
  701. Pre_PM/ProcessNode pre_mdf_4 {
  702. label = "6"
  703. }
  704. Pre_Trace (pre_mdf_4, pre_mdf_0) {
  705. label = "7"
  706. }
  707. Pre_PM/ProcessNode pre_mdf_5 {
  708. label = "8"
  709. }
  710. Pre_Trace (pre_mdf_5, pre_mdf_1) {
  711. label = "9"
  712. }
  713. Pre_PM/DecisionFalse (pre_mdf_4, pre_mdf_5) {
  714. label = "10"
  715. }
  716. }
  717. RHS {
  718. Post_DEVS/DEVSInstance post_mdf_0 {
  719. label = "0"
  720. }
  721. Post_DEVS/Port post_mdf_1 {
  722. label = "1"
  723. }
  724. Post_DEVS/DEVSInstanceToPort (post_mdf_0, post_mdf_1) {
  725. label = "2"
  726. }
  727. Post_DEVS/DEVSInstance post_mdf_2 {
  728. label = "3"
  729. }
  730. Post_DEVS/Port post_mdf_3 {
  731. label = "4"
  732. }
  733. Post_DEVS/DEVSInstanceToPort (post_mdf_2, post_mdf_3) {
  734. label = "5"
  735. }
  736. Post_PM/ProcessNode post_mdf_4 {
  737. label = "6"
  738. }
  739. Post_Trace (post_mdf_4, post_mdf_0) {
  740. label = "7"
  741. }
  742. Post_PM/ProcessNode post_mdf_5 {
  743. label = "8"
  744. }
  745. Post_Trace (post_mdf_5, post_mdf_1) {
  746. label = "9"
  747. }
  748. Post_PM/DecisionFalse (post_mdf_4, post_mdf_5) {
  749. label = "10"
  750. }
  751. Post_DEVS/Channel (post_mdf_1, post_mdf_3) {
  752. label = "11"
  753. }
  754. }
  755. }
  756. }
  757. Initial (schedule, initial) {}
  758. OnSuccess (initial, finish) {}
  759. OnFailure (initial, finish) {}
  760. OnSuccess (finish, activity) {}
  761. OnFailure (finish, activity) {}
  762. OnSuccess (activity, parallelsplit) {}
  763. OnFailure (activity, parallelsplit) {}
  764. OnSuccess (parallelsplit, synchronization) {}
  765. OnFailure (parallelsplit, synchronization) {}
  766. OnSuccess (synchronization, xor) {}
  767. OnFailure (synchronization, xor) {}
  768. OnSuccess (xor, merge) {}
  769. OnFailure (xor, merge) {}
  770. OnSuccess (merge, multi) {}
  771. OnFailure (merge, multi) {}
  772. OnSuccess (multi, map_resources_to) {}
  773. OnFailure (multi, map_resources_to) {}
  774. OnSuccess (map_resources_to, map_resources_from) {}
  775. OnFailure (map_resources_to, map_resources_from) {}
  776. OnSuccess (map_resources_from, map_control) {}
  777. OnFailure (map_resources_from, map_control) {}
  778. OnSuccess (map_control, map_control_decision_true) {}
  779. OnFailure (map_control, map_control_decision_true) {}
  780. OnSuccess (map_control_decision_true, map_control_decision_false) {}
  781. OnFailure (map_control_decision_true, map_control_decision_false) {}
  782. OnSuccess (map_control_decision_false, success) {}
  783. OnFailure (map_control_decision_false, success) {}