patterns_to_DEVS.mvc 34 KB

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