PM_to_DEVS.mvc 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. include "primitives.alh"
  2. include "modelling.alh"
  3. include "object_oeprations.alh"
  4. Composite schedule {
  5. {Contains} Success success {}
  6. {Contains} Atomic add_resource_handler {
  7. LHS {}
  8. RHS {
  9. Post_CDEVS/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_CDEVS/InputPort post_resource_2 {
  21. label = "2"
  22. name = "resource_in"
  23. }
  24. Post_CDEVS/DEVSInstanceToPort (post_resource_1, post_resource_2) {
  25. label = "3"
  26. }
  27. Post_CDEVS/OutputPort post_resource_3 {
  28. label = "4"
  29. name = "resource_out"
  30. }
  31. Post_CDEVS/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_CDEVS/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. Trace (post_init_0, post_init_1) {
  58. label = "1"
  59. }
  60. Post_CDEVS/OutputPort post_init_2 {
  61. label = "2"
  62. name = "control_out"
  63. }
  64. Post_CDEVS/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_CDEVS/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. Trace (post_finish_0, post_finish_1) {
  91. label = "2"
  92. }
  93. Post_CDEVS/InputPort post_finish_2 {
  94. label = "3"
  95. name = "control_in"
  96. }
  97. Post_CDEVS/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_CDEVS/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. Trace (post_activity_0, post_activity_1) {
  128. label = "1"
  129. }
  130. Post_CDEVS/InputPort post_activity_2 {
  131. label = "2"
  132. name = "resource_in"
  133. }
  134. Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_2) {
  135. label = "2"
  136. }
  137. Post_CDEVS/OutputPort post_activity_3 {
  138. label = "3"
  139. name = "resource_out"
  140. }
  141. Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_3) {
  142. label = "4"
  143. }
  144. Post_CDEVS/InputPort post_activity_4 {
  145. label = "5"
  146. name = "control_in"
  147. }
  148. Post_CDEVS/DEVSInstanceToPort (post_activity_1, post_activity_4) {
  149. label = "6"
  150. }
  151. Post_CDEVS/OutputPort post_activity_5 {
  152. label = "7"
  153. name = "control_out"
  154. }
  155. Post_CDEVS/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_CDEVS/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. Trace (post_split_0, post_split_1) {
  182. label = "2"
  183. }
  184. Post_CDEVS/InputPort post_split_2 {
  185. label = "3"
  186. name = "control_in"
  187. }
  188. Post_CDEVS/DEVSInstanceToPort (post_split_1, post_split_2) {
  189. label = "4"
  190. }
  191. Post_CDEVS/OutputPort post_split_3 {
  192. label = "5"
  193. name = "control_out"
  194. }
  195. Post_CDEVS/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_CDEVS/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. Trace (post_sync_0, post_sync_1) {
  222. label = "2"
  223. }
  224. Post_CDEVS/InputPort post_sync_2 {
  225. label = "3"
  226. name = "control_in"
  227. }
  228. Post_CDEVS/DEVSInstanceToPort (post_sync_1, post_sync_2) {
  229. label = "4"
  230. }
  231. Post_CDEVS/OutputPort post_sync_3 {
  232. label = "5"
  233. name = "control_out"
  234. }
  235. Post_CDEVS/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_CDEVS/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. Trace (post_xor_0, post_xor_1) {
  262. label = "2"
  263. }
  264. Post_CDEVS/InputPort post_xor_2 {
  265. label = "3"
  266. name = "control_in"
  267. }
  268. Post_CDEVS/DEVSInstanceToPort (post_xor_1, post_xor_2) {
  269. label = "4"
  270. }
  271. Post_CDEVS/OutputPort post_xor_3 {
  272. label = "5"
  273. name = "control_out1"
  274. }
  275. Post_CDEVS/DEVSInstanceToPort (post_xor_1, post_xor_3) {
  276. label = "6"
  277. }
  278. Post_CDEVS/OutputPort post_xor_4 {
  279. label = "7"
  280. name = "control_out2"
  281. }
  282. Post_CDEVS/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_CDEVS/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. Trace (post_merge_0, post_merge_1) {
  309. label = "2"
  310. }
  311. Post_CDEVS/InputPort post_merge_2 {
  312. label = "3"
  313. name = "control_in"
  314. }
  315. Post_CDEVS/DEVSInstanceToPort (post_merge_1, post_merge_2) {
  316. label = "4"
  317. }
  318. Post_CDEVS/OutputPort post_merge_3 {
  319. label = "5"
  320. name = "control_out"
  321. }
  322. Post_CDEVS/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_CDEVS/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. Trace (post_multi_0, post_multi_1) {
  353. label = "2"
  354. }
  355. Post_CDEVS/InputPort post_multi_2 {
  356. label = "3"
  357. name = "resource_in"
  358. }
  359. Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_2) {
  360. label = "4"
  361. }
  362. Post_CDEVS/OutputPort post_multi_3 {
  363. label = "5"
  364. name = "resource_out"
  365. }
  366. Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_3) {
  367. label = "6"
  368. }
  369. Post_CDEVS/InputPort post_multi_4 {
  370. label = "7"
  371. name = "control_in"
  372. }
  373. Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_4) {
  374. label = "8"
  375. }
  376. Post_CDEVS/OutputPort post_multi_5 {
  377. label = "9"
  378. name = "control_out"
  379. }
  380. Post_CDEVS/DEVSInstanceToPort (post_multi_1, post_multi_5) {
  381. label = "10"
  382. }
  383. }
  384. }
  385. {Contains} ForAll map_resources_to {
  386. LHS {
  387. Pre_CDEVS/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_CDEVS/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_CDEVS/DEVSInstanceToPort (pre_mrt_0, pre_mrt_1) {
  402. label = "2"
  403. }
  404. Pre_CDEVS/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_CDEVS/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_CDEVS/DEVSInstanceToPort (pre_mrt_2, pre_mrt_3) {
  419. label = "5"
  420. }
  421. }
  422. RHS {
  423. Post_CDEVS/DEVSInstance post_mrt_0 {
  424. label = "0"
  425. }
  426. Post_CDEVS/Port post_mrt_1 {
  427. label = "1"
  428. }
  429. Post_CDEVS/DEVSInstanceToPort (post_mrt_0, post_mrt_1) {
  430. label = "2"
  431. }
  432. Post_CDEVS/DEVSInstance post_mrt_2 {
  433. label = "3"
  434. }
  435. Post_CDEVS/Port post_mrt_3 {
  436. label = "4"
  437. }
  438. Post_CDEVS/DEVSInstanceToPort (post_mrt_2, post_mrt_3) {
  439. label = "5"
  440. }
  441. Post_CDEVS/Channel (post_mrt_3, post_mrt_1) {
  442. label = "6"
  443. }
  444. }
  445. }
  446. {Contains} ForAll map_resources_from {
  447. LHS {
  448. Pre_CDEVS/DEVSInstance pre_mrt_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_CDEVS/Port pre_mrt_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_CDEVS/DEVSInstanceToPort (pre_mrt_0, pre_mrt_1) {
  463. label = "2"
  464. }
  465. Pre_CDEVS/DEVSInstance pre_mrt_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_CDEVS/Port pre_mrt_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_CDEVS/DEVSInstanceToPort (pre_mrt_2, pre_mrt_3) {
  480. label = "5"
  481. }
  482. }
  483. RHS {
  484. Post_CDEVS/DEVSInstance post_mrt_0 {
  485. label = "0"
  486. }
  487. Post_CDEVS/Port post_mrt_1 {
  488. label = "1"
  489. }
  490. Post_CDEVS/DEVSInstanceToPort (post_mrt_0, post_mrt_1) {
  491. label = "2"
  492. }
  493. Post_CDEVS/DEVSInstance post_mrt_2 {
  494. label = "3"
  495. }
  496. Post_CDEVS/Port post_mrt_3 {
  497. label = "4"
  498. }
  499. Post_CDEVS/DEVSInstanceToPort (post_mrt_2, post_mrt_3) {
  500. label = "5"
  501. }
  502. Post_CDEVS/Channel (post_mrt_1, post_mrt_3) {
  503. label = "6"
  504. }
  505. }
  506. }
  507. {Contains} ForAll map_control {
  508. LHS {
  509. Pre_PM/ProcessNode pre_map_4 {
  510. label = "6"
  511. }
  512. Pre_Trace (pre_map_4, pre_map_0) {
  513. label = "7"
  514. }
  515. Pre_PM/ProcessNode pre_map_5 {
  516. label = "8"
  517. }
  518. Pre_Trace (pre_map_5, pre_map_1) {
  519. label = "9"
  520. }
  521. Pre_PM/Next (pre_map_4, pre_map_5) {
  522. label = "10"
  523. }
  524. Pre_CDEVS/DEVSInstance pre_map_0 {
  525. label = "0"
  526. }
  527. Pre_CDEVS/Port pre_map_1 {
  528. label = "1"
  529. constraint_name = $
  530. Boolean function constraint(model : Element, name : String):
  531. return (cast_string(read_attribute(model, name, "type")) == "control_out")!
  532. $
  533. }
  534. Pre_CDEVS/DEVSInstanceToPort (pre_map_0, pre_map_1) {
  535. label = "2"
  536. }
  537. Pre_CDEVS/DEVSInstance pre_map_2 {
  538. label = "3"
  539. }
  540. Pre_CDEVS/Port pre_map_3 {
  541. label = "4"
  542. constraint_name = $
  543. Boolean function constraint(model : Element, name : String):
  544. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  545. $
  546. }
  547. Pre_CDEVS/DEVSInstanceToPort (pre_map_2, pre_map_3) {
  548. label = "5"
  549. }
  550. }
  551. RHS {
  552. Post_CDEVS/DEVSInstance post_map_0 {
  553. label = "0"
  554. }
  555. Post_CDEVS/Port post_map_1 {
  556. label = "1"
  557. }
  558. Post_CDEVS/DEVSInstanceToPort (post_map_0, post_map_1) {
  559. label = "2"
  560. }
  561. Post_CDEVS/DEVSInstance post_map_2 {
  562. label = "3"
  563. }
  564. Post_CDEVS/Port post_map_3 {
  565. label = "4"
  566. }
  567. Post_CDEVS/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_CDEVS/Channel (post_map_1, post_map_3) {
  586. label = "11"
  587. }
  588. }
  589. }
  590. {Contains} ForAll map_control_decision_true {
  591. LHS {
  592. Pre_PM/ProcessNode pre_map_4 {
  593. label = "6"
  594. }
  595. Pre_Trace (pre_map_4, pre_map_0) {
  596. label = "7"
  597. }
  598. Pre_PM/ProcessNode pre_map_5 {
  599. label = "8"
  600. }
  601. Pre_Trace (pre_map_5, pre_map_1) {
  602. label = "9"
  603. }
  604. Pre_PM/DecisionTrue (pre_map_4, pre_map_5) {
  605. label = "10"
  606. }
  607. Pre_CDEVS/DEVSInstance pre_map_0 {
  608. label = "0"
  609. }
  610. Pre_CDEVS/Port pre_map_1 {
  611. label = "1"
  612. constraint_name = $
  613. Boolean function constraint(model : Element, name : String):
  614. return (cast_string(read_attribute(model, name, "type")) == "control_out1")!
  615. $
  616. }
  617. Pre_CDEVS/DEVSInstanceToPort (pre_map_0, pre_map_1) {
  618. label = "2"
  619. }
  620. Pre_CDEVS/DEVSInstance pre_map_2 {
  621. label = "3"
  622. }
  623. Pre_CDEVS/Port pre_map_3 {
  624. label = "4"
  625. constraint_name = $
  626. Boolean function constraint(model : Element, name : String):
  627. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  628. $
  629. }
  630. Pre_CDEVS/DEVSInstanceToPort (pre_map_2, pre_map_3) {
  631. label = "5"
  632. }
  633. }
  634. RHS {
  635. Post_CDEVS/DEVSInstance post_map_0 {
  636. label = "0"
  637. }
  638. Post_CDEVS/Port post_map_1 {
  639. label = "1"
  640. }
  641. Post_CDEVS/DEVSInstanceToPort (post_map_0, post_map_1) {
  642. label = "2"
  643. }
  644. Post_CDEVS/DEVSInstance post_map_2 {
  645. label = "3"
  646. }
  647. Post_CDEVS/Port post_map_3 {
  648. label = "4"
  649. }
  650. Post_CDEVS/DEVSInstanceToPort (post_map_2, post_map_3) {
  651. label = "5"
  652. }
  653. Post_PM/ProcessNode post_map_4 {
  654. label = "6"
  655. }
  656. Post_Trace (post_map_4, post_map_0) {
  657. label = "7"
  658. }
  659. Post_PM/ProcessNode post_map_5 {
  660. label = "8"
  661. }
  662. Post_Trace (post_map_5, post_map_1) {
  663. label = "9"
  664. }
  665. Post_PM/DecisionTrue (post_map_4, post_map_5) {
  666. label = "10"
  667. }
  668. Post_CDEVS/Channel (post_map_1, post_map_3) {
  669. label = "11"
  670. }
  671. }
  672. }
  673. {Contains} ForAll map_control_decision_false {
  674. LHS {
  675. Pre_PM/ProcessNode pre_map_4 {
  676. label = "6"
  677. }
  678. Pre_Trace (pre_map_4, pre_map_0) {
  679. label = "7"
  680. }
  681. Pre_PM/ProcessNode pre_map_5 {
  682. label = "8"
  683. }
  684. Pre_Trace (pre_map_5, pre_map_1) {
  685. label = "9"
  686. }
  687. Pre_PM/DecisionFalse (pre_map_4, pre_map_5) {
  688. label = "10"
  689. }
  690. Pre_CDEVS/DEVSInstance pre_map_0 {
  691. label = "0"
  692. }
  693. Pre_CDEVS/Port pre_map_1 {
  694. label = "1"
  695. constraint_name = $
  696. Boolean function constraint(model : Element, name : String):
  697. return (cast_string(read_attribute(model, name, "type")) == "control_out2")!
  698. $
  699. }
  700. Pre_CDEVS/DEVSInstanceToPort (pre_map_0, pre_map_1) {
  701. label = "2"
  702. }
  703. Pre_CDEVS/DEVSInstance pre_map_2 {
  704. label = "3"
  705. }
  706. Pre_CDEVS/Port pre_map_3 {
  707. label = "4"
  708. constraint_name = $
  709. Boolean function constraint(model : Element, name : String):
  710. return (cast_string(read_attribute(model, name, "type")) == "control_in")!
  711. $
  712. }
  713. Pre_CDEVS/DEVSInstanceToPort (pre_map_2, pre_map_3) {
  714. label = "5"
  715. }
  716. }
  717. RHS {
  718. Post_CDEVS/DEVSInstance post_map_0 {
  719. label = "0"
  720. }
  721. Post_CDEVS/Port post_map_1 {
  722. label = "1"
  723. }
  724. Post_CDEVS/DEVSInstanceToPort (post_map_0, post_map_1) {
  725. label = "2"
  726. }
  727. Post_CDEVS/DEVSInstance post_map_2 {
  728. label = "3"
  729. }
  730. Post_CDEVS/Port post_map_3 {
  731. label = "4"
  732. }
  733. Post_CDEVS/DEVSInstanceToPort (post_map_2, post_map_3) {
  734. label = "5"
  735. }
  736. Post_PM/ProcessNode post_map_4 {
  737. label = "6"
  738. }
  739. Post_Trace (post_map_4, post_map_0) {
  740. label = "7"
  741. }
  742. Post_PM/ProcessNode post_map_5 {
  743. label = "8"
  744. }
  745. Post_Trace (post_map_5, post_map_1) {
  746. label = "9"
  747. }
  748. Post_PM/DecisionFalse (post_map_4, post_map_5) {
  749. label = "10"
  750. }
  751. Post_CDEVS/Channel (post_map_1, post_map_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) {}