sccd_asg_mapper.py 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. class SCCD_ASG_Mapper(object):
  2. def __init__(self):
  3. self.metamodel_location = 'protected.formalisms.SCCD'
  4. self.metamodel_path = 'sccd_modelverse_sources/sccd_metamodel.mtn'
  5. self.rules = {
  6. 'sccd': {'name': 'SCCD',
  7. 'type': 'Model',
  8. 'body':
  9. {
  10. 'name': ('attrname.string','String'),
  11. 'author': ('attrauthor.string','String'),
  12. 'description': ('attrdescription.string','String')
  13. }
  14. },
  15. 'class': {
  16. 'name': 'Class',
  17. 'type': 'Class',
  18. 'body':
  19. {
  20. 'name': ('nameattr.string','String'),
  21. 'default': ('defaultattr.boolean','Boolean')
  22. }
  23. },
  24. 'inheritance': { 'name': 'Inheritance',
  25. 'type': 'Class',
  26. 'body':
  27. {
  28. 'id': ['concat', 'inheritance_', ['getNodeId']],
  29. 'priority': ('priorityattr.integer','Integer'),
  30. 'class': ('classattr.string','String')
  31. }
  32. },
  33. 'association': { 'name': 'Association',
  34. 'type': 'Class',
  35. 'body':
  36. {
  37. 'id': ['concat', 'association_', ['getNodeId']],
  38. 'name': ('nameattr.string','String'),
  39. 'class': ('classattr.string','String'),
  40. 'min': ('minattr.integer','Integer'),
  41. 'max': ('maxattr.integer','Integer')
  42. }
  43. },
  44. 'composition': { 'name': 'Composition',
  45. 'type': 'Class',
  46. 'body':
  47. {
  48. 'id': ['concat', 'composition_', ['getNodeId']],
  49. 'class': ('classattr.string','String'),
  50. 'min': ('minattr.integer','Integer'),
  51. 'max': ('maxattr.integer','Integer')
  52. }
  53. },
  54. 'aggregation': { 'name': 'Aggregation',
  55. 'type': 'Class',
  56. 'body':
  57. {
  58. 'id': ['concat', 'aggregation_', ['getNodeId']],
  59. 'class': ('classattr.string','String'),
  60. 'min': ('minattr.integer','Integer'),
  61. 'max': ('maxattr.integer','Integer')
  62. }
  63. },
  64. 'attribute': { 'name': 'Attribute',
  65. 'type': 'Class',
  66. 'body':
  67. {
  68. 'name': ('nameattr.string','String'),
  69. 'type': ('typenameattr.string','String'),
  70. 'default': ('defaultvalueattr.string','String')
  71. }
  72. },
  73. 'top': { 'name': 'Top',
  74. 'type': 'Class',
  75. 'body':
  76. {
  77. 'id': ['concat', 'top_', ['getNodeId']]
  78. }
  79. },
  80. 'bottom': { 'name': 'Bottom',
  81. 'type': 'Class',
  82. 'body':
  83. {
  84. 'id': ['concat', 'bottom_', ['getNodeId']]
  85. }
  86. },
  87. 'constructor': { 'name': 'Constructor',
  88. 'type': 'Class',
  89. 'body':
  90. {
  91. 'id': ['concat', 'constructor_', ['getNodeId']]
  92. }
  93. },
  94. 'destructor': { 'name': 'Destructor',
  95. 'type': 'Class',
  96. 'body':
  97. {
  98. 'id': ['concat', 'destructor_', ['getNodeId']]
  99. }
  100. },
  101. 'method': { 'name': 'Method',
  102. 'type': 'Class',
  103. 'body':
  104. {
  105. 'id': ['concat', 'method_', ['getNodeId']],
  106. 'name': ('methodname.name', 'String')
  107. }
  108. },
  109. 'body': {
  110. 'name': 'ActionBlock',
  111. 'type': 'Class',
  112. 'body':
  113. {
  114. 'id': ['concat', 'body_', ['getNodeId']]
  115. }
  116. },
  117. 'onenter': {
  118. 'name': 'OnEnter',
  119. 'type': 'Class',
  120. 'body':
  121. {
  122. 'id': ['concat', 'onenter_', ['getNodeId']]
  123. }
  124. },
  125. 'onexit': {
  126. 'name': 'OnExit',
  127. 'type': 'Class',
  128. 'body':
  129. {
  130. 'id': ['concat', 'onexit_', ['getNodeId']]
  131. }
  132. },
  133. 'import': { 'name': 'Import',
  134. 'type': 'Class',
  135. 'body':
  136. {
  137. 'id': ['concat', 'import_', ['getNodeId']],
  138. 'location': ('importname.dotted_name','String'),
  139. 'from': ('fromname.dotted_name','String'),
  140. 'as': ('asname.name','String')
  141. }
  142. },
  143. 'decl_stm': { 'name': 'Declaration',
  144. 'type': 'Class',
  145. 'body':
  146. {
  147. 'id': ['concat', 'declaration_', ['getNodeId']],
  148. 'name': ('decl_name.name','String')
  149. }
  150. },
  151. 'assignment': { 'name': 'PlainAssignment',
  152. 'type': 'Class',
  153. 'body':
  154. {
  155. 'id': ['concat', 'plainassignment_', ['getNodeId']]
  156. }
  157. },
  158. 'plusassign': { 'name': 'PlusAssignment',
  159. 'type': 'Class',
  160. 'body':
  161. {
  162. 'id': ['concat', 'plusassignment_', ['getNodeId']]
  163. }
  164. },
  165. 'minusassign': { 'name': 'MinusAssignment',
  166. 'type': 'Class',
  167. 'body':
  168. {
  169. 'id': ['concat', 'minusassignment_', ['getNodeId']]
  170. }
  171. },
  172. 'funccall_stm': {
  173. 'name': 'MethodCallStm',
  174. 'type': 'Class',
  175. 'body':
  176. {
  177. 'id': ['concat', 'methodcallstm_', ['getNodeId']],
  178. 'name': ('functionname','String')
  179. }
  180. },
  181. 'nav_expr': {
  182. 'name': 'NavigationExpression',
  183. 'type': 'Class',
  184. 'body':
  185. {
  186. 'id': ['concat', 'nav_', ['getNodeId']]
  187. }
  188. },
  189. 'self': {
  190. 'name': 'SelfExpression',
  191. 'type': 'Class',
  192. 'body':
  193. {
  194. 'id': ['concat', 'selfexpression_', ['getNodeId']]
  195. }
  196. },
  197. 'dotexpression': {
  198. 'name': 'DotExpression',
  199. 'type': 'Class',
  200. 'body':
  201. {
  202. 'id': ['concat', 'dotexpression_', ['getNodeId']],
  203. 'path': ('dotexpression.dotted_name','String')
  204. }
  205. },
  206. 'funccall_expr': {
  207. 'name': 'MethodCall',
  208. 'type': 'Class',
  209. 'body':
  210. {
  211. 'id': ['concat', 'methodcall_', ['getNodeId']],
  212. 'name': ('functionname','String')
  213. }
  214. },
  215. 'stringvalue': {
  216. 'name': 'StringValue',
  217. 'type': 'Class',
  218. 'body':
  219. {
  220. 'id': ['concat', 'string_', ['getNodeId']],
  221. 'value': ('stringvalue.string','String')
  222. }
  223. },
  224. 'integervalue': {
  225. 'name': 'IntegerValue',
  226. 'type': 'Class',
  227. 'body':
  228. {
  229. 'id': ['concat', 'integer_', ['getNodeId']],
  230. 'value': ('integervalue.integer','Integer')
  231. }
  232. },
  233. 'floatvalue': {
  234. 'name': 'FloatValue',
  235. 'type': 'Class',
  236. 'body':
  237. {
  238. 'id': ['concat', 'float_', ['getNodeId']],
  239. 'value': ('floatvalue.float','Float')
  240. }
  241. },
  242. 'booleanvalue': {
  243. 'name': 'BooleanValue',
  244. 'type': 'Class',
  245. 'body':
  246. {
  247. 'id': ['concat', 'boolean_', ['getNodeId']],
  248. 'value': ('booleanvalue.boolean','Boolean')
  249. }
  250. },
  251. 'argument': {
  252. 'name': 'Argument',
  253. 'type': 'Class',
  254. 'body':
  255. {
  256. 'id': ['concat', 'argument_', ['getNodeId']],
  257. 'name': ('argumentname','String')
  258. }
  259. },
  260. 'formalparameter': {
  261. 'name': 'Parameter',
  262. 'type': 'Class',
  263. 'body':
  264. {
  265. 'id': ['concat', 'parameter_', ['getNodeId']],
  266. 'name': ('namevalue.name','String'),
  267. 'default': ('defaultvalue.atomvalue','String')
  268. }
  269. },
  270. 'statemachine': { 'name': 'StateMachine',
  271. 'type': 'Class',
  272. 'body':
  273. {
  274. 'id': ['concat', 'statemachine_', ['getNodeId']]
  275. }
  276. },
  277. 'state': { 'name': 'State',
  278. 'type': 'Class',
  279. 'body':
  280. {
  281. 'id': ['concat', 'state_', ['getNodeId']],
  282. 'name': ('statename.string','String')
  283. }
  284. },
  285. 'orthogonal': { 'name': 'OrthogonalComponent',
  286. 'type': 'Class',
  287. 'body':
  288. {
  289. 'id': ['concat', 'orthogonal_', ['getNodeId']],
  290. 'name': ('statename.string','String')
  291. }
  292. },
  293. 'initial': { 'name': 'InitialState',
  294. 'type': 'Class',
  295. 'body':
  296. {
  297. 'id': ['concat', 'initial_', ['getNodeId']],
  298. 'name': ('statename.string','String')
  299. }
  300. },
  301. 'final': { 'name': 'FinalState',
  302. 'type': 'Class',
  303. 'body':
  304. {
  305. 'id': ['concat', 'final_', ['getNodeId']],
  306. 'name': ('statename.string','String')
  307. }
  308. },
  309. 'history': { 'name': 'HistoryState',
  310. 'type': 'Class',
  311. 'body':
  312. {
  313. 'id': ['concat', 'history_', ['getNodeId']],
  314. 'name': ('statename.string','String')
  315. }
  316. },
  317. 'inport': { 'name': 'InPort',
  318. 'type': 'Class',
  319. 'body':
  320. {
  321. 'name': ('nameattr.string','String')
  322. }
  323. },
  324. 'transition': { 'name': 'Transition',
  325. 'type': 'Class',
  326. 'body':
  327. {
  328. 'id': ['concat', 'transition_', ['getNodeId']],
  329. 'target': ('targetattr.string','String'),
  330. 'after': ('afterattr.float','Float'),
  331. 'portname': ('portattr.string','String')
  332. }
  333. },
  334. 'after_expression': {
  335. 'name': 'after_expression',
  336. 'type': 'Association',
  337. 'source': { 'name': 'Transition', 'type': 'Transition' },
  338. 'target': { 'name': 'Expression', 'type': 'Expression' },
  339. 'condition': ['direct', '@Transition', '@Expression'],
  340. 'body': {
  341. 'name': ['concat','transition_after_expression_', ['concat','@Transition.id','@Expression.id']]
  342. }
  343. },
  344. 'event': { 'name': 'Event',
  345. 'type': 'Class',
  346. 'body':
  347. {
  348. 'id': ['concat', 'event_', ['getNodeId']],
  349. 'name': ('namevalue.name','String')
  350. }
  351. },
  352. 'guard': { 'name': 'Guard',
  353. 'type': 'Class',
  354. 'body':
  355. {
  356. 'id': ['concat', 'guard_', ['getNodeId']]
  357. }
  358. },
  359. 'raise': { 'name': 'Raise',
  360. 'type': 'Class',
  361. 'body':
  362. {
  363. 'id': ['concat', 'raise_', ['getNodeId']]
  364. }
  365. },
  366. 'scopeattr': { 'name': 'Scope',
  367. 'type': 'Class',
  368. 'body':
  369. {
  370. 'id': ['concat', 'scopeattr_', ['getNodeId']]
  371. }
  372. },
  373. 'targetattr': { 'name': 'Target',
  374. 'type': 'Class',
  375. 'body':
  376. {
  377. 'id': ['concat', 'targetattr_', ['getNodeId']]
  378. }
  379. },
  380. 'return_stm': { 'name': 'Return',
  381. 'type': 'Class',
  382. 'body':
  383. {
  384. 'id': ['concat', 'return_', ['getNodeId']]
  385. }
  386. },
  387. 'continue_stm': { 'name': 'Continue',
  388. 'type': 'Class',
  389. 'body':
  390. {
  391. 'id': ['concat', 'continue_', ['getNodeId']]
  392. }
  393. },
  394. 'break_stm': { 'name': 'Break',
  395. 'type': 'Class',
  396. 'body':
  397. {
  398. 'id': ['concat', 'break_', ['getNodeId']]
  399. }
  400. },
  401. 'while_stm': { 'name': 'While',
  402. 'type': 'Class',
  403. 'body':
  404. {
  405. 'id': ['concat', 'while_', ['getNodeId']]
  406. }
  407. },
  408. 'ifelse_stm': { 'name': 'IfElse',
  409. 'type': 'Class',
  410. 'body':
  411. {
  412. 'id': ['concat', 'ifelse_', ['getNodeId']]
  413. }
  414. },
  415. 'statementbody': {
  416. 'name': 'ActionBlock',
  417. 'type': 'Class',
  418. 'body':
  419. {
  420. 'id': ['concat', 'statementbody_', ['getNodeId']]
  421. }
  422. },
  423. 'parexpr': { 'name': 'Parenthesis',
  424. 'type': 'Class',
  425. 'body':
  426. {
  427. 'id': ['concat', 'parexpr_', ['getNodeId']]
  428. }
  429. },
  430. 'notexpr': { 'name': 'Not',
  431. 'type': 'Class',
  432. 'body':
  433. {
  434. 'id': ['concat', 'notexpr_', ['getNodeId']]
  435. }
  436. },
  437. 'minusexpr': { 'name': 'Minus',
  438. 'type': 'Class',
  439. 'body':
  440. {
  441. 'id': ['concat', 'minusexpr_', ['getNodeId']]
  442. }
  443. },
  444. 'andexpr': { 'name': 'And',
  445. 'type': 'Class',
  446. 'body':
  447. {
  448. 'id': ['concat', 'andexpr_', ['getNodeId']]
  449. }
  450. },
  451. 'orexpr': { 'name': 'Or',
  452. 'type': 'Class',
  453. 'body':
  454. {
  455. 'id': ['concat', 'orexpr_', ['getNodeId']]
  456. }
  457. },
  458. 'equalsexpr': { 'name': 'Equal',
  459. 'type': 'Class',
  460. 'body':
  461. {
  462. 'id': ['concat', 'equalsexpr_', ['getNodeId']]
  463. }
  464. },
  465. 'nequalsexpr': { 'name': 'NEqual',
  466. 'type': 'Class',
  467. 'body':
  468. {
  469. 'id': ['concat', 'nequalsexpr_', ['getNodeId']]
  470. }
  471. },
  472. 'leqthanexpr': { 'name': 'LEThan',
  473. 'type': 'Class',
  474. 'body':
  475. {
  476. 'id': ['concat', 'leqthanexpr_', ['getNodeId']]
  477. }
  478. },
  479. 'lthanexpr': { 'name': 'LThan',
  480. 'type': 'Class',
  481. 'body':
  482. {
  483. 'id': ['concat', 'lthanexpr_', ['getNodeId']]
  484. }
  485. },
  486. 'geqthanexpr': { 'name': 'GEThan',
  487. 'type': 'Class',
  488. 'body':
  489. {
  490. 'id': ['concat', 'geqthanexpr_', ['getNodeId']]
  491. }
  492. },
  493. 'gthanexpr': { 'name': 'GThan',
  494. 'type': 'Class',
  495. 'body':
  496. {
  497. 'id': ['concat', 'gthanexpr_', ['getNodeId']]
  498. }
  499. },
  500. 'modexpr': { 'name': 'Mod',
  501. 'type': 'Class',
  502. 'body':
  503. {
  504. 'id': ['concat', 'modexpr_', ['getNodeId']]
  505. }
  506. },
  507. 'divexpr': { 'name': 'Div',
  508. 'type': 'Class',
  509. 'body':
  510. {
  511. 'id': ['concat', 'divexpr_', ['getNodeId']]
  512. }
  513. },
  514. 'multexpr': { 'name': 'Mult',
  515. 'type': 'Class',
  516. 'body':
  517. {
  518. 'id': ['concat', 'multexpr_', ['getNodeId']]
  519. }
  520. },
  521. 'sumexpr': { 'name': 'Add',
  522. 'type': 'Class',
  523. 'body':
  524. {
  525. 'id': ['concat', 'sumexpr_', ['getNodeId']]
  526. }
  527. },
  528. 'subtractionexpr': { 'name': 'Subtract',
  529. 'type': 'Class',
  530. 'body':
  531. {
  532. 'id': ['concat', 'subtractionexpr_', ['getNodeId']]
  533. }
  534. },
  535. 'selection': { 'name': 'Selection',
  536. 'type': 'Class',
  537. 'body':
  538. {
  539. 'id': ['concat', 'selection_', ['getNodeId']]
  540. }
  541. },
  542. 'dict': { 'name': 'Dict',
  543. 'type': 'Class',
  544. 'body':
  545. {
  546. 'id': ['concat', 'dict_', ['getNodeId']]
  547. }
  548. },
  549. 'dictitem': { 'name': 'DictArgument',
  550. 'type': 'Class',
  551. 'body':
  552. {
  553. 'id': ['concat', 'dictitem_', ['getNodeId']]
  554. }
  555. },
  556. 'vector': { 'name': 'Array',
  557. 'type': 'Class',
  558. 'body':
  559. {
  560. 'id': ['concat', 'array_', ['getNodeId']]
  561. }
  562. },
  563. 'vectoritem': { 'name': 'RegularArgument',
  564. 'type': 'Class',
  565. 'body':
  566. {
  567. 'id': ['concat', 'vectoritem_', ['getNodeId']]
  568. }
  569. },
  570. 'tuple': { 'name': 'Tuple',
  571. 'type': 'Class',
  572. 'body':
  573. {
  574. 'id': ['concat', 'tuple_', ['getNodeId']]
  575. }
  576. },
  577. 'tuplearg': { 'name': 'RegularArgument',
  578. 'type': 'Class',
  579. 'body':
  580. {
  581. 'id': ['concat', 'tuplearg_', ['getNodeId']]
  582. }
  583. },
  584. 'selfexpression_dotexpression': {
  585. 'name': 'selfexpression_dotexpression',
  586. 'type': 'Association',
  587. 'source': { 'name': 'a', 'type': 'SelfExpression' },
  588. 'target': { 'name': 'b', 'type': 'AbsNavigationExpression' },
  589. 'condition': ['nextTo', '@a', '@b'],
  590. 'body': {
  591. 'name': ['concat','selfexpression_dotexpression_', ['concat','@a.id','@b.id']]
  592. }
  593. },
  594. 'navigationexpression_absnavigationexpression': {
  595. 'name': 'navigationexpression_absnavigationexpression',
  596. 'type': 'Association',
  597. 'source': { 'name': 'a', 'type': 'NavigationExpression' },
  598. 'target': { 'name': 'b', 'type': 'AbsNavigationExpression' },
  599. 'condition': ['first', '@a', '@b'],
  600. 'body': {
  601. 'name': ['concat','navigationexpression_absnavigationexpression_', ['concat','@a.id','@b.id']]
  602. }
  603. },
  604. 'class_attribute': {
  605. 'name': 'class_attribute',
  606. 'type': 'Association',
  607. 'source': { 'name': 'Class', 'type': 'Class' },
  608. 'target': { 'name': 'Attribute', 'type': 'Attribute' },
  609. 'condition': ['direct', '@Class', '@Attribute'],
  610. 'body': {
  611. 'name': ['concat','class_attribute_', ['concat','@Class.name','@Attribute.name']]
  612. }
  613. },
  614. 'class_relationship': {
  615. 'name': 'class_relationship',
  616. 'type': 'Association',
  617. 'source': { 'name': 'Class', 'type': 'Class' },
  618. 'target': { 'name': 'Relationship', 'type': 'Relationship' },
  619. 'condition': ['direct', '@Class', '@Relationship'],
  620. 'body': {
  621. 'name': ['concat','class_relationship_', ['concat','@Class.name','@Relationship.id']]
  622. }
  623. },
  624. 'class_inport': {
  625. 'name': 'class_inport',
  626. 'type': 'Association',
  627. 'source': { 'name': 'Class', 'type': 'Class' },
  628. 'target': { 'name': 'InPort', 'type': 'InPort' },
  629. 'condition': ['direct', '@Class', '@InPort'],
  630. 'body': {
  631. 'name': ['concat','class_inport', ['concat','@Class.name','@InPort.name']]
  632. }
  633. },
  634. 'transition_inport': {
  635. 'name': 'transition_inport',
  636. 'type': 'Association',
  637. 'source': { 'name': 'Transition', 'type': 'Transition' },
  638. 'target': { 'name': 'InPort', 'type': 'InPort' },
  639. 'condition': ['equals', '@InPort.name', '@Transition.portname'],
  640. 'body': {
  641. 'name': ['concat','transition_inport_', ['concat','@InPort.name','@Transition.id']]
  642. }
  643. },
  644. 'transition_event_trigger': {
  645. 'name': 'transition_event_trigger',
  646. 'type': 'Association',
  647. 'source': { 'name': 'Transition', 'type': 'Transition' },
  648. 'target': { 'name': 'Event', 'type': 'Event' },
  649. 'condition': ['direct', '@Transition', '@Event'],
  650. 'body': {
  651. 'name': ['concat','transition_event_trigger_', ['concat','@Transition.id','@Event.id']]
  652. }
  653. },
  654. 'transition_guard': {
  655. 'name': 'transition_guard',
  656. 'type': 'Association',
  657. 'source': { 'name': 'Transition', 'type': 'Transition' },
  658. 'target': { 'name': 'Guard', 'type': 'Guard' },
  659. 'condition': ['direct', '@Transition', '@Guard'],
  660. 'body': {
  661. 'name': ['concat','transition_guard', ['concat','@Transition.id','@Guard.id']]
  662. }
  663. },
  664. 'transition_raise': {
  665. 'name': 'transition_raise',
  666. 'type': 'Association',
  667. 'source': { 'name': 'Transition', 'type': 'Transition' },
  668. 'target': { 'name': 'Raise', 'type': 'Raise' },
  669. 'condition': ['direct', '@Transition', '@Raise'],
  670. 'body': {
  671. 'name': ['concat','transition_raise_', ['concat','@Transition.id','@Raise.id']]
  672. }
  673. },
  674. 'guard_expression': {
  675. 'name': 'guard_expression',
  676. 'type': 'Association',
  677. 'source': { 'name': 'Guard', 'type': 'Guard' },
  678. 'target': { 'name': 'Expression', 'type': 'Expression' },
  679. 'condition': ['direct', '@Guard', '@Expression'],
  680. 'body': {
  681. 'name': ['concat','transition_event_trigger_', ['concat','@Guard.id','@Expression.id']]
  682. }
  683. },
  684. 'raise_methodcall': {
  685. 'name': 'raise_methodcall',
  686. 'type': 'Association',
  687. 'source': { 'name': 'Raise', 'type': 'Raise' },
  688. 'target': { 'name': 'MethodCall', 'type': 'MethodCall' },
  689. 'condition': ['direct', '@Raise', '@MethodCall'],
  690. 'body': {
  691. 'name': ['concat','raise_methodcall_', ['concat','@Raise.id','@MethodCall.id']]
  692. }
  693. },
  694. 'raise_scope': {
  695. 'name': 'raise_scope',
  696. 'type': 'Association',
  697. 'source': { 'name': 'Raise', 'type': 'Raise' },
  698. 'target': { 'name': 'Scope', 'type': 'Scope' },
  699. 'condition': ['direct', '@Raise', '@Scope'],
  700. 'body': {
  701. 'name': ['concat','raise_scope_', ['concat','@Raise.id','@Scope.id']]
  702. }
  703. },
  704. 'raise_target': {
  705. 'name': 'raise_target',
  706. 'type': 'Association',
  707. 'source': { 'name': 'Raise', 'type': 'Raise' },
  708. 'target': { 'name': 'Target', 'type': 'Target' },
  709. 'condition': ['direct', '@Raise', '@Target'],
  710. 'body': {
  711. 'name': ['concat','raise_target_', ['concat','@Raise.id','@Target.id']]
  712. }
  713. },
  714. 'scope_expression': {
  715. 'name': 'scope_expression',
  716. 'type': 'Association',
  717. 'source': { 'name': 'Scope', 'type': 'Scope' },
  718. 'target': { 'name': 'Expression', 'type': 'Expression' },
  719. 'condition': ['direct', '@Scope', '@Expression'],
  720. 'body': {
  721. 'name': ['concat','scope_expression_', ['concat','@Scope.id','@Expression.id']]
  722. }
  723. },
  724. 'target_expression': {
  725. 'name': 'target_expression',
  726. 'type': 'Association',
  727. 'source': { 'name': 'Target', 'type': 'Target' },
  728. 'target': { 'name': 'Expression', 'type': 'Expression' },
  729. 'condition': ['direct', '@Target', '@Expression'],
  730. 'body': {
  731. 'name': ['concat','target_expression_', ['concat','@Target.id','@Expression.id']]
  732. }
  733. },
  734. 'actionblock_statement': {
  735. 'name': 'actionblock_statement',
  736. 'type': 'Association',
  737. 'source': { 'name': 'ActionBlock', 'type': 'ActionBlock' },
  738. 'target': { 'name': 'Statement', 'type': 'Statement' },
  739. 'condition': ['first', '@ActionBlock', '@Statement'],
  740. 'body': {
  741. 'name': ['concat','actionblock_statement_', ['concat','@ActionBlock.id','@Statement.id']]
  742. }
  743. },
  744. 'statement_statement_next': {
  745. 'name': 'statement_statement_next',
  746. 'type': 'Association',
  747. 'source': { 'name': 'a', 'type': 'Statement' },
  748. 'target': { 'name': 'b', 'type': 'Statement' },
  749. 'condition': ['nextTo', '@a', '@b'],
  750. 'body': {
  751. 'name': ['concat','statement_statement_next_', ['concat','@a.id','@b.id']]
  752. }
  753. },
  754. 'class_statemachine': {
  755. 'name': 'class_statemachine',
  756. 'type': 'Association',
  757. 'source': { 'name': 'a', 'type': 'Class' },
  758. 'target': { 'name': 'b', 'type': 'StateMachine' },
  759. 'condition': ['direct', '@a', '@b'],
  760. 'body': {
  761. 'name': ['concat','class_statemachine_', ['concat','@a.name','@b.id']]
  762. }
  763. },
  764. 'statemachine_absstate': {
  765. 'name': 'statemachine_absstate',
  766. 'type': 'Association',
  767. 'source': { 'name': 'a', 'type': 'StateMachine' },
  768. 'target': { 'name': 'b', 'type': 'AbsState' },
  769. 'condition': ['direct', '@a', '@b'],
  770. 'body': {
  771. 'name': ['concat','statemachine_absstate_', ['concat','@a.id','@b.id']]
  772. }
  773. },
  774. 'statemachine_pseudostate': {
  775. 'name': 'statemachine_pseudostate',
  776. 'type': 'Association',
  777. 'source': { 'name': 'a', 'type': 'StateMachine' },
  778. 'target': { 'name': 'b', 'type': 'PseudoState' },
  779. 'condition': ['direct', '@a', '@b'],
  780. 'body': {
  781. 'name': ['concat','statemachine_pseudostate_', ['concat','@a.id','@b.id']]
  782. }
  783. },
  784. 'absstate_absstate_inner': {
  785. 'name': 'absstate_absstate_inner',
  786. 'type': 'Association',
  787. 'source': { 'name': 'a', 'type': 'AbsState' },
  788. 'target': { 'name': 'b', 'type': 'AbsState' },
  789. 'condition': ['direct', '@a', '@b'],
  790. 'body': {
  791. 'name': ['concat','absstate_absstate_inner_', ['concat','@a.id','@b.id']]
  792. }
  793. },
  794. 'statemachine_transition': {
  795. 'name': 'statemachine_transition',
  796. 'type': 'Association',
  797. 'source': { 'name': 'a', 'type': 'StateMachine' },
  798. 'target': { 'name': 'b', 'type': 'Transition' },
  799. 'condition': ['direct', '@a', '@b'],
  800. 'body': {
  801. 'name': ['concat','statemachine_transition', ['concat','@a.id','@b.id']]
  802. }
  803. },
  804. 'absstate_transition': {
  805. 'name': 'absstate_transition',
  806. 'type': 'Association',
  807. 'source': { 'name': 'a', 'type': 'AbsState' },
  808. 'target': { 'name': 'b', 'type': 'Transition' },
  809. 'condition': ['direct', '@a', '@b'],
  810. 'body': {
  811. 'name': ['concat','absstate_transition_', ['concat','@a.id','@b.id']]
  812. }
  813. },
  814. 'absstate_pseudostate': {
  815. 'name': 'absstate_pseudostate',
  816. 'type': 'Association',
  817. 'source': { 'name': 'a', 'type': 'AbsState' },
  818. 'target': { 'name': 'b', 'type': 'PseudoState' },
  819. 'condition': ['direct', '@a', '@b'],
  820. 'body': {
  821. 'name': ['concat','absstate_pseudostate_', ['concat','@a.id','@b.id']]
  822. }
  823. },
  824. 'class_method': {
  825. 'name': 'class_method',
  826. 'type': 'Association',
  827. 'source': { 'name': 'a', 'type': 'Class' },
  828. 'target': { 'name': 'b', 'type': 'AbsMethod' },
  829. 'condition': ['direct', '@a', '@b'],
  830. 'body': {
  831. 'name': ['concat','class_method_', ['concat','@a.name','@b.id']]
  832. }
  833. },
  834. 'absmethod_body': {
  835. 'name': 'absmethod_actionblock_body',
  836. 'type': 'Association',
  837. 'source': { 'name': 'a', 'type': 'AbsMethod' },
  838. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  839. 'condition': ['direct', '@a', '@b'],
  840. 'body': {
  841. 'name': ['concat','absmethod_actionblock_body', ['concat','@a.id','@b.id']]
  842. }
  843. },
  844. 'methodcall_sender': {
  845. 'name': 'methodcall_sender',
  846. 'type': 'Association',
  847. 'source': { 'name': 'a', 'type': 'AbsMethodCall' },
  848. 'target': { 'name': 'b', 'type': 'Expression' },
  849. 'condition': ['direct', '@a', '@b'],
  850. 'body': {
  851. 'name': ['concat','methodcall_sender', ['concat','@a.id','@b.id']]
  852. }
  853. },
  854. 'methodcall_argument': {
  855. 'name': 'methodcall_argument',
  856. 'type': 'Association',
  857. 'source': { 'name': 'a', 'type': 'AbsMethodCall' },
  858. 'target': { 'name': 'b', 'type': 'Argument' },
  859. 'condition': ['first', '@a', '@b'],
  860. 'body': {
  861. 'name': ['concat','methodcall_argument_', ['concat','@a.id','@b.id']]
  862. }
  863. },
  864. 'argument_value': {
  865. 'name': 'argument_value',
  866. 'type': 'Association',
  867. 'source': { 'name': 'a', 'type': 'Argument' },
  868. 'target': { 'name': 'b', 'type': 'Expression' },
  869. 'condition': ['direct', '@a', '@b'],
  870. 'body': {
  871. 'name': ['concat','argument_value_', ['concat','@a.id','@b.id']]
  872. }
  873. },
  874. 'argument_argument_next': {
  875. 'name': 'argument_argument_next',
  876. 'type': 'Association',
  877. 'source': { 'name': 'a', 'type': 'Argument' },
  878. 'target': { 'name': 'b', 'type': 'Argument' },
  879. 'condition': ['nextTo', '@a', '@b'],
  880. 'body': {
  881. 'name': ['concat','argument_argument_next_', ['concat','@a.id','@b.id']]
  882. }
  883. },
  884. 'declaration_navigationexpression_type': {
  885. 'name': 'declaration_navigationexpression_type',
  886. 'type': 'Association',
  887. 'source': { 'name': 'a', 'type': 'Declaration' },
  888. 'target': { 'name': 'b', 'type': 'NavigationExpression' },
  889. 'condition': ['first', '@a', '@b'],
  890. 'body': {
  891. 'name': ['concat','declaration_navigationexpression_type_', ['concat','@a.id','@b.id']]
  892. }
  893. },
  894. 'declaration_expression_init': {
  895. 'name': 'declaration_expression_init',
  896. 'type': 'Association',
  897. 'source': { 'name': 'a', 'type': 'Declaration' },
  898. 'target': { 'name': 'b', 'type': 'Expression' },
  899. 'condition': ['second', '@a', '@b'],
  900. 'body': {
  901. 'name': ['concat','declaration_expression_init_', ['concat','@a.id','@b.id']]
  902. }
  903. },
  904. 'event_parameter': {
  905. 'name': 'event_parameter',
  906. 'type': 'Association',
  907. 'source': { 'name': 'a', 'type': 'Event' },
  908. 'target': { 'name': 'b', 'type': 'Parameter' },
  909. 'condition': ['first', '@a', '@b'],
  910. 'body': {
  911. 'name': ['concat','event_parameter_', ['concat','@a.id','@b.id']]
  912. }
  913. },
  914. 'absmethod_parameter': {
  915. 'name': 'absmethod_parameter',
  916. 'type': 'Association',
  917. 'source': { 'name': 'a', 'type': 'AbsMethod' },
  918. 'target': { 'name': 'b', 'type': 'Parameter' },
  919. 'condition': ['first', '@a', '@b'],
  920. 'body': {
  921. 'name': ['concat','absmethod_parameter_', ['concat','@a.id','@b.id']]
  922. }
  923. },
  924. 'parameter_parameter_next': {
  925. 'name': 'parameter_parameter_next',
  926. 'type': 'Association',
  927. 'source': { 'name': 'a', 'type': 'Parameter' },
  928. 'target': { 'name': 'b', 'type': 'Parameter' },
  929. 'condition': ['nextTo', '@a', '@b'],
  930. 'body': {
  931. 'name': ['concat','parameter_parameter_next_', ['concat','@a.id','@b.id']]
  932. }
  933. },
  934. 'parameter_type_expression': {
  935. 'name': 'parameter_type_expression',
  936. 'type': 'Association',
  937. 'source': { 'name': 'a', 'type': 'Parameter' },
  938. 'target': { 'name': 'b', 'type': 'NavigationExpression' },
  939. 'condition': ['first', '@a', '@b'],
  940. 'body': {
  941. 'name': ['concat','parameter_type_expression_', ['concat','@a.id','@b.id']]
  942. }
  943. },
  944. 'assignment_expression_left': {
  945. 'name': 'assignment_expression_left',
  946. 'type': 'Association',
  947. 'source': { 'name': 'a', 'type': 'Assignment' },
  948. 'target': { 'name': 'b', 'type': 'Expression' },
  949. 'condition': ['first', '@a', '@b'],
  950. 'body': {
  951. 'name': ['concat','assignment_expression_left_', ['concat','@a.id','@b.id']]
  952. }
  953. },
  954. 'assignment_expression_right': {
  955. 'name': 'assignment_expression_right',
  956. 'type': 'Association',
  957. 'source': { 'name': 'a', 'type': 'Assignment' },
  958. 'target': { 'name': 'b', 'type': 'Expression' },
  959. 'condition': ['second', '@a', '@b'],
  960. 'body': {
  961. 'name': ['concat','assignment_expression_right_', ['concat','@a.id','@b.id']]
  962. }
  963. },
  964. 'while_expression_condition': {
  965. 'name': 'while_expression_condition',
  966. 'type': 'Association',
  967. 'source': { 'name': 'a', 'type': 'While' },
  968. 'target': { 'name': 'b', 'type': 'Expression' },
  969. 'condition': ['first', '@a', '@b'],
  970. 'body': {
  971. 'name': ['concat','while_expression_condition_', ['concat','@a.id','@b.id']]
  972. }
  973. },
  974. 'while_body': {
  975. 'name': 'while_actionblock_body',
  976. 'type': 'Association',
  977. 'source': { 'name': 'a', 'type': 'While' },
  978. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  979. 'condition': ['direct', '@a', '@b'],
  980. 'body': {
  981. 'name': ['concat','while_actionblock_body_', ['concat','@a.id','@b.id']]
  982. }
  983. },
  984. 'ifelse_expression_condition': {
  985. 'name': 'ifelse_expression_condition',
  986. 'type': 'Association',
  987. 'source': { 'name': 'a', 'type': 'IfElse' },
  988. 'target': { 'name': 'b', 'type': 'Expression' },
  989. 'condition': ['first', '@a', '@b'],
  990. 'body': {
  991. 'name': ['concat','ifelse_expression_condition_', ['concat','@a.id','@b.id']]
  992. }
  993. },
  994. 'if_body': {
  995. 'name': 'ifelse_actionblock_ifbody',
  996. 'type': 'Association',
  997. 'source': { 'name': 'a', 'type': 'IfElse' },
  998. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  999. 'condition': ['first', '@a', '@b'],
  1000. 'body': {
  1001. 'name': ['concat','ifelse_actionblock_ifbody_', ['concat','@a.id','@b.id']]
  1002. }
  1003. },
  1004. 'else_body': {
  1005. 'name': 'ifelse_actionblock_elsebody',
  1006. 'type': 'Association',
  1007. 'source': { 'name': 'a', 'type': 'IfElse' },
  1008. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  1009. 'condition': ['second', '@a', '@b'],
  1010. 'body': {
  1011. 'name': ['concat','ifelse_actionblock_elsebody_', ['concat','@a.id','@b.id']]
  1012. }
  1013. },
  1014. 'transition_actionblock': {
  1015. 'name': 'transition_actionblock',
  1016. 'type': 'Association',
  1017. 'source': { 'name': 'a', 'type': 'Transition' },
  1018. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  1019. 'condition': ['direct', '@a', '@b'],
  1020. 'body': {
  1021. 'name': ['concat','transition_actionblock_', ['concat','@a.id','@b.id']]
  1022. }
  1023. },
  1024. 'absstate_onenter': {
  1025. 'name': 'absstate_onenter',
  1026. 'type': 'Association',
  1027. 'source': { 'name': 'a', 'type': 'AbsState' },
  1028. 'target': { 'name': 'b', 'type': 'OnEnter' },
  1029. 'condition': ['direct', '@a', '@b'],
  1030. 'body': {
  1031. 'name': ['concat','absstate_onenter_', ['concat','@a.id','@b.id']]
  1032. }
  1033. },
  1034. 'absstate_onexit': {
  1035. 'name': 'absstate_onexit',
  1036. 'type': 'Association',
  1037. 'source': { 'name': 'a', 'type': 'AbsState' },
  1038. 'target': { 'name': 'b', 'type': 'OnExit' },
  1039. 'condition': ['direct', '@a', '@b'],
  1040. 'body': {
  1041. 'name': ['concat','absstate_onexit_', ['concat','@a.id','@b.id']]
  1042. }
  1043. },
  1044. 'binop_expression_left': {
  1045. 'name': 'binop_expression_left',
  1046. 'type': 'Association',
  1047. 'source': { 'name': 'a', 'type': 'Binop' },
  1048. 'target': { 'name': 'b', 'type': 'Expression' },
  1049. 'condition': ['first', '@a', '@b'],
  1050. 'body': {
  1051. 'name': ['concat','binop_expression_left_', ['concat','@a.id','@b.id']]
  1052. }
  1053. },
  1054. 'binop_expression_right': {
  1055. 'name': 'binop_expression_right',
  1056. 'type': 'Association',
  1057. 'source': { 'name': 'a', 'type': 'Binop' },
  1058. 'target': { 'name': 'b', 'type': 'Expression' },
  1059. 'condition': ['second', '@a', '@b'],
  1060. 'body': {
  1061. 'name': ['concat','binop_expression_right_', ['concat','@a.id','@b.id']]
  1062. }
  1063. },
  1064. 'composite_compositeargument': {
  1065. 'name': 'composite_compositeargument',
  1066. 'type': 'Association',
  1067. 'source': { 'name': 'a', 'type': 'Composite' },
  1068. 'target': { 'name': 'b', 'type': 'CompositeArgument' },
  1069. 'condition': ['first', '@a', '@b'],
  1070. 'body': {
  1071. 'name': ['concat','composite_compositeargument_', ['concat','@a.id','@b.id']]
  1072. }
  1073. },
  1074. 'regularargument_expression': {
  1075. 'name': 'regularargument_expression',
  1076. 'type': 'Association',
  1077. 'source': { 'name': 'a', 'type': 'RegularArgument' },
  1078. 'target': { 'name': 'b', 'type': 'Expression' },
  1079. 'condition': ['direct', '@a', '@b'],
  1080. 'body': {
  1081. 'name': ['concat','regularargument_expression_', ['concat','@a.id','@b.id']]
  1082. }
  1083. },
  1084. 'dictargument_expression': {
  1085. 'name': 'dictargument_expression',
  1086. 'type': 'Association',
  1087. 'source': { 'name': 'a', 'type': 'DictArgument' },
  1088. 'target': { 'name': 'b', 'type': 'Expression' },
  1089. 'condition': ['second', '@a', '@b'],
  1090. 'body': {
  1091. 'name': ['concat','dictargument_expression_', ['concat','@a.id','@b.id']]
  1092. }
  1093. },
  1094. 'dictargument_labelexpression': {
  1095. 'name': 'dictargument_labelexpression',
  1096. 'type': 'Association',
  1097. 'source': { 'name': 'a', 'type': 'DictArgument' },
  1098. 'target': { 'name': 'b', 'type': 'Expression' },
  1099. 'condition': ['first', '@a', '@b'],
  1100. 'body': {
  1101. 'name': ['concat','dictargument_labelexpression_', ['concat','@a.id','@b.id']]
  1102. }
  1103. },
  1104. 'compositeargument_compositeargument_next': {
  1105. 'name': 'compositeargument_compositeargument_next',
  1106. 'type': 'Association',
  1107. 'source': { 'name': 'a', 'type': 'CompositeArgument' },
  1108. 'target': { 'name': 'b', 'type': 'CompositeArgument' },
  1109. 'condition': ['nextTo', '@a', '@b'],
  1110. 'body': {
  1111. 'name': ['concat','compositeargument_compositeargument_next_', ['concat','@a.id','@b.id']]
  1112. }
  1113. },
  1114. 'unop_expression': {
  1115. 'name': 'unop_expression',
  1116. 'type': 'Association',
  1117. 'source': { 'name': 'a', 'type': 'Unop' },
  1118. 'target': { 'name': 'b', 'type': 'Expression' },
  1119. 'condition': ['first', '@a', '@b'],
  1120. 'body': {
  1121. 'name': ['concat','unop_expression_', ['concat','@a.id','@b.id']]
  1122. }
  1123. },
  1124. 'return_expression': {
  1125. 'name': 'return_expression',
  1126. 'type': 'Association',
  1127. 'source': { 'name': 'a', 'type': 'Return' },
  1128. 'target': { 'name': 'b', 'type': 'Expression' },
  1129. 'condition': ['first', '@a', '@b'],
  1130. 'body': {
  1131. 'name': ['concat','return_expression_', ['concat','@a.id','@b.id']]
  1132. }
  1133. }
  1134. }