sccd_asg_mapper.py 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  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. 'event': { 'name': 'Event',
  335. 'type': 'Class',
  336. 'body':
  337. {
  338. 'id': ['concat', 'event_', ['getNodeId']],
  339. 'name': ('namevalue.name','String')
  340. }
  341. },
  342. 'guard': { 'name': 'Guard',
  343. 'type': 'Class',
  344. 'body':
  345. {
  346. 'id': ['concat', 'guard_', ['getNodeId']]
  347. }
  348. },
  349. 'raise': { 'name': 'Raise',
  350. 'type': 'Class',
  351. 'body':
  352. {
  353. 'id': ['concat', 'raise_', ['getNodeId']]
  354. }
  355. },
  356. 'scopeattr': { 'name': 'Scope',
  357. 'type': 'Class',
  358. 'body':
  359. {
  360. 'id': ['concat', 'scopeattr_', ['getNodeId']]
  361. }
  362. },
  363. 'targetattr': { 'name': 'Target',
  364. 'type': 'Class',
  365. 'body':
  366. {
  367. 'id': ['concat', 'targetattr_', ['getNodeId']]
  368. }
  369. },
  370. 'return_stm': { 'name': 'Return',
  371. 'type': 'Class',
  372. 'body':
  373. {
  374. 'id': ['concat', 'return_', ['getNodeId']]
  375. }
  376. },
  377. 'continue_stm': { 'name': 'Continue',
  378. 'type': 'Class',
  379. 'body':
  380. {
  381. 'id': ['concat', 'continue_', ['getNodeId']]
  382. }
  383. },
  384. 'break_stm': { 'name': 'Break',
  385. 'type': 'Class',
  386. 'body':
  387. {
  388. 'id': ['concat', 'break_', ['getNodeId']]
  389. }
  390. },
  391. 'while_stm': { 'name': 'While',
  392. 'type': 'Class',
  393. 'body':
  394. {
  395. 'id': ['concat', 'while_', ['getNodeId']]
  396. }
  397. },
  398. 'ifelse_stm': { 'name': 'IfElse',
  399. 'type': 'Class',
  400. 'body':
  401. {
  402. 'id': ['concat', 'ifelse_', ['getNodeId']]
  403. }
  404. },
  405. 'statementbody': {
  406. 'name': 'ActionBlock',
  407. 'type': 'Class',
  408. 'body':
  409. {
  410. 'id': ['concat', 'statementbody_', ['getNodeId']]
  411. }
  412. },
  413. 'parexpr': { 'name': 'Parenthesis',
  414. 'type': 'Class',
  415. 'body':
  416. {
  417. 'id': ['concat', 'parexpr_', ['getNodeId']]
  418. }
  419. },
  420. 'notexpr': { 'name': 'Not',
  421. 'type': 'Class',
  422. 'body':
  423. {
  424. 'id': ['concat', 'notexpr_', ['getNodeId']]
  425. }
  426. },
  427. 'minusexpr': { 'name': 'Minus',
  428. 'type': 'Class',
  429. 'body':
  430. {
  431. 'id': ['concat', 'minusexpr_', ['getNodeId']]
  432. }
  433. },
  434. 'andexpr': { 'name': 'And',
  435. 'type': 'Class',
  436. 'body':
  437. {
  438. 'id': ['concat', 'andexpr_', ['getNodeId']]
  439. }
  440. },
  441. 'orexpr': { 'name': 'Or',
  442. 'type': 'Class',
  443. 'body':
  444. {
  445. 'id': ['concat', 'orexpr_', ['getNodeId']]
  446. }
  447. },
  448. 'equalsexpr': { 'name': 'Equal',
  449. 'type': 'Class',
  450. 'body':
  451. {
  452. 'id': ['concat', 'equalsexpr_', ['getNodeId']]
  453. }
  454. },
  455. 'nequalsexpr': { 'name': 'NEqual',
  456. 'type': 'Class',
  457. 'body':
  458. {
  459. 'id': ['concat', 'nequalsexpr_', ['getNodeId']]
  460. }
  461. },
  462. 'leqthanexpr': { 'name': 'LEThan',
  463. 'type': 'Class',
  464. 'body':
  465. {
  466. 'id': ['concat', 'leqthanexpr_', ['getNodeId']]
  467. }
  468. },
  469. 'lthanexpr': { 'name': 'LThan',
  470. 'type': 'Class',
  471. 'body':
  472. {
  473. 'id': ['concat', 'lthanexpr_', ['getNodeId']]
  474. }
  475. },
  476. 'geqthanexpr': { 'name': 'GEThan',
  477. 'type': 'Class',
  478. 'body':
  479. {
  480. 'id': ['concat', 'geqthanexpr_', ['getNodeId']]
  481. }
  482. },
  483. 'gthanexpr': { 'name': 'GThan',
  484. 'type': 'Class',
  485. 'body':
  486. {
  487. 'id': ['concat', 'gthanexpr_', ['getNodeId']]
  488. }
  489. },
  490. 'modexpr': { 'name': 'Mod',
  491. 'type': 'Class',
  492. 'body':
  493. {
  494. 'id': ['concat', 'modexpr_', ['getNodeId']]
  495. }
  496. },
  497. 'divexpr': { 'name': 'Div',
  498. 'type': 'Class',
  499. 'body':
  500. {
  501. 'id': ['concat', 'divexpr_', ['getNodeId']]
  502. }
  503. },
  504. 'multexpr': { 'name': 'Mult',
  505. 'type': 'Class',
  506. 'body':
  507. {
  508. 'id': ['concat', 'multexpr_', ['getNodeId']]
  509. }
  510. },
  511. 'sumexpr': { 'name': 'Add',
  512. 'type': 'Class',
  513. 'body':
  514. {
  515. 'id': ['concat', 'sumexpr_', ['getNodeId']]
  516. }
  517. },
  518. 'subtractionexpr': { 'name': 'Subtract',
  519. 'type': 'Class',
  520. 'body':
  521. {
  522. 'id': ['concat', 'subtractionexpr_', ['getNodeId']]
  523. }
  524. },
  525. 'selection': { 'name': 'Selection',
  526. 'type': 'Class',
  527. 'body':
  528. {
  529. 'id': ['concat', 'selection_', ['getNodeId']]
  530. }
  531. },
  532. 'dict': { 'name': 'Dict',
  533. 'type': 'Class',
  534. 'body':
  535. {
  536. 'id': ['concat', 'dict_', ['getNodeId']]
  537. }
  538. },
  539. 'dictitem': { 'name': 'DictArgument',
  540. 'type': 'Class',
  541. 'body':
  542. {
  543. 'id': ['concat', 'dictitem_', ['getNodeId']]
  544. }
  545. },
  546. 'vector': { 'name': 'Array',
  547. 'type': 'Class',
  548. 'body':
  549. {
  550. 'id': ['concat', 'array_', ['getNodeId']]
  551. }
  552. },
  553. 'vectoritem': { 'name': 'RegularArgument',
  554. 'type': 'Class',
  555. 'body':
  556. {
  557. 'id': ['concat', 'vectoritem_', ['getNodeId']]
  558. }
  559. },
  560. 'tuple': { 'name': 'Tuple',
  561. 'type': 'Class',
  562. 'body':
  563. {
  564. 'id': ['concat', 'tuple_', ['getNodeId']]
  565. }
  566. },
  567. 'tuplearg': { 'name': 'RegularArgument',
  568. 'type': 'Class',
  569. 'body':
  570. {
  571. 'id': ['concat', 'tuplearg_', ['getNodeId']]
  572. }
  573. },
  574. 'selfexpression_dotexpression': {
  575. 'name': 'selfexpression_dotexpression',
  576. 'type': 'Association',
  577. 'source': { 'name': 'a', 'type': 'SelfExpression' },
  578. 'target': { 'name': 'b', 'type': 'AbsNavigationExpression' },
  579. 'condition': ['nextTo', '@a', '@b'],
  580. 'body': {
  581. 'name': ['concat','selfexpression_dotexpression_', ['concat','@a.id','@b.id']]
  582. }
  583. },
  584. 'navigationexpression_absnavigationexpression': {
  585. 'name': 'navigationexpression_absnavigationexpression',
  586. 'type': 'Association',
  587. 'source': { 'name': 'a', 'type': 'NavigationExpression' },
  588. 'target': { 'name': 'b', 'type': 'AbsNavigationExpression' },
  589. 'condition': ['first', '@a', '@b'],
  590. 'body': {
  591. 'name': ['concat','navigationexpression_absnavigationexpression_', ['concat','@a.id','@b.id']]
  592. }
  593. },
  594. 'class_attribute': {
  595. 'name': 'class_attribute',
  596. 'type': 'Association',
  597. 'source': { 'name': 'Class', 'type': 'Class' },
  598. 'target': { 'name': 'Attribute', 'type': 'Attribute' },
  599. 'condition': ['direct', '@Class', '@Attribute'],
  600. 'body': {
  601. 'name': ['concat','class_attribute_', ['concat','@Class.name','@Attribute.name']]
  602. }
  603. },
  604. 'class_relationship': {
  605. 'name': 'class_relationship',
  606. 'type': 'Association',
  607. 'source': { 'name': 'Class', 'type': 'Class' },
  608. 'target': { 'name': 'Relationship', 'type': 'Relationship' },
  609. 'condition': ['direct', '@Class', '@Relationship'],
  610. 'body': {
  611. 'name': ['concat','class_relationship_', ['concat','@Class.name','@Relationship.id']]
  612. }
  613. },
  614. 'class_inport': {
  615. 'name': 'class_inport',
  616. 'type': 'Association',
  617. 'source': { 'name': 'Class', 'type': 'Class' },
  618. 'target': { 'name': 'InPort', 'type': 'InPort' },
  619. 'condition': ['direct', '@Class', '@InPort'],
  620. 'body': {
  621. 'name': ['concat','class_inport', ['concat','@Class.name','@InPort.name']]
  622. }
  623. },
  624. 'transition_inport': {
  625. 'name': 'transition_inport',
  626. 'type': 'Association',
  627. 'source': { 'name': 'Transition', 'type': 'Transition' },
  628. 'target': { 'name': 'InPort', 'type': 'InPort' },
  629. 'condition': ['equals', '@InPort.name', '@Transition.portname'],
  630. 'body': {
  631. 'name': ['concat','transition_inport_', ['concat','@InPort.name','@Transition.id']]
  632. }
  633. },
  634. 'transition_event_trigger': {
  635. 'name': 'transition_event_trigger',
  636. 'type': 'Association',
  637. 'source': { 'name': 'Transition', 'type': 'Transition' },
  638. 'target': { 'name': 'Event', 'type': 'Event' },
  639. 'condition': ['direct', '@Transition', '@Event'],
  640. 'body': {
  641. 'name': ['concat','transition_event_trigger_', ['concat','@Transition.id','@Event.id']]
  642. }
  643. },
  644. 'transition_guard': {
  645. 'name': 'transition_guard',
  646. 'type': 'Association',
  647. 'source': { 'name': 'Transition', 'type': 'Transition' },
  648. 'target': { 'name': 'Guard', 'type': 'Guard' },
  649. 'condition': ['direct', '@Transition', '@Guard'],
  650. 'body': {
  651. 'name': ['concat','transition_guard', ['concat','@Transition.id','@Guard.id']]
  652. }
  653. },
  654. 'transition_raise': {
  655. 'name': 'transition_raise',
  656. 'type': 'Association',
  657. 'source': { 'name': 'Transition', 'type': 'Transition' },
  658. 'target': { 'name': 'Raise', 'type': 'Raise' },
  659. 'condition': ['direct', '@Transition', '@Raise'],
  660. 'body': {
  661. 'name': ['concat','transition_raise_', ['concat','@Transition.id','@Raise.id']]
  662. }
  663. },
  664. 'guard_expression': {
  665. 'name': 'guard_expression',
  666. 'type': 'Association',
  667. 'source': { 'name': 'Guard', 'type': 'Guard' },
  668. 'target': { 'name': 'Expression', 'type': 'Expression' },
  669. 'condition': ['direct', '@Guard', '@Expression'],
  670. 'body': {
  671. 'name': ['concat','transition_event_trigger_', ['concat','@Guard.id','@Expression.id']]
  672. }
  673. },
  674. 'raise_methodcall': {
  675. 'name': 'raise_methodcall',
  676. 'type': 'Association',
  677. 'source': { 'name': 'Raise', 'type': 'Raise' },
  678. 'target': { 'name': 'MethodCall', 'type': 'MethodCall' },
  679. 'condition': ['direct', '@Raise', '@MethodCall'],
  680. 'body': {
  681. 'name': ['concat','raise_methodcall_', ['concat','@Raise.id','@MethodCall.id']]
  682. }
  683. },
  684. 'raise_scope': {
  685. 'name': 'raise_scope',
  686. 'type': 'Association',
  687. 'source': { 'name': 'Raise', 'type': 'Raise' },
  688. 'target': { 'name': 'Scope', 'type': 'Scope' },
  689. 'condition': ['direct', '@Raise', '@Scope'],
  690. 'body': {
  691. 'name': ['concat','raise_scope_', ['concat','@Raise.id','@Scope.id']]
  692. }
  693. },
  694. 'raise_target': {
  695. 'name': 'raise_target',
  696. 'type': 'Association',
  697. 'source': { 'name': 'Raise', 'type': 'Raise' },
  698. 'target': { 'name': 'Target', 'type': 'Target' },
  699. 'condition': ['direct', '@Raise', '@Target'],
  700. 'body': {
  701. 'name': ['concat','raise_target_', ['concat','@Raise.id','@Target.id']]
  702. }
  703. },
  704. 'scope_expression': {
  705. 'name': 'scope_expression',
  706. 'type': 'Association',
  707. 'source': { 'name': 'Scope', 'type': 'Scope' },
  708. 'target': { 'name': 'Expression', 'type': 'Expression' },
  709. 'condition': ['direct', '@Scope', '@Expression'],
  710. 'body': {
  711. 'name': ['concat','scope_expression_', ['concat','@Scope.id','@Expression.id']]
  712. }
  713. },
  714. 'target_expression': {
  715. 'name': 'target_expression',
  716. 'type': 'Association',
  717. 'source': { 'name': 'Target', 'type': 'Target' },
  718. 'target': { 'name': 'Expression', 'type': 'Expression' },
  719. 'condition': ['direct', '@Target', '@Expression'],
  720. 'body': {
  721. 'name': ['concat','target_expression_', ['concat','@Target.id','@Expression.id']]
  722. }
  723. },
  724. 'actionblock_statement': {
  725. 'name': 'actionblock_statement',
  726. 'type': 'Association',
  727. 'source': { 'name': 'ActionBlock', 'type': 'ActionBlock' },
  728. 'target': { 'name': 'Statement', 'type': 'Statement' },
  729. 'condition': ['first', '@ActionBlock', '@Statement'],
  730. 'body': {
  731. 'name': ['concat','actionblock_statement_', ['concat','@ActionBlock.id','@Statement.id']]
  732. }
  733. },
  734. 'statement_statement_next': {
  735. 'name': 'statement_statement_next',
  736. 'type': 'Association',
  737. 'source': { 'name': 'a', 'type': 'Statement' },
  738. 'target': { 'name': 'b', 'type': 'Statement' },
  739. 'condition': ['nextTo', '@a', '@b'],
  740. 'body': {
  741. 'name': ['concat','statement_statement_next_', ['concat','@a.id','@b.id']]
  742. }
  743. },
  744. 'class_statemachine': {
  745. 'name': 'class_statemachine',
  746. 'type': 'Association',
  747. 'source': { 'name': 'a', 'type': 'Class' },
  748. 'target': { 'name': 'b', 'type': 'StateMachine' },
  749. 'condition': ['direct', '@a', '@b'],
  750. 'body': {
  751. 'name': ['concat','class_statemachine_', ['concat','@a.name','@b.id']]
  752. }
  753. },
  754. 'statemachine_absstate': {
  755. 'name': 'statemachine_absstate',
  756. 'type': 'Association',
  757. 'source': { 'name': 'a', 'type': 'StateMachine' },
  758. 'target': { 'name': 'b', 'type': 'AbsState' },
  759. 'condition': ['direct', '@a', '@b'],
  760. 'body': {
  761. 'name': ['concat','statemachine_absstate_', ['concat','@a.id','@b.id']]
  762. }
  763. },
  764. 'statemachine_pseudostate': {
  765. 'name': 'statemachine_pseudostate',
  766. 'type': 'Association',
  767. 'source': { 'name': 'a', 'type': 'StateMachine' },
  768. 'target': { 'name': 'b', 'type': 'PseudoState' },
  769. 'condition': ['direct', '@a', '@b'],
  770. 'body': {
  771. 'name': ['concat','statemachine_pseudostate_', ['concat','@a.id','@b.id']]
  772. }
  773. },
  774. 'absstate_absstate_inner': {
  775. 'name': 'absstate_absstate_inner',
  776. 'type': 'Association',
  777. 'source': { 'name': 'a', 'type': 'AbsState' },
  778. 'target': { 'name': 'b', 'type': 'AbsState' },
  779. 'condition': ['direct', '@a', '@b'],
  780. 'body': {
  781. 'name': ['concat','absstate_absstate_inner_', ['concat','@a.id','@b.id']]
  782. }
  783. },
  784. 'statemachine_transition': {
  785. 'name': 'statemachine_transition',
  786. 'type': 'Association',
  787. 'source': { 'name': 'a', 'type': 'StateMachine' },
  788. 'target': { 'name': 'b', 'type': 'Transition' },
  789. 'condition': ['direct', '@a', '@b'],
  790. 'body': {
  791. 'name': ['concat','statemachine_transition', ['concat','@a.id','@b.id']]
  792. }
  793. },
  794. 'absstate_transition': {
  795. 'name': 'absstate_transition',
  796. 'type': 'Association',
  797. 'source': { 'name': 'a', 'type': 'AbsState' },
  798. 'target': { 'name': 'b', 'type': 'Transition' },
  799. 'condition': ['direct', '@a', '@b'],
  800. 'body': {
  801. 'name': ['concat','absstate_transition_', ['concat','@a.id','@b.id']]
  802. }
  803. },
  804. 'absstate_pseudostate': {
  805. 'name': 'absstate_pseudostate',
  806. 'type': 'Association',
  807. 'source': { 'name': 'a', 'type': 'AbsState' },
  808. 'target': { 'name': 'b', 'type': 'PseudoState' },
  809. 'condition': ['direct', '@a', '@b'],
  810. 'body': {
  811. 'name': ['concat','absstate_pseudostate_', ['concat','@a.id','@b.id']]
  812. }
  813. },
  814. 'class_method': {
  815. 'name': 'class_method',
  816. 'type': 'Association',
  817. 'source': { 'name': 'a', 'type': 'Class' },
  818. 'target': { 'name': 'b', 'type': 'AbsMethod' },
  819. 'condition': ['direct', '@a', '@b'],
  820. 'body': {
  821. 'name': ['concat','class_method_', ['concat','@a.name','@b.id']]
  822. }
  823. },
  824. 'absmethod_body': {
  825. 'name': 'absmethod_actionblock_body',
  826. 'type': 'Association',
  827. 'source': { 'name': 'a', 'type': 'AbsMethod' },
  828. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  829. 'condition': ['direct', '@a', '@b'],
  830. 'body': {
  831. 'name': ['concat','absmethod_actionblock_body', ['concat','@a.id','@b.id']]
  832. }
  833. },
  834. 'methodcall_sender': {
  835. 'name': 'methodcall_sender',
  836. 'type': 'Association',
  837. 'source': { 'name': 'a', 'type': 'AbsMethodCall' },
  838. 'target': { 'name': 'b', 'type': 'Expression' },
  839. 'condition': ['direct', '@a', '@b'],
  840. 'body': {
  841. 'name': ['concat','methodcall_sender', ['concat','@a.id','@b.id']]
  842. }
  843. },
  844. 'methodcall_argument': {
  845. 'name': 'methodcall_argument',
  846. 'type': 'Association',
  847. 'source': { 'name': 'a', 'type': 'AbsMethodCall' },
  848. 'target': { 'name': 'b', 'type': 'Argument' },
  849. 'condition': ['first', '@a', '@b'],
  850. 'body': {
  851. 'name': ['concat','methodcall_argument_', ['concat','@a.id','@b.id']]
  852. }
  853. },
  854. 'argument_value': {
  855. 'name': 'argument_value',
  856. 'type': 'Association',
  857. 'source': { 'name': 'a', 'type': 'Argument' },
  858. 'target': { 'name': 'b', 'type': 'Expression' },
  859. 'condition': ['direct', '@a', '@b'],
  860. 'body': {
  861. 'name': ['concat','argument_value_', ['concat','@a.id','@b.id']]
  862. }
  863. },
  864. 'argument_argument_next': {
  865. 'name': 'argument_argument_next',
  866. 'type': 'Association',
  867. 'source': { 'name': 'a', 'type': 'Argument' },
  868. 'target': { 'name': 'b', 'type': 'Argument' },
  869. 'condition': ['nextTo', '@a', '@b'],
  870. 'body': {
  871. 'name': ['concat','argument_argument_next_', ['concat','@a.id','@b.id']]
  872. }
  873. },
  874. 'declaration_navigationexpression_type': {
  875. 'name': 'declaration_navigationexpression_type',
  876. 'type': 'Association',
  877. 'source': { 'name': 'a', 'type': 'Declaration' },
  878. 'target': { 'name': 'b', 'type': 'NavigationExpression' },
  879. 'condition': ['first', '@a', '@b'],
  880. 'body': {
  881. 'name': ['concat','declaration_navigationexpression_type_', ['concat','@a.id','@b.id']]
  882. }
  883. },
  884. 'declaration_expression_init': {
  885. 'name': 'declaration_expression_init',
  886. 'type': 'Association',
  887. 'source': { 'name': 'a', 'type': 'Declaration' },
  888. 'target': { 'name': 'b', 'type': 'Expression' },
  889. 'condition': ['second', '@a', '@b'],
  890. 'body': {
  891. 'name': ['concat','declaration_expression_init_', ['concat','@a.id','@b.id']]
  892. }
  893. },
  894. 'event_parameter': {
  895. 'name': 'event_parameter',
  896. 'type': 'Association',
  897. 'source': { 'name': 'a', 'type': 'Event' },
  898. 'target': { 'name': 'b', 'type': 'Parameter' },
  899. 'condition': ['first', '@a', '@b'],
  900. 'body': {
  901. 'name': ['concat','event_parameter_', ['concat','@a.id','@b.id']]
  902. }
  903. },
  904. 'absmethod_parameter': {
  905. 'name': 'absmethod_parameter',
  906. 'type': 'Association',
  907. 'source': { 'name': 'a', 'type': 'AbsMethod' },
  908. 'target': { 'name': 'b', 'type': 'Parameter' },
  909. 'condition': ['first', '@a', '@b'],
  910. 'body': {
  911. 'name': ['concat','absmethod_parameter_', ['concat','@a.id','@b.id']]
  912. }
  913. },
  914. 'parameter_parameter_next': {
  915. 'name': 'parameter_parameter_next',
  916. 'type': 'Association',
  917. 'source': { 'name': 'a', 'type': 'Parameter' },
  918. 'target': { 'name': 'b', 'type': 'Parameter' },
  919. 'condition': ['nextTo', '@a', '@b'],
  920. 'body': {
  921. 'name': ['concat','parameter_parameter_next_', ['concat','@a.id','@b.id']]
  922. }
  923. },
  924. 'parameter_type_expression': {
  925. 'name': 'parameter_type_expression',
  926. 'type': 'Association',
  927. 'source': { 'name': 'a', 'type': 'Parameter' },
  928. 'target': { 'name': 'b', 'type': 'NavigationExpression' },
  929. 'condition': ['first', '@a', '@b'],
  930. 'body': {
  931. 'name': ['concat','parameter_type_expression_', ['concat','@a.id','@b.id']]
  932. }
  933. },
  934. 'assignment_expression_left': {
  935. 'name': 'assignment_expression_left',
  936. 'type': 'Association',
  937. 'source': { 'name': 'a', 'type': 'Assignment' },
  938. 'target': { 'name': 'b', 'type': 'Expression' },
  939. 'condition': ['first', '@a', '@b'],
  940. 'body': {
  941. 'name': ['concat','assignment_expression_left_', ['concat','@a.id','@b.id']]
  942. }
  943. },
  944. 'assignment_expression_right': {
  945. 'name': 'assignment_expression_right',
  946. 'type': 'Association',
  947. 'source': { 'name': 'a', 'type': 'Assignment' },
  948. 'target': { 'name': 'b', 'type': 'Expression' },
  949. 'condition': ['second', '@a', '@b'],
  950. 'body': {
  951. 'name': ['concat','assignment_expression_right_', ['concat','@a.id','@b.id']]
  952. }
  953. },
  954. 'while_expression_condition': {
  955. 'name': 'while_expression_condition',
  956. 'type': 'Association',
  957. 'source': { 'name': 'a', 'type': 'While' },
  958. 'target': { 'name': 'b', 'type': 'Expression' },
  959. 'condition': ['first', '@a', '@b'],
  960. 'body': {
  961. 'name': ['concat','while_expression_condition_', ['concat','@a.id','@b.id']]
  962. }
  963. },
  964. 'while_body': {
  965. 'name': 'while_actionblock_body',
  966. 'type': 'Association',
  967. 'source': { 'name': 'a', 'type': 'While' },
  968. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  969. 'condition': ['direct', '@a', '@b'],
  970. 'body': {
  971. 'name': ['concat','while_actionblock_body_', ['concat','@a.id','@b.id']]
  972. }
  973. },
  974. 'ifelse_expression_condition': {
  975. 'name': 'ifelse_expression_condition',
  976. 'type': 'Association',
  977. 'source': { 'name': 'a', 'type': 'IfElse' },
  978. 'target': { 'name': 'b', 'type': 'Expression' },
  979. 'condition': ['first', '@a', '@b'],
  980. 'body': {
  981. 'name': ['concat','ifelse_expression_condition_', ['concat','@a.id','@b.id']]
  982. }
  983. },
  984. 'if_body': {
  985. 'name': 'ifelse_actionblock_ifbody',
  986. 'type': 'Association',
  987. 'source': { 'name': 'a', 'type': 'IfElse' },
  988. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  989. 'condition': ['first', '@a', '@b'],
  990. 'body': {
  991. 'name': ['concat','ifelse_actionblock_ifbody_', ['concat','@a.id','@b.id']]
  992. }
  993. },
  994. 'else_body': {
  995. 'name': 'ifelse_actionblock_elsebody',
  996. 'type': 'Association',
  997. 'source': { 'name': 'a', 'type': 'IfElse' },
  998. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  999. 'condition': ['second', '@a', '@b'],
  1000. 'body': {
  1001. 'name': ['concat','ifelse_actionblock_elsebody_', ['concat','@a.id','@b.id']]
  1002. }
  1003. },
  1004. 'transition_actionblock': {
  1005. 'name': 'transition_actionblock',
  1006. 'type': 'Association',
  1007. 'source': { 'name': 'a', 'type': 'Transition' },
  1008. 'target': { 'name': 'b', 'type': 'ActionBlock' },
  1009. 'condition': ['direct', '@a', '@b'],
  1010. 'body': {
  1011. 'name': ['concat','transition_actionblock_', ['concat','@a.id','@b.id']]
  1012. }
  1013. },
  1014. 'absstate_onenter': {
  1015. 'name': 'absstate_onenter',
  1016. 'type': 'Association',
  1017. 'source': { 'name': 'a', 'type': 'AbsState' },
  1018. 'target': { 'name': 'b', 'type': 'OnEnter' },
  1019. 'condition': ['direct', '@a', '@b'],
  1020. 'body': {
  1021. 'name': ['concat','absstate_onenter_', ['concat','@a.id','@b.id']]
  1022. }
  1023. },
  1024. 'absstate_onexit': {
  1025. 'name': 'absstate_onexit',
  1026. 'type': 'Association',
  1027. 'source': { 'name': 'a', 'type': 'AbsState' },
  1028. 'target': { 'name': 'b', 'type': 'OnExit' },
  1029. 'condition': ['direct', '@a', '@b'],
  1030. 'body': {
  1031. 'name': ['concat','absstate_onexit_', ['concat','@a.id','@b.id']]
  1032. }
  1033. },
  1034. 'binop_expression_left': {
  1035. 'name': 'binop_expression_left',
  1036. 'type': 'Association',
  1037. 'source': { 'name': 'a', 'type': 'Binop' },
  1038. 'target': { 'name': 'b', 'type': 'Expression' },
  1039. 'condition': ['first', '@a', '@b'],
  1040. 'body': {
  1041. 'name': ['concat','binop_expression_left_', ['concat','@a.id','@b.id']]
  1042. }
  1043. },
  1044. 'binop_expression_right': {
  1045. 'name': 'binop_expression_right',
  1046. 'type': 'Association',
  1047. 'source': { 'name': 'a', 'type': 'Binop' },
  1048. 'target': { 'name': 'b', 'type': 'Expression' },
  1049. 'condition': ['second', '@a', '@b'],
  1050. 'body': {
  1051. 'name': ['concat','binop_expression_right_', ['concat','@a.id','@b.id']]
  1052. }
  1053. },
  1054. 'composite_compositeargument': {
  1055. 'name': 'composite_compositeargument',
  1056. 'type': 'Association',
  1057. 'source': { 'name': 'a', 'type': 'Composite' },
  1058. 'target': { 'name': 'b', 'type': 'CompositeArgument' },
  1059. 'condition': ['first', '@a', '@b'],
  1060. 'body': {
  1061. 'name': ['concat','composite_compositeargument_', ['concat','@a.id','@b.id']]
  1062. }
  1063. },
  1064. 'regularargument_expression': {
  1065. 'name': 'regularargument_expression',
  1066. 'type': 'Association',
  1067. 'source': { 'name': 'a', 'type': 'RegularArgument' },
  1068. 'target': { 'name': 'b', 'type': 'Expression' },
  1069. 'condition': ['direct', '@a', '@b'],
  1070. 'body': {
  1071. 'name': ['concat','regularargument_expression_', ['concat','@a.id','@b.id']]
  1072. }
  1073. },
  1074. 'dictargument_expression': {
  1075. 'name': 'dictargument_expression',
  1076. 'type': 'Association',
  1077. 'source': { 'name': 'a', 'type': 'DictArgument' },
  1078. 'target': { 'name': 'b', 'type': 'Expression' },
  1079. 'condition': ['second', '@a', '@b'],
  1080. 'body': {
  1081. 'name': ['concat','dictargument_expression_', ['concat','@a.id','@b.id']]
  1082. }
  1083. },
  1084. 'dictargument_labelexpression': {
  1085. 'name': 'dictargument_labelexpression',
  1086. 'type': 'Association',
  1087. 'source': { 'name': 'a', 'type': 'DictArgument' },
  1088. 'target': { 'name': 'b', 'type': 'Expression' },
  1089. 'condition': ['first', '@a', '@b'],
  1090. 'body': {
  1091. 'name': ['concat','dictargument_labelexpression_', ['concat','@a.id','@b.id']]
  1092. }
  1093. },
  1094. 'compositeargument_compositeargument_next': {
  1095. 'name': 'compositeargument_compositeargument_next',
  1096. 'type': 'Association',
  1097. 'source': { 'name': 'a', 'type': 'CompositeArgument' },
  1098. 'target': { 'name': 'b', 'type': 'CompositeArgument' },
  1099. 'condition': ['nextTo', '@a', '@b'],
  1100. 'body': {
  1101. 'name': ['concat','compositeargument_compositeargument_next_', ['concat','@a.id','@b.id']]
  1102. }
  1103. },
  1104. 'unop_expression': {
  1105. 'name': 'unop_expression',
  1106. 'type': 'Association',
  1107. 'source': { 'name': 'a', 'type': 'Unop' },
  1108. 'target': { 'name': 'b', 'type': 'Expression' },
  1109. 'condition': ['first', '@a', '@b'],
  1110. 'body': {
  1111. 'name': ['concat','unop_expression_', ['concat','@a.id','@b.id']]
  1112. }
  1113. },
  1114. 'return_expression': {
  1115. 'name': 'return_expression',
  1116. 'type': 'Association',
  1117. 'source': { 'name': 'a', 'type': 'Return' },
  1118. 'target': { 'name': 'b', 'type': 'Expression' },
  1119. 'condition': ['first', '@a', '@b'],
  1120. 'body': {
  1121. 'name': ['concat','return_expression_', ['concat','@a.id','@b.id']]
  1122. }
  1123. }
  1124. }