SCCD.metamodel 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. {
  2. "types": {
  3. "OrthogonalComponent": [
  4. {
  5. "name": "name",
  6. "type": "string",
  7. "default": "OC_"
  8. }
  9. ],
  10. "State": [
  11. {
  12. "name": "name",
  13. "type": "string",
  14. "default": "S_"
  15. },
  16. {
  17. "name": "entryAction",
  18. "type": "code",
  19. "default": ""
  20. },
  21. {
  22. "name": "exitAction",
  23. "type": "code",
  24. "default": ""
  25. },
  26. {
  27. "name": "isStart",
  28. "type": "boolean",
  29. "default": false
  30. },
  31. {
  32. "name": "isCurrent",
  33. "type": "boolean",
  34. "default": false
  35. },
  36. {
  37. "name": "option",
  38. "type": "ENUM(ITF, OTF, RTO)",
  39. "default": "ITF"
  40. },
  41. {
  42. "name": "raiseEntry",
  43. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  44. "default": []
  45. },
  46. {
  47. "name": "raiseExit",
  48. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  49. "default": []
  50. }
  51. ],
  52. "CompositeState": [
  53. {
  54. "name": "name",
  55. "type": "string",
  56. "default": "S_"
  57. },
  58. {
  59. "name": "entryAction",
  60. "type": "code",
  61. "default": ""
  62. },
  63. {
  64. "name": "exitAction",
  65. "type": "code",
  66. "default": ""
  67. },
  68. {
  69. "name": "isStart",
  70. "type": "boolean",
  71. "default": false
  72. },
  73. {
  74. "name": "isCurrent",
  75. "type": "boolean",
  76. "default": false
  77. },
  78. {
  79. "name": "option",
  80. "type": "ENUM(ITF, OTF, RTO)",
  81. "default": "ITF"
  82. },
  83. {
  84. "name": "raiseEntry",
  85. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  86. "default": []
  87. },
  88. {
  89. "name": "raiseExit",
  90. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  91. "default": []
  92. }
  93. ],
  94. "BasicState": [
  95. {
  96. "name": "name",
  97. "type": "string",
  98. "default": "S_"
  99. },
  100. {
  101. "name": "entryAction",
  102. "type": "code",
  103. "default": ""
  104. },
  105. {
  106. "name": "exitAction",
  107. "type": "code",
  108. "default": ""
  109. },
  110. {
  111. "name": "isStart",
  112. "type": "boolean",
  113. "default": false
  114. },
  115. {
  116. "name": "isCurrent",
  117. "type": "boolean",
  118. "default": false
  119. },
  120. {
  121. "name": "option",
  122. "type": "ENUM(ITF, OTF, RTO)",
  123. "default": "ITF"
  124. },
  125. {
  126. "name": "raiseEntry",
  127. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  128. "default": []
  129. },
  130. {
  131. "name": "raiseExit",
  132. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  133. "default": []
  134. }
  135. ],
  136. "contain": [],
  137. "transition": [
  138. {
  139. "name": "event",
  140. "type": "string",
  141. "default": ""
  142. },
  143. {
  144. "name": "guard",
  145. "type": "code",
  146. "default": ""
  147. },
  148. {
  149. "name": "action",
  150. "type": "code",
  151. "default": ""
  152. },
  153. {
  154. "name": "display",
  155. "type": "string",
  156. "default": "XXXX"
  157. },
  158. {
  159. "name": "after",
  160. "type": "code",
  161. "default": ""
  162. },
  163. {
  164. "name": "raise",
  165. "type": "list<map<[event,scope,arguments],[string,string,list<string>]>>",
  166. "default": []
  167. },
  168. {
  169. "name": "parameters",
  170. "type": "list<string>",
  171. "default": []
  172. },
  173. {
  174. "name": "port",
  175. "type": "string",
  176. "default": ""
  177. }
  178. ],
  179. "containOC": [],
  180. "HistoryState": [
  181. {
  182. "name": "name",
  183. "type": "string",
  184. "default": "H"
  185. },
  186. {
  187. "name": "type",
  188. "type": "ENUM(deep, shallow)",
  189. "default": "shallow"
  190. }
  191. ],
  192. "includes": [],
  193. "Class": [
  194. {
  195. "name": "name",
  196. "type": "string",
  197. "default": "Class_"
  198. },
  199. {
  200. "name": "attributes",
  201. "type": "list<$ATTRIBUTE>",
  202. "default": []
  203. },
  204. {
  205. "name": "cardinalities",
  206. "type": "list<$CARDINALITY>",
  207. "default": []
  208. },
  209. {
  210. "name": "abstract",
  211. "type": "boolean",
  212. "default": false
  213. },
  214. {
  215. "name": "methods",
  216. "type": "list<$METHOD>",
  217. "default": []
  218. },
  219. {
  220. "name": "external",
  221. "type": "boolean",
  222. "default": false
  223. }
  224. ],
  225. "Association": [
  226. {
  227. "name": "name",
  228. "type": "string",
  229. "default": "Association_"
  230. },
  231. {
  232. "name": "attributes",
  233. "type": "list<$ATTRIBUTE>",
  234. "default": []
  235. },
  236. {
  237. "name": "constraints",
  238. "type": "list<$EVENT_HANDLER>",
  239. "default": []
  240. },
  241. {
  242. "name": "actions",
  243. "type": "list<$EVENT_HANDLER>",
  244. "default": []
  245. },
  246. {
  247. "name": "cardinalities",
  248. "type": "list<$CARDINALITY>",
  249. "default": []
  250. },
  251. {
  252. "name": "linktype",
  253. "type": "ENUM(visual,containment)",
  254. "default": "visual"
  255. }
  256. ],
  257. "Inheritance": [],
  258. "behaviour": [],
  259. "ocContain": [],
  260. "SimulationInstance": [
  261. {
  262. "name": "simulation_time",
  263. "type": "float",
  264. "default": 0
  265. }
  266. ]
  267. },
  268. "constraints": [
  269. {
  270. "name": "distinctNames",
  271. "event": "",
  272. "targetType": "*",
  273. "code": "var \tmm \t\t= '/Formalisms/SCCD/SCCD/',\n\tstates \t\t= getAllNodes([mm+'BasicState',mm+'CompositeState',mm+'OrthogonalComponent']),\n\tfullStateNames = {},\n\tknownStateNames = [];\n\nfunction fullStateName(s,fsn)\n{\n\tif( !(s in fullStateNames) )\n\t{\n\t\tvar containLinks = getNeighbors('<',mm+'contain',s).\n concat(getNeighbors('<',mm+'ocContain',s)).\n concat(getNeighbors('<',mm+'containOC',s));\n\t\tif( containLinks.length > 0 )\n\t\t{\n\t\t\tvar parent = getNeighbors(\"<\",'*',containLinks[0])[0];\n\t\t\tfullStateNames[s] = fullStateName(parent,getAttr('name',parent))+fsn;\n\t\t}\n\t\telse\n\t\t\tfullStateNames[s] = fsn;\n\t}\n\treturn fullStateNames[s];\n}\n\n\nstates.every(\n\tfunction(s)\n\t{\n\t\tvar fsn = fullStateName(s,getAttr('name',s));\n\t\tif( knownStateNames.indexOf(fsn) > -1 )\n\t\t\treturn false;\n\t\tknownStateNames.push(fsn);\n\t\treturn true;\n\t});\n"
  274. },
  275. {
  276. "name": "singleContainer",
  277. "event": "post-connect",
  278. "code": "/*newline*/var mm = '/Formalisms/StateChart/StateChart/';/*newline*/getNeighbors('<',mm+'Contain').concat(getNeighbors('<',mm+'OCContain')).concat(getNeighbors('<',mm+'ContainOC')).length <= 1;",
  279. "targetType": "State"
  280. },
  281. {
  282. "name": "noAbstractInstances",
  283. "event": "pre-create",
  284. "code": "false",
  285. "targetType": "State"
  286. },
  287. {
  288. "name": "singleContainer",
  289. "event": "post-connect",
  290. "code": "/*newline*/var mm = '/Formalisms/StateChart/StateChart/';/*newline*/getNeighbors('<',mm+'Contain').concat(getNeighbors('<',mm+'OCContain')).concat(getNeighbors('<',mm+'ContainOC')).length <= 1;",
  291. "targetType": "CompositeState"
  292. },
  293. {
  294. "name": "singleContainer",
  295. "event": "post-connect",
  296. "code": "/*newline*/var mm = '/Formalisms/StateChart/StateChart/';/*newline*/getNeighbors('<',mm+'Contain').concat(getNeighbors('<',mm+'OCContain')).concat(getNeighbors('<',mm+'ContainOC')).length <= 1;",
  297. "targetType": "BasicState"
  298. }
  299. ],
  300. "actions": [],
  301. "cardinalities": {
  302. "OrthogonalComponent": [
  303. {
  304. "dir": "in",
  305. "type": "containOC",
  306. "min": "0",
  307. "max": "Infinity"
  308. },
  309. {
  310. "dir": "out",
  311. "type": "ocContain",
  312. "min": "0",
  313. "max": "Infinity"
  314. }
  315. ],
  316. "State": [
  317. {
  318. "dir": "in",
  319. "type": "contain",
  320. "min": "0",
  321. "max": "Infinity"
  322. },
  323. {
  324. "dir": "out",
  325. "type": "transition",
  326. "min": "0",
  327. "max": "Infinity"
  328. },
  329. {
  330. "dir": "in",
  331. "type": "transition",
  332. "min": "0",
  333. "max": "Infinity"
  334. },
  335. {
  336. "dir": "in",
  337. "type": "behaviour",
  338. "min": "0",
  339. "max": "Infinity"
  340. }
  341. ],
  342. "CompositeState": [
  343. {
  344. "dir": "out",
  345. "type": "HistoryState",
  346. "min": "0",
  347. "max": "1"
  348. },
  349. {
  350. "dir": "out",
  351. "type": "contain",
  352. "min": "0",
  353. "max": "Infinity"
  354. },
  355. {
  356. "dir": "out",
  357. "type": "containOC",
  358. "min": "0",
  359. "max": "Infinity"
  360. },
  361. {
  362. "dir": "out",
  363. "type": "includes",
  364. "min": "0",
  365. "max": "Infinity"
  366. },
  367. {
  368. "dir": "in",
  369. "type": "ocContain",
  370. "min": "0",
  371. "max": "Infinity"
  372. },
  373. {
  374. "dir": "in",
  375. "type": "contain",
  376. "min": "0",
  377. "max": "Infinity"
  378. },
  379. {
  380. "dir": "out",
  381. "type": "transition",
  382. "min": "0",
  383. "max": "Infinity"
  384. },
  385. {
  386. "dir": "in",
  387. "type": "transition",
  388. "min": "0",
  389. "max": "Infinity"
  390. },
  391. {
  392. "dir": "in",
  393. "type": "behaviour",
  394. "min": "0",
  395. "max": "Infinity"
  396. }
  397. ],
  398. "BasicState": [
  399. {
  400. "dir": "in",
  401. "type": "contain",
  402. "min": "0",
  403. "max": "Infinity"
  404. },
  405. {
  406. "dir": "out",
  407. "type": "transition",
  408. "min": "0",
  409. "max": "Infinity"
  410. },
  411. {
  412. "dir": "in",
  413. "type": "transition",
  414. "min": "0",
  415. "max": "Infinity"
  416. },
  417. {
  418. "dir": "in",
  419. "type": "behaviour",
  420. "min": "0",
  421. "max": "Infinity"
  422. }
  423. ],
  424. "contain": [
  425. {
  426. "dir": "in",
  427. "type": "CompositeState",
  428. "min": "0",
  429. "max": "1"
  430. },
  431. {
  432. "dir": "out",
  433. "type": "State",
  434. "min": "0",
  435. "max": "1"
  436. },
  437. {
  438. "dir": "out",
  439. "type": "CompositeState",
  440. "min": "0",
  441. "max": "1"
  442. },
  443. {
  444. "dir": "out",
  445. "type": "BasicState",
  446. "min": "0",
  447. "max": "1"
  448. }
  449. ],
  450. "transition": [
  451. {
  452. "dir": "in",
  453. "type": "OrthogonalComponent",
  454. "min": "0",
  455. "max": "0"
  456. },
  457. {
  458. "dir": "out",
  459. "type": "OrthogonalComponent",
  460. "min": "0",
  461. "max": "0"
  462. },
  463. {
  464. "dir": "in",
  465. "type": "State",
  466. "min": "0",
  467. "max": "1"
  468. },
  469. {
  470. "dir": "out",
  471. "type": "State",
  472. "min": "0",
  473. "max": "1"
  474. },
  475. {
  476. "dir": "out",
  477. "type": "HistoryState",
  478. "min": "0",
  479. "max": "1"
  480. },
  481. {
  482. "dir": "in",
  483. "type": "CompositeState",
  484. "min": "0",
  485. "max": "1"
  486. },
  487. {
  488. "dir": "out",
  489. "type": "CompositeState",
  490. "min": "0",
  491. "max": "1"
  492. },
  493. {
  494. "dir": "in",
  495. "type": "BasicState",
  496. "min": "0",
  497. "max": "1"
  498. },
  499. {
  500. "dir": "out",
  501. "type": "BasicState",
  502. "min": "0",
  503. "max": "1"
  504. }
  505. ],
  506. "containOC": [
  507. {
  508. "dir": "in",
  509. "type": "CompositeState",
  510. "min": "0",
  511. "max": "1"
  512. },
  513. {
  514. "dir": "out",
  515. "type": "OrthogonalComponent",
  516. "min": "0",
  517. "max": "1"
  518. }
  519. ],
  520. "HistoryState": [
  521. {
  522. "dir": "in",
  523. "type": "includes",
  524. "min": "0",
  525. "max": "Infinity"
  526. },
  527. {
  528. "dir": "in",
  529. "type": "transition",
  530. "min": "0",
  531. "max": "Infinity"
  532. }
  533. ],
  534. "includes": [
  535. {
  536. "dir": "out",
  537. "type": "HistoryState",
  538. "min": "0",
  539. "max": "1"
  540. },
  541. {
  542. "dir": "in",
  543. "type": "CompositeState",
  544. "min": "0",
  545. "max": "1"
  546. }
  547. ],
  548. "Class": [
  549. {
  550. "dir": "in",
  551. "type": "PackageContents",
  552. "min": "0",
  553. "max": "1"
  554. },
  555. {
  556. "dir": "out",
  557. "type": "Association",
  558. "min": "0",
  559. "max": "Infinity"
  560. },
  561. {
  562. "dir": "in",
  563. "type": "Association",
  564. "min": "0",
  565. "max": "Infinity"
  566. },
  567. {
  568. "dir": "out",
  569. "type": "Inheritance",
  570. "min": "0",
  571. "max": "Infinity"
  572. },
  573. {
  574. "dir": "in",
  575. "type": "Inheritance",
  576. "min": "0",
  577. "max": "Infinity"
  578. },
  579. {
  580. "dir": "out",
  581. "type": "behaviour",
  582. "min": "0",
  583. "max": "Infinity"
  584. }
  585. ],
  586. "Association": [
  587. {
  588. "dir": "in",
  589. "type": "Class",
  590. "min": "0",
  591. "max": "1"
  592. },
  593. {
  594. "dir": "out",
  595. "type": "Class",
  596. "min": "0",
  597. "max": "1"
  598. }
  599. ],
  600. "Inheritance": [
  601. {
  602. "dir": "in",
  603. "type": "Class",
  604. "min": "0",
  605. "max": "1"
  606. },
  607. {
  608. "dir": "out",
  609. "type": "Class",
  610. "min": "0",
  611. "max": "1"
  612. }
  613. ],
  614. "behaviour": [
  615. {
  616. "dir": "in",
  617. "type": "Class",
  618. "min": "0",
  619. "max": "1"
  620. },
  621. {
  622. "dir": "out",
  623. "type": "State",
  624. "min": "0",
  625. "max": "1"
  626. },
  627. {
  628. "dir": "out",
  629. "type": "CompositeState",
  630. "min": "0",
  631. "max": "1"
  632. },
  633. {
  634. "dir": "out",
  635. "type": "BasicState",
  636. "min": "0",
  637. "max": "1"
  638. }
  639. ],
  640. "ocContain": [
  641. {
  642. "dir": "in",
  643. "type": "OrthogonalComponent",
  644. "min": "0",
  645. "max": "1"
  646. },
  647. {
  648. "dir": "out",
  649. "type": "CompositeState",
  650. "min": "0",
  651. "max": "1"
  652. }
  653. ],
  654. "SimulationInstance": []
  655. },
  656. "legalConnections": {
  657. "OrthogonalComponent": {
  658. "CompositeState": [
  659. "ocContain"
  660. ]
  661. },
  662. "State": {
  663. "OrthogonalComponent": [
  664. "transition"
  665. ],
  666. "State": [
  667. "transition"
  668. ],
  669. "HistoryState": [
  670. "transition"
  671. ],
  672. "CompositeState": [
  673. "transition"
  674. ],
  675. "BasicState": [
  676. "transition"
  677. ]
  678. },
  679. "CompositeState": {
  680. "State": [
  681. "contain",
  682. "transition"
  683. ],
  684. "CompositeState": [
  685. "contain",
  686. "transition"
  687. ],
  688. "BasicState": [
  689. "contain",
  690. "transition"
  691. ],
  692. "OrthogonalComponent": [
  693. "containOC",
  694. "transition"
  695. ],
  696. "HistoryState": [
  697. "includes",
  698. "transition"
  699. ]
  700. },
  701. "BasicState": {
  702. "OrthogonalComponent": [
  703. "transition"
  704. ],
  705. "State": [
  706. "transition"
  707. ],
  708. "HistoryState": [
  709. "transition"
  710. ],
  711. "CompositeState": [
  712. "transition"
  713. ],
  714. "BasicState": [
  715. "transition"
  716. ]
  717. },
  718. "Class": {
  719. "Class": [
  720. "Association",
  721. "Inheritance"
  722. ],
  723. "State": [
  724. "behaviour"
  725. ],
  726. "CompositeState": [
  727. "behaviour"
  728. ],
  729. "BasicState": [
  730. "behaviour"
  731. ]
  732. }
  733. },
  734. "connectorTypes": {
  735. "contain": "containment",
  736. "transition": "visual",
  737. "containOC": "containment",
  738. "includes": "containment",
  739. "Association": "visual",
  740. "Inheritance": "visual",
  741. "behaviour": "visual",
  742. "ocContain": "containment"
  743. },
  744. "types2parentTypes": {
  745. "distinctNames": [],
  746. "OrthogonalComponent": [],
  747. "State": [],
  748. "CompositeState": [
  749. "State"
  750. ],
  751. "BasicState": [
  752. "State"
  753. ],
  754. "contain": [],
  755. "transition": [],
  756. "containOC": [],
  757. "HistoryState": [],
  758. "includes": [],
  759. "Class": [],
  760. "Association": [],
  761. "Inheritance": [],
  762. "behaviour": [],
  763. "ocContain": [],
  764. "SimulationInstance": []
  765. }
  766. }