RaceTrans.pattern.metamodel 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. {
  2. "types": {
  3. "__pStep": [
  4. {
  5. "name": "__pLabel",
  6. "type": "string",
  7. "default": ""
  8. },
  9. {
  10. "name": "__pPivotIn",
  11. "type": "string",
  12. "default": ""
  13. },
  14. {
  15. "name": "__pPivotOut",
  16. "type": "string",
  17. "default": ""
  18. },
  19. {
  20. "name": "__pMatchSubtypes",
  21. "type": "boolean",
  22. "default": false
  23. },
  24. {
  25. "name": "position",
  26. "type": "code",
  27. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  28. }
  29. ],
  30. "__pnext": [
  31. {
  32. "name": "__pLabel",
  33. "type": "string",
  34. "default": ""
  35. },
  36. {
  37. "name": "__pPivotIn",
  38. "type": "string",
  39. "default": ""
  40. },
  41. {
  42. "name": "__pPivotOut",
  43. "type": "string",
  44. "default": ""
  45. },
  46. {
  47. "name": "__pMatchSubtypes",
  48. "type": "boolean",
  49. "default": false
  50. }
  51. ],
  52. "__pStartEngines": [
  53. {
  54. "name": "__pLabel",
  55. "type": "string",
  56. "default": ""
  57. },
  58. {
  59. "name": "__pPivotIn",
  60. "type": "string",
  61. "default": ""
  62. },
  63. {
  64. "name": "__pPivotOut",
  65. "type": "string",
  66. "default": ""
  67. },
  68. {
  69. "name": "__pMatchSubtypes",
  70. "type": "boolean",
  71. "default": false
  72. },
  73. {
  74. "name": "position",
  75. "type": "code",
  76. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  77. }
  78. ],
  79. "__pCarsGoToStart": [
  80. {
  81. "name": "__pLabel",
  82. "type": "string",
  83. "default": ""
  84. },
  85. {
  86. "name": "__pPivotIn",
  87. "type": "string",
  88. "default": ""
  89. },
  90. {
  91. "name": "__pPivotOut",
  92. "type": "string",
  93. "default": ""
  94. },
  95. {
  96. "name": "__pMatchSubtypes",
  97. "type": "boolean",
  98. "default": false
  99. },
  100. {
  101. "name": "position",
  102. "type": "code",
  103. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  104. }
  105. ],
  106. "__pPositionable": [
  107. {
  108. "name": "__pLabel",
  109. "type": "string",
  110. "default": ""
  111. },
  112. {
  113. "name": "__pPivotIn",
  114. "type": "string",
  115. "default": ""
  116. },
  117. {
  118. "name": "__pPivotOut",
  119. "type": "string",
  120. "default": ""
  121. },
  122. {
  123. "name": "__pMatchSubtypes",
  124. "type": "boolean",
  125. "default": false
  126. },
  127. {
  128. "name": "position",
  129. "type": "code",
  130. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  131. }
  132. ],
  133. "__pStepOnGas": [
  134. {
  135. "name": "__pLabel",
  136. "type": "string",
  137. "default": ""
  138. },
  139. {
  140. "name": "__pPivotIn",
  141. "type": "string",
  142. "default": ""
  143. },
  144. {
  145. "name": "__pPivotOut",
  146. "type": "string",
  147. "default": ""
  148. },
  149. {
  150. "name": "__pMatchSubtypes",
  151. "type": "boolean",
  152. "default": false
  153. },
  154. {
  155. "name": "position",
  156. "type": "code",
  157. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  158. }
  159. ],
  160. "__pIsRaceFinished": [
  161. {
  162. "name": "__pLabel",
  163. "type": "string",
  164. "default": ""
  165. },
  166. {
  167. "name": "__pPivotIn",
  168. "type": "string",
  169. "default": ""
  170. },
  171. {
  172. "name": "__pPivotOut",
  173. "type": "string",
  174. "default": ""
  175. },
  176. {
  177. "name": "__pMatchSubtypes",
  178. "type": "boolean",
  179. "default": false
  180. },
  181. {
  182. "name": "position",
  183. "type": "code",
  184. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  185. }
  186. ],
  187. "__pAwardCeremony": [
  188. {
  189. "name": "__pLabel",
  190. "type": "string",
  191. "default": ""
  192. },
  193. {
  194. "name": "__pPivotIn",
  195. "type": "string",
  196. "default": ""
  197. },
  198. {
  199. "name": "__pPivotOut",
  200. "type": "string",
  201. "default": ""
  202. },
  203. {
  204. "name": "__pMatchSubtypes",
  205. "type": "boolean",
  206. "default": false
  207. },
  208. {
  209. "name": "position",
  210. "type": "code",
  211. "default": "\"[PYTHON]\"\n\"Example:\t result = True\"\n\"Example:\t result = getAttr()\"\n\n\"[JAVASCRIPT]\"\n\"Example:\t true\"\n\"Example:\t getAttr()\""
  212. }
  213. ],
  214. "__pnotFinished": [
  215. {
  216. "name": "__pLabel",
  217. "type": "string",
  218. "default": ""
  219. },
  220. {
  221. "name": "__pPivotIn",
  222. "type": "string",
  223. "default": ""
  224. },
  225. {
  226. "name": "__pPivotOut",
  227. "type": "string",
  228. "default": ""
  229. },
  230. {
  231. "name": "__pMatchSubtypes",
  232. "type": "boolean",
  233. "default": false
  234. }
  235. ]
  236. },
  237. "constraints": [
  238. {
  239. "name": "noAbstractInstances",
  240. "event": "pre-create",
  241. "code": "/* comment next line to enable this constraint */\nthrow \"IgnoredConstraint\"\nfalse",
  242. "targetType": "Step"
  243. },
  244. {
  245. "name": "noAbstractInstances",
  246. "event": "pre-create",
  247. "code": "/* comment next line to enable this constraint */\nthrow \"IgnoredConstraint\"\nfalse",
  248. "targetType": "Positionable"
  249. }
  250. ],
  251. "actions": [
  252. {
  253. "name": "distinctPLabels",
  254. "event": "post-create",
  255. "code": "if( getAttr(\"__pLabel\") == \"\" )\n{\n\tvar pLabels = getAllNodes().\n\t\t\t\t\t\t\tfilter( function(n) {return hasAttr(\"__pLabel\",n);} ).\n\t\t\t\t\t\t\t\tmap( function(n) {return getAttr(\"__pLabel\",n);} ),\n\t\t i\t\t\t= \"0\";\n\n\twhile( _utils.contains(pLabels,i) )\n\t\ti = String(parseInt(i)+1);\n\tsetAttr(\"__pLabel\",i);\n}",
  256. "targetType": "*"
  257. }
  258. ],
  259. "cardinalities": {
  260. "__pStep": [
  261. {
  262. "dir": "out",
  263. "type": "__pnext",
  264. "min": 0,
  265. "max": "Infinity"
  266. },
  267. {
  268. "dir": "in",
  269. "type": "__pnext",
  270. "min": 0,
  271. "max": "Infinity"
  272. }
  273. ],
  274. "__pnext": [
  275. {
  276. "dir": "in",
  277. "type": "__pStep",
  278. "min": 0,
  279. "max": "1"
  280. },
  281. {
  282. "dir": "out",
  283. "type": "__pStep",
  284. "min": 0,
  285. "max": "1"
  286. },
  287. {
  288. "dir": "in",
  289. "type": "__pStartEngines",
  290. "min": 0,
  291. "max": "1"
  292. },
  293. {
  294. "dir": "out",
  295. "type": "__pStartEngines",
  296. "min": 0,
  297. "max": "1"
  298. },
  299. {
  300. "dir": "in",
  301. "type": "__pCarsGoToStart",
  302. "min": 0,
  303. "max": "1"
  304. },
  305. {
  306. "dir": "out",
  307. "type": "__pCarsGoToStart",
  308. "min": 0,
  309. "max": "1"
  310. },
  311. {
  312. "dir": "in",
  313. "type": "__pStepOnGas",
  314. "min": 0,
  315. "max": "1"
  316. },
  317. {
  318. "dir": "out",
  319. "type": "__pStepOnGas",
  320. "min": 0,
  321. "max": "1"
  322. },
  323. {
  324. "dir": "in",
  325. "type": "__pIsRaceFinished",
  326. "min": 0,
  327. "max": "1"
  328. },
  329. {
  330. "dir": "out",
  331. "type": "__pIsRaceFinished",
  332. "min": 0,
  333. "max": "1"
  334. },
  335. {
  336. "dir": "in",
  337. "type": "__pAwardCeremony",
  338. "min": 0,
  339. "max": "1"
  340. },
  341. {
  342. "dir": "out",
  343. "type": "__pAwardCeremony",
  344. "min": 0,
  345. "max": "1"
  346. }
  347. ],
  348. "__pStartEngines": [
  349. {
  350. "dir": "out",
  351. "type": "__pnext",
  352. "min": 0,
  353. "max": "Infinity"
  354. },
  355. {
  356. "dir": "in",
  357. "type": "__pnext",
  358. "min": 0,
  359. "max": "Infinity"
  360. }
  361. ],
  362. "__pCarsGoToStart": [
  363. {
  364. "dir": "out",
  365. "type": "__pnext",
  366. "min": 0,
  367. "max": "Infinity"
  368. },
  369. {
  370. "dir": "in",
  371. "type": "__pnext",
  372. "min": 0,
  373. "max": "Infinity"
  374. }
  375. ],
  376. "__pPositionable": [],
  377. "__pStepOnGas": [
  378. {
  379. "dir": "in",
  380. "type": "__pnotFinished",
  381. "min": 0,
  382. "max": "Infinity"
  383. },
  384. {
  385. "dir": "out",
  386. "type": "__pnext",
  387. "min": 0,
  388. "max": "Infinity"
  389. },
  390. {
  391. "dir": "in",
  392. "type": "__pnext",
  393. "min": 0,
  394. "max": "Infinity"
  395. }
  396. ],
  397. "__pIsRaceFinished": [
  398. {
  399. "dir": "out",
  400. "type": "__pnotFinished",
  401. "min": 0,
  402. "max": "Infinity"
  403. },
  404. {
  405. "dir": "out",
  406. "type": "__pnext",
  407. "min": 0,
  408. "max": "Infinity"
  409. },
  410. {
  411. "dir": "in",
  412. "type": "__pnext",
  413. "min": 0,
  414. "max": "Infinity"
  415. }
  416. ],
  417. "__pAwardCeremony": [
  418. {
  419. "dir": "out",
  420. "type": "__pnext",
  421. "min": 0,
  422. "max": "Infinity"
  423. },
  424. {
  425. "dir": "in",
  426. "type": "__pnext",
  427. "min": 0,
  428. "max": "Infinity"
  429. }
  430. ],
  431. "__pnotFinished": [
  432. {
  433. "dir": "in",
  434. "type": "__pIsRaceFinished",
  435. "min": 0,
  436. "max": "1"
  437. },
  438. {
  439. "dir": "out",
  440. "type": "__pStepOnGas",
  441. "min": 0,
  442. "max": "1"
  443. }
  444. ]
  445. },
  446. "legalConnections": {
  447. "__pStep": {
  448. "__pStep": [
  449. "__pnext"
  450. ],
  451. "__pStartEngines": [
  452. "__pnext"
  453. ],
  454. "__pCarsGoToStart": [
  455. "__pnext"
  456. ],
  457. "__pStepOnGas": [
  458. "__pnext"
  459. ],
  460. "__pIsRaceFinished": [
  461. "__pnext"
  462. ],
  463. "__pAwardCeremony": [
  464. "__pnext"
  465. ]
  466. },
  467. "__pStartEngines": {
  468. "__pStep": [
  469. "__pnext"
  470. ],
  471. "__pStartEngines": [
  472. "__pnext"
  473. ],
  474. "__pCarsGoToStart": [
  475. "__pnext"
  476. ],
  477. "__pStepOnGas": [
  478. "__pnext"
  479. ],
  480. "__pIsRaceFinished": [
  481. "__pnext"
  482. ],
  483. "__pAwardCeremony": [
  484. "__pnext"
  485. ]
  486. },
  487. "__pCarsGoToStart": {
  488. "__pStep": [
  489. "__pnext"
  490. ],
  491. "__pStartEngines": [
  492. "__pnext"
  493. ],
  494. "__pCarsGoToStart": [
  495. "__pnext"
  496. ],
  497. "__pStepOnGas": [
  498. "__pnext"
  499. ],
  500. "__pIsRaceFinished": [
  501. "__pnext"
  502. ],
  503. "__pAwardCeremony": [
  504. "__pnext"
  505. ]
  506. },
  507. "__pStepOnGas": {
  508. "__pStep": [
  509. "__pnext"
  510. ],
  511. "__pStartEngines": [
  512. "__pnext"
  513. ],
  514. "__pCarsGoToStart": [
  515. "__pnext"
  516. ],
  517. "__pStepOnGas": [
  518. "__pnext"
  519. ],
  520. "__pIsRaceFinished": [
  521. "__pnext"
  522. ],
  523. "__pAwardCeremony": [
  524. "__pnext"
  525. ]
  526. },
  527. "__pIsRaceFinished": {
  528. "__pStepOnGas": [
  529. "__pnotFinished",
  530. "__pnext"
  531. ],
  532. "__pStep": [
  533. "__pnext"
  534. ],
  535. "__pStartEngines": [
  536. "__pnext"
  537. ],
  538. "__pCarsGoToStart": [
  539. "__pnext"
  540. ],
  541. "__pIsRaceFinished": [
  542. "__pnext"
  543. ],
  544. "__pAwardCeremony": [
  545. "__pnext"
  546. ]
  547. },
  548. "__pAwardCeremony": {
  549. "__pStep": [
  550. "__pnext"
  551. ],
  552. "__pStartEngines": [
  553. "__pnext"
  554. ],
  555. "__pCarsGoToStart": [
  556. "__pnext"
  557. ],
  558. "__pStepOnGas": [
  559. "__pnext"
  560. ],
  561. "__pIsRaceFinished": [
  562. "__pnext"
  563. ],
  564. "__pAwardCeremony": [
  565. "__pnext"
  566. ]
  567. }
  568. },
  569. "connectorTypes": {
  570. "__pnext": "visual",
  571. "__pnotFinished": "visual"
  572. },
  573. "types2parentTypes": {
  574. "__pStep": [
  575. "__pPositionable"
  576. ],
  577. "__pnext": [],
  578. "__pStartEngines": [
  579. "__pStep",
  580. "__pPositionable"
  581. ],
  582. "__pCarsGoToStart": [
  583. "__pStep",
  584. "__pPositionable"
  585. ],
  586. "__pPositionable": [],
  587. "__pStepOnGas": [
  588. "__pStep",
  589. "__pPositionable"
  590. ],
  591. "__pIsRaceFinished": [
  592. "__pStep",
  593. "__pPositionable"
  594. ],
  595. "__pAwardCeremony": [
  596. "__pStep",
  597. "__pPositionable"
  598. ],
  599. "__pnotFinished": []
  600. }
  601. }