sccd_asg_mapper.py 33 KB

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