test_powerwindow.py 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395
  1. import unittest
  2. from utils import *
  3. model_list = set([" SimpleClassDiagrams : SimpleClassDiagrams",
  4. " CoreFormalism : SimpleClassDiagrams",
  5. " ManualOperation : SimpleClassDiagrams",
  6. " ActionLanguage : SimpleClassDiagrams",
  7. " ProcessModel : SimpleClassDiagrams",
  8. " Tracability : SimpleClassDiagrams",
  9. " core : CoreFormalism"])
  10. model_full_list = set([" 221 root admin SimpleClassDiagrams : SimpleClassDiagrams",
  11. " 221 root admin CoreFormalism : SimpleClassDiagrams",
  12. " 221 root admin ActionLanguage : SimpleClassDiagrams",
  13. " 221 root admin ManualOperation : SimpleClassDiagrams",
  14. " 221 root admin ProcessModel : SimpleClassDiagrams",
  15. " 221 root admin Tracability : SimpleClassDiagrams",
  16. " 200 root admin core : CoreFormalism"])
  17. all_files = [ "core/mini_modify.alc",
  18. "core/core_formalism.mvc",
  19. "core/core_algorithm.alc",
  20. "core/pm.mvc",
  21. "primitives.alc",
  22. "object_operations.alc",
  23. "conformance_scd.alc",
  24. "library.alc",
  25. "transform.alc",
  26. "model_management.alc",
  27. "ramify.alc",
  28. "metamodels.alc",
  29. "random.alc",
  30. "constructors.alc",
  31. "modelling.alc",
  32. "compilation_manager.alc",
  33. ]
  34. class TestPowerWindow(unittest.TestCase):
  35. def test_process_powerwindow_fast(self):
  36. self.assertTrue(run_file(all_files,
  37. [ "root", "root", "root",
  38. "model_add",
  39. "SimpleClassDiagrams",
  40. "ReachabilityGraph",
  41. ] + get_model_constructor_2("models/reachability_graph.mvc") + [
  42. "model_add",
  43. "SimpleClassDiagrams",
  44. "PetriNet",
  45. ] + get_model_constructor_2("integration/code/pn_design.mvc") + [
  46. "model_add",
  47. "SimpleClassDiagrams",
  48. "Encapsulated_PetriNet",
  49. ] + get_model_constructor_2("models/petrinet_ports.mvc") + [
  50. "model_add",
  51. "SimpleClassDiagrams",
  52. "PW_Plant",
  53. ] + get_model_constructor_2("models/plant_PW.mvc") + [
  54. "model_add",
  55. "SimpleClassDiagrams",
  56. "PW_Environment",
  57. ] + get_model_constructor_2("models/environment_PW.mvc") + [
  58. "model_add",
  59. "SimpleClassDiagrams",
  60. "PW_Control",
  61. ] + get_model_constructor_2("models/control_PW.mvc") + [
  62. "model_add",
  63. "SimpleClassDiagrams",
  64. "Requirements",
  65. ] + get_model_constructor_2("models/requirements.mvc") + [
  66. "model_add",
  67. "SimpleClassDiagrams",
  68. "Query",
  69. ] + get_model_constructor_2("models/query.mvc") + [
  70. "model_add",
  71. "ProcessModel",
  72. "pm_powerwindow",
  73. ] + get_model_constructor_2("models/pm_req_analyse.mvc") + [
  74. "model_add",
  75. "SimpleClassDiagrams",
  76. "Architecture",
  77. ] + get_model_constructor_2("models/architecture.mvc") + [
  78. "model_list",
  79. "transformation_add_MT_language",
  80. "PetriNet",
  81. "Encapsulated_PetriNet",
  82. "PW_Plant",
  83. "PW_Control",
  84. "PW_Environment",
  85. "Requirements",
  86. "ReachabilityGraph",
  87. "Query",
  88. "Architecture",
  89. "",
  90. "All_RAM",
  91. "model_modify",
  92. "__merged_All_RAM",
  93. "instantiate",
  94. "Association",
  95. "CTRL2EPN_link",
  96. "PW_Control/State",
  97. "Encapsulated_PetriNet/Place",
  98. "instantiate",
  99. "Association",
  100. "CTRL2EPN_tlink",
  101. "PW_Control/Transition",
  102. "Encapsulated_PetriNet/Transition",
  103. "instantiate",
  104. "Association",
  105. "PLANT2EPN_link",
  106. "PW_Plant/State",
  107. "Encapsulated_PetriNet/Place",
  108. "instantiate",
  109. "Association",
  110. "PLANT2EPN_tlink",
  111. "PW_Plant/Transition",
  112. "Encapsulated_PetriNet/Transition",
  113. "instantiate",
  114. "Association",
  115. "ENV2EPN_link",
  116. "PW_Environment/Event",
  117. "Encapsulated_PetriNet/Place",
  118. "instantiate",
  119. "Association",
  120. "EPN2PN_place_link",
  121. "Encapsulated_PetriNet/Place",
  122. "PetriNet/Place",
  123. "instantiate",
  124. "Association",
  125. "EPN2PN_transition_link",
  126. "Encapsulated_PetriNet/Transition",
  127. "PetriNet/Transition",
  128. "exit",
  129. "transformation_RAMify",
  130. "__merged_All_RAM",
  131. "All_RAM",
  132. "transformation_add_MANUAL",
  133. "Requirements",
  134. "",
  135. "Requirements",
  136. "",
  137. "revise_req",
  138. "transformation_add_MANUAL",
  139. "Requirements",
  140. "PW_Environment",
  141. "",
  142. "PW_Environment",
  143. "",
  144. "revise_environment",
  145. "transformation_add_MANUAL",
  146. "Requirements",
  147. "PW_Plant",
  148. "",
  149. "PW_Plant",
  150. "",
  151. "revise_plant",
  152. "transformation_add_MANUAL",
  153. "Requirements",
  154. "PW_Control",
  155. "",
  156. "PW_Control",
  157. "",
  158. "revise_control",
  159. "transformation_add_MANUAL",
  160. "Requirements",
  161. "Query",
  162. "",
  163. "Query",
  164. "",
  165. "revise_query",
  166. "transformation_add_MANUAL",
  167. "Requirements",
  168. "Architecture",
  169. "",
  170. "Architecture",
  171. "",
  172. "revise_architecture",
  173. "transformation_add_MT",
  174. "All_RAM",
  175. "",
  176. "PW_Plant",
  177. "PW_Environment",
  178. "PW_Control",
  179. "Query",
  180. "Architecture",
  181. "Requirements",
  182. "",
  183. "make_initial_models",
  184. ] + get_model_constructor_2("models/initialize.mvc") + [
  185. "transformation_add_MT",
  186. "All_RAM",
  187. "PW_Plant",
  188. "",
  189. "Encapsulated_PetriNet",
  190. "",
  191. "plant_to_EPN",
  192. ] + get_model_constructor_2("models/plant_to_EPN.mvc") + [
  193. "transformation_add_MT",
  194. "All_RAM",
  195. "PW_Control",
  196. "",
  197. "Encapsulated_PetriNet",
  198. "",
  199. "control_to_EPN",
  200. ] + get_model_constructor_2("models/control_to_EPN.mvc") + [
  201. "transformation_add_MT",
  202. "All_RAM",
  203. "PW_Environment",
  204. "",
  205. "Encapsulated_PetriNet",
  206. "",
  207. "environment_to_EPN",
  208. ] + get_model_constructor_2("models/environment_to_EPN.mvc") + [
  209. "transformation_add_MT",
  210. "All_RAM",
  211. "Encapsulated_PetriNet",
  212. "Architecture",
  213. "",
  214. "Encapsulated_PetriNet",
  215. "",
  216. "combine_EPN",
  217. ] + get_model_constructor_2("models/combine_EPN.mvc") + [
  218. "transformation_add_MT",
  219. "All_RAM",
  220. "ReachabilityGraph",
  221. "Query",
  222. "",
  223. "",
  224. "match",
  225. ] + get_model_constructor_2("models/matches.mvc") + [
  226. "transformation_add_AL",
  227. "PetriNet",
  228. "",
  229. "ReachabilityGraph",
  230. "",
  231. "reachability",
  232. ] + get_constructor(open("models/reachability.alc", "r").read()) + [
  233. "transformation_add_AL",
  234. "ReachabilityGraph",
  235. "",
  236. "",
  237. "bfs",
  238. ] + get_constructor(open("models/bfs.alc", "r").read()) + [
  239. "model_list",
  240. "process_execute",
  241. "pm_powerwindow",
  242. "pm_",
  243. # revise_req
  244. "upload",
  245. ] + get_model_constructor_2("models/requirements_model.mvc") + [
  246. "exit",
  247. # revise_plant
  248. "upload",
  249. ] + get_model_constructor_2("models/plant_model.mvc") + [
  250. "exit",
  251. # revise_environment
  252. "upload",
  253. ] + get_model_constructor_2("models/environment_model.mvc") + [
  254. "exit",
  255. # revise_control
  256. "upload",
  257. ] + get_model_constructor_2("models/control_model.mvc") + [
  258. "exit",
  259. # revise_query
  260. "upload",
  261. ] + get_model_constructor_2("models/query_model.mvc") + [
  262. "exit",
  263. # revise_architecture
  264. "upload",
  265. ] + get_model_constructor_2("models/architecture_model.mvc") + [
  266. "exit",
  267. ],
  268. [ # bootup phase
  269. "Desired username for admin user?",
  270. "Desired password for admin user?",
  271. "Please repeat the password",
  272. "Passwords match!",
  273. "Welcome to the Model Management Interface v2.0!",
  274. "Use the 'help' command for a list of possible commands",
  275. "Ready for command...",
  276. # model_add * 10
  277. ] + [ "Creating new model!",
  278. "Model type?",
  279. "Model name?",
  280. "Waiting for model constructors...",
  281. "Model upload success!",
  282. "Ready for command...", ] * 10 + [
  283. # model_list
  284. model_list |
  285. set([
  286. " ReachabilityGraph : SimpleClassDiagrams",
  287. " PetriNet : SimpleClassDiagrams",
  288. " Encapsulated_PetriNet : SimpleClassDiagrams",
  289. " PW_Plant : SimpleClassDiagrams",
  290. " PW_Environment : SimpleClassDiagrams",
  291. " PW_Control : SimpleClassDiagrams",
  292. " Requirements : SimpleClassDiagrams",
  293. " Query : SimpleClassDiagrams",
  294. " pm_powerwindow : ProcessModel",
  295. " Architecture : SimpleClassDiagrams",
  296. ]),
  297. "Ready for command...",
  298. # transformation_add_MT_language
  299. "Formalisms to include (terminate with empty string)?",
  300. "Name of the RAMified transformation metamodel?",
  301. "Ready for command...",
  302. # model_modify
  303. "Which model do you want to modify?",
  304. "Model loaded, ready for commands!",
  305. "Use 'help' command for a list of possible commands",
  306. "Please give your command.",
  307. # instantiate * 7
  308. ] + [ "Type to instantiate?",
  309. "Name of new element?",
  310. "Source name?",
  311. "Destination name?",
  312. "Instantiation successful!",
  313. "Please give your command.", ] * 7 + [
  314. "Ready for command...",
  315. # transformation_RAMify
  316. "Which metamodel do you want to RAMify?",
  317. "Where do you want to store the RAMified metamodel?",
  318. "Ready for command...",
  319. # transformation_add_MANUAL * 6
  320. ] + [
  321. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  322. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  323. "Name of operation model?",
  324. "Ready for command...",
  325. ] * 6 + [
  326. # transformation_add_MT * 6
  327. ] + [
  328. "RAMified metamodel to use?",
  329. "Supported metamodels:",
  330. set([" PetriNet",
  331. " Encapsulated_PetriNet",
  332. " PW_Plant",
  333. " Architecture",
  334. " Query",
  335. " PW_Environment",
  336. " Requirements",
  337. " PW_Control",
  338. " ReachabilityGraph",
  339. ]),
  340. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  341. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  342. "Name of new operation?",
  343. "Waiting for model constructors...",
  344. "Ready for command...",
  345. ] * 6 + [
  346. # transformation_add_AL * 2
  347. ] + [ "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  348. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  349. "Name of operation model?",
  350. "Waiting for model constructors...",
  351. "Ready for command...", ] * 2 + [
  352. # model_list
  353. model_list |
  354. set([
  355. " PetriNet : SimpleClassDiagrams",
  356. " Encapsulated_PetriNet : SimpleClassDiagrams",
  357. " PW_Plant : SimpleClassDiagrams",
  358. " PW_Environment : SimpleClassDiagrams",
  359. " PW_Control : SimpleClassDiagrams",
  360. " Requirements : SimpleClassDiagrams",
  361. " Query : SimpleClassDiagrams",
  362. " reachability : ActionLanguage",
  363. " revise_req : ManualOperation",
  364. " revise_plant : ManualOperation",
  365. " revise_control : ManualOperation",
  366. " revise_environment : ManualOperation",
  367. " revise_query : ManualOperation",
  368. " revise_architecture : ManualOperation",
  369. " __merged_bfs : SimpleClassDiagrams",
  370. " __merged_reachability : SimpleClassDiagrams",
  371. " __merged_revise_req : SimpleClassDiagrams",
  372. " __merged_All_RAM : SimpleClassDiagrams",
  373. " __merged_revise_plant : SimpleClassDiagrams",
  374. " __merged_revise_control : SimpleClassDiagrams",
  375. " __merged_revise_environment : SimpleClassDiagrams",
  376. " __merged_revise_query : SimpleClassDiagrams",
  377. " __merged_revise_architecture : SimpleClassDiagrams",
  378. " match : All_RAM",
  379. " All_RAM : SimpleClassDiagrams",
  380. " make_initial_models : All_RAM",
  381. " pm_powerwindow : ProcessModel",
  382. " plant_to_EPN : All_RAM",
  383. " combine_EPN : All_RAM",
  384. " environment_to_EPN : All_RAM",
  385. " control_to_EPN : All_RAM",
  386. " ReachabilityGraph : SimpleClassDiagrams",
  387. " Architecture : SimpleClassDiagrams",
  388. " bfs : ActionLanguage",
  389. ]),
  390. "Ready for command...",
  391. # process_execute
  392. "Which process model do you want to execute?",
  393. "Model prefix to use?",
  394. # Manual transformation revise_req
  395. "Please perform manual operation \"revise_req\"",
  396. "Model loaded, ready for commands!",
  397. "Use 'help' command for a list of possible commands",
  398. "Please give your command.",
  399. "Waiting for model constructors...",
  400. "Please give your command.",
  401. # Manual transformation revise_plant
  402. "Please perform manual operation \"revise_plant\"",
  403. "Model loaded, ready for commands!",
  404. "Use 'help' command for a list of possible commands",
  405. "Please give your command.",
  406. "Waiting for model constructors...",
  407. "Please give your command.",
  408. # Manual transformation revise_environment
  409. "Please perform manual operation \"revise_environment\"",
  410. "Model loaded, ready for commands!",
  411. "Use 'help' command for a list of possible commands",
  412. "Please give your command.",
  413. "Waiting for model constructors...",
  414. "Please give your command.",
  415. # Manual transformation revise_control
  416. "Please perform manual operation \"revise_control\"",
  417. "Model loaded, ready for commands!",
  418. "Use 'help' command for a list of possible commands",
  419. "Please give your command.",
  420. "Waiting for model constructors...",
  421. "Please give your command.",
  422. # Manual transformation revise_query
  423. "Please perform manual operation \"revise_query\"",
  424. "Model loaded, ready for commands!",
  425. "Use 'help' command for a list of possible commands",
  426. "Please give your command.",
  427. "Waiting for model constructors...",
  428. "Please give your command.",
  429. # Manual transformation revise_architecture
  430. "Please perform manual operation \"revise_architecture\"",
  431. "Model loaded, ready for commands!",
  432. "Use 'help' command for a list of possible commands",
  433. "Please give your command.",
  434. "Waiting for model constructors...",
  435. "Please give your command.",
  436. # Computations happen without output
  437. # Finished, so we go back to the start
  438. "Ready for command...",
  439. ]))
  440. @slow
  441. def test_process_powerwindow_debug(self):
  442. self.assertTrue(run_file(all_files,
  443. [ "root", "root", "root",
  444. "model_add",
  445. "SimpleClassDiagrams",
  446. "ReachabilityGraph",
  447. ] + get_model_constructor_2("models/reachability_graph.mvc") + [
  448. "model_add",
  449. "SimpleClassDiagrams",
  450. "PetriNet",
  451. ] + get_model_constructor_2("integration/code/pn_design.mvc") + [
  452. "model_add",
  453. "SimpleClassDiagrams",
  454. "Encapsulated_PetriNet",
  455. ] + get_model_constructor_2("models/petrinet_ports.mvc") + [
  456. "model_add",
  457. "SimpleClassDiagrams",
  458. "PW_Plant",
  459. ] + get_model_constructor_2("models/plant_PW.mvc") + [
  460. "model_add",
  461. "SimpleClassDiagrams",
  462. "PW_Environment",
  463. ] + get_model_constructor_2("models/environment_PW.mvc") + [
  464. "model_add",
  465. "SimpleClassDiagrams",
  466. "PW_Control",
  467. ] + get_model_constructor_2("models/control_PW.mvc") + [
  468. "model_add",
  469. "SimpleClassDiagrams",
  470. "Requirements",
  471. ] + get_model_constructor_2("models/requirements.mvc") + [
  472. "model_add",
  473. "SimpleClassDiagrams",
  474. "Query",
  475. ] + get_model_constructor_2("models/query.mvc") + [
  476. "model_add",
  477. "ProcessModel",
  478. "pm_powerwindow",
  479. ] + get_model_constructor_2("models/pm_req_analyse_debug.mvc") + [
  480. "model_add",
  481. "SimpleClassDiagrams",
  482. "Architecture",
  483. ] + get_model_constructor_2("models/architecture.mvc") + [
  484. "model_list",
  485. "transformation_add_MT_language",
  486. "PetriNet",
  487. "Encapsulated_PetriNet",
  488. "PW_Plant",
  489. "PW_Control",
  490. "PW_Environment",
  491. "Requirements",
  492. "ReachabilityGraph",
  493. "Query",
  494. "Architecture",
  495. "",
  496. "All_RAM",
  497. "model_modify",
  498. "__merged_All_RAM",
  499. "instantiate",
  500. "Association",
  501. "CTRL2EPN_link",
  502. "PW_Control/State",
  503. "Encapsulated_PetriNet/Place",
  504. "instantiate",
  505. "Association",
  506. "CTRL2EPN_tlink",
  507. "PW_Control/Transition",
  508. "Encapsulated_PetriNet/Transition",
  509. "instantiate",
  510. "Association",
  511. "PLANT2EPN_link",
  512. "PW_Plant/State",
  513. "Encapsulated_PetriNet/Place",
  514. "instantiate",
  515. "Association",
  516. "PLANT2EPN_tlink",
  517. "PW_Plant/Transition",
  518. "Encapsulated_PetriNet/Transition",
  519. "instantiate",
  520. "Association",
  521. "ENV2EPN_link",
  522. "PW_Environment/Event",
  523. "Encapsulated_PetriNet/Place",
  524. "instantiate",
  525. "Association",
  526. "EPN2PN_place_link",
  527. "Encapsulated_PetriNet/Place",
  528. "PetriNet/Place",
  529. "instantiate",
  530. "Association",
  531. "EPN2PN_transition_link",
  532. "Encapsulated_PetriNet/Transition",
  533. "PetriNet/Transition",
  534. "exit",
  535. "transformation_RAMify",
  536. "__merged_All_RAM",
  537. "All_RAM",
  538. "transformation_add_MANUAL",
  539. "Requirements",
  540. "",
  541. "Requirements",
  542. "",
  543. "revise_req",
  544. "transformation_add_MANUAL",
  545. "Requirements",
  546. "PW_Environment",
  547. "",
  548. "PW_Environment",
  549. "",
  550. "revise_environment",
  551. "transformation_add_MANUAL",
  552. "Requirements",
  553. "PW_Plant",
  554. "",
  555. "PW_Plant",
  556. "",
  557. "revise_plant",
  558. "transformation_add_MANUAL",
  559. "Requirements",
  560. "PW_Control",
  561. "",
  562. "PW_Control",
  563. "",
  564. "revise_control",
  565. "transformation_add_MANUAL",
  566. "Requirements",
  567. "Query",
  568. "",
  569. "Query",
  570. "",
  571. "revise_query",
  572. "transformation_add_MANUAL",
  573. "Requirements",
  574. "Architecture",
  575. "",
  576. "Architecture",
  577. "",
  578. "revise_architecture",
  579. "transformation_add_MT",
  580. "All_RAM",
  581. "",
  582. "PW_Plant",
  583. "PW_Environment",
  584. "PW_Control",
  585. "Query",
  586. "Architecture",
  587. "Requirements",
  588. "",
  589. "make_initial_models",
  590. ] + get_model_constructor_2("models/initialize.mvc") + [
  591. "transformation_add_MT",
  592. "All_RAM",
  593. "PW_Plant",
  594. "",
  595. "Encapsulated_PetriNet",
  596. "",
  597. "plant_to_EPN",
  598. ] + get_model_constructor_2("models/plant_to_EPN.mvc") + [
  599. "transformation_add_MT",
  600. "All_RAM",
  601. "PW_Control",
  602. "",
  603. "Encapsulated_PetriNet",
  604. "",
  605. "control_to_EPN",
  606. ] + get_model_constructor_2("models/control_to_EPN.mvc") + [
  607. "transformation_add_MT",
  608. "All_RAM",
  609. "PW_Environment",
  610. "",
  611. "Encapsulated_PetriNet",
  612. "",
  613. "environment_to_EPN",
  614. ] + get_model_constructor_2("models/environment_to_EPN.mvc") + [
  615. "transformation_add_MT",
  616. "All_RAM",
  617. "Encapsulated_PetriNet",
  618. "Architecture",
  619. "",
  620. "Encapsulated_PetriNet",
  621. "",
  622. "combine_EPN",
  623. ] + get_model_constructor_2("models/combine_EPN.mvc") + [
  624. "transformation_add_MT",
  625. "All_RAM",
  626. "ReachabilityGraph",
  627. "Query",
  628. "",
  629. "",
  630. "match",
  631. ] + get_model_constructor_2("models/matches.mvc") + [
  632. "transformation_add_AL",
  633. "PetriNet",
  634. "",
  635. "ReachabilityGraph",
  636. "",
  637. "reachability",
  638. ] + get_constructor(open("models/reachability.alc", "r").read()) + [
  639. "transformation_add_AL",
  640. "PetriNet",
  641. "",
  642. "",
  643. "pn_print",
  644. ] + get_constructor(open("models/pn_print.alc", "r").read()) + [
  645. "transformation_add_AL",
  646. "Encapsulated_PetriNet",
  647. "",
  648. "",
  649. "epn_print",
  650. ] + get_constructor(open("models/epn_print.alc", "r").read()) + [
  651. "transformation_add_AL",
  652. "ReachabilityGraph",
  653. "",
  654. "",
  655. "bfs",
  656. ] + get_constructor(open("models/bfs.alc", "r").read()) + [
  657. "model_list",
  658. "process_execute",
  659. "pm_powerwindow",
  660. "pm_",
  661. # revise_req
  662. "upload",
  663. ] + get_model_constructor_2("models/requirements_model.mvc") + [
  664. "exit",
  665. #### First phase!
  666. # revise_plant
  667. "upload",
  668. ] + get_model_constructor_2("models/plant_model.mvc") + [
  669. "exit",
  670. # revise_environment
  671. "upload",
  672. ] + get_model_constructor_2("models/environment_model.mvc") + [
  673. "exit",
  674. # revise_control
  675. "upload",
  676. ] + get_model_constructor_2("models/control_model_wrong.mvc") + [
  677. "exit",
  678. # revise_query
  679. "upload",
  680. ] + get_model_constructor_2("models/query_model.mvc") + [
  681. "exit",
  682. # revise_architecture
  683. "upload",
  684. ] + get_model_constructor_2("models/architecture_model.mvc") + [
  685. "exit",
  686. #### Second phase!
  687. # revise_plant
  688. "upload",
  689. ] + get_model_constructor_2("models/plant_model.mvc") + [
  690. "exit",
  691. # revise_environment
  692. "upload",
  693. ] + get_model_constructor_2("models/environment_model.mvc") + [
  694. "exit",
  695. # revise_control
  696. "upload",
  697. ] + get_model_constructor_2("models/control_model.mvc") + [
  698. "exit",
  699. # revise_query
  700. "upload",
  701. ] + get_model_constructor_2("models/query_model.mvc") + [
  702. "exit",
  703. # revise_architecture
  704. "upload",
  705. ] + get_model_constructor_2("models/architecture_model.mvc") + [
  706. "exit",
  707. ],
  708. [ # bootup phase
  709. "Desired username for admin user?",
  710. "Desired password for admin user?",
  711. "Please repeat the password",
  712. "Passwords match!",
  713. "Welcome to the Model Management Interface v2.0!",
  714. "Use the 'help' command for a list of possible commands",
  715. "Ready for command...",
  716. # model_add * 10
  717. ] + [ "Creating new model!",
  718. "Model type?",
  719. "Model name?",
  720. "Waiting for model constructors...",
  721. "Model upload success!",
  722. "Ready for command...", ] * 10 + [
  723. # model_list
  724. model_list |
  725. set([
  726. " ReachabilityGraph : SimpleClassDiagrams",
  727. " PetriNet : SimpleClassDiagrams",
  728. " Encapsulated_PetriNet : SimpleClassDiagrams",
  729. " PW_Plant : SimpleClassDiagrams",
  730. " PW_Environment : SimpleClassDiagrams",
  731. " PW_Control : SimpleClassDiagrams",
  732. " Requirements : SimpleClassDiagrams",
  733. " Query : SimpleClassDiagrams",
  734. " pm_powerwindow : ProcessModel",
  735. " Architecture : SimpleClassDiagrams",
  736. ]),
  737. "Ready for command...",
  738. # transformation_add_MT_language
  739. "Formalisms to include (terminate with empty string)?",
  740. "Name of the RAMified transformation metamodel?",
  741. "Ready for command...",
  742. # model_modify
  743. "Which model do you want to modify?",
  744. "Model loaded, ready for commands!",
  745. "Use 'help' command for a list of possible commands",
  746. "Please give your command.",
  747. # instantiate * 7
  748. ] + [ "Type to instantiate?",
  749. "Name of new element?",
  750. "Source name?",
  751. "Destination name?",
  752. "Instantiation successful!",
  753. "Please give your command.", ] * 7 + [
  754. "Ready for command...",
  755. # transformation_RAMify
  756. "Which metamodel do you want to RAMify?",
  757. "Where do you want to store the RAMified metamodel?",
  758. "Ready for command...",
  759. # transformation_add_MANUAL * 6
  760. ] + [
  761. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  762. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  763. "Name of operation model?",
  764. "Ready for command...",
  765. ] * 6 + [
  766. # transformation_add_MT * 6
  767. ] + [
  768. "RAMified metamodel to use?",
  769. "Supported metamodels:",
  770. set([" PetriNet",
  771. " Encapsulated_PetriNet",
  772. " PW_Plant",
  773. " Architecture",
  774. " Query",
  775. " PW_Environment",
  776. " Requirements",
  777. " PW_Control",
  778. " ReachabilityGraph",
  779. ]),
  780. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  781. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  782. "Name of new operation?",
  783. "Waiting for model constructors...",
  784. "Ready for command...",
  785. ] * 6 + [
  786. # transformation_add_AL * 4
  787. ] + [ "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  788. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  789. "Name of operation model?",
  790. "Waiting for model constructors...",
  791. "Ready for command...", ] * 4 + [
  792. # model_list
  793. model_list |
  794. set([
  795. " PetriNet : SimpleClassDiagrams",
  796. " Encapsulated_PetriNet : SimpleClassDiagrams",
  797. " PW_Plant : SimpleClassDiagrams",
  798. " PW_Environment : SimpleClassDiagrams",
  799. " PW_Control : SimpleClassDiagrams",
  800. " Requirements : SimpleClassDiagrams",
  801. " Query : SimpleClassDiagrams",
  802. " reachability : ActionLanguage",
  803. " revise_req : ManualOperation",
  804. " revise_plant : ManualOperation",
  805. " revise_control : ManualOperation",
  806. " revise_environment : ManualOperation",
  807. " revise_query : ManualOperation",
  808. " revise_architecture : ManualOperation",
  809. " __merged_reachability : SimpleClassDiagrams",
  810. " __merged_revise_req : SimpleClassDiagrams",
  811. " __merged_All_RAM : SimpleClassDiagrams",
  812. " __merged_revise_plant : SimpleClassDiagrams",
  813. " __merged_revise_control : SimpleClassDiagrams",
  814. " __merged_revise_environment : SimpleClassDiagrams",
  815. " __merged_revise_query : SimpleClassDiagrams",
  816. " __merged_revise_architecture : SimpleClassDiagrams",
  817. " __merged_pn_print : SimpleClassDiagrams",
  818. " __merged_epn_print : SimpleClassDiagrams",
  819. " __merged_bfs : SimpleClassDiagrams",
  820. " pn_print : ActionLanguage",
  821. " epn_print : ActionLanguage",
  822. " match : All_RAM",
  823. " All_RAM : SimpleClassDiagrams",
  824. " make_initial_models : All_RAM",
  825. " pm_powerwindow : ProcessModel",
  826. " plant_to_EPN : All_RAM",
  827. " combine_EPN : All_RAM",
  828. " environment_to_EPN : All_RAM",
  829. " control_to_EPN : All_RAM",
  830. " ReachabilityGraph : SimpleClassDiagrams",
  831. " Architecture : SimpleClassDiagrams",
  832. " bfs : ActionLanguage",
  833. ]),
  834. "Ready for command...",
  835. # process_execute
  836. "Which process model do you want to execute?",
  837. "Model prefix to use?",
  838. # Manual transformation revise_req
  839. "Please perform manual operation \"revise_req\"",
  840. "Model loaded, ready for commands!",
  841. "Use 'help' command for a list of possible commands",
  842. "Please give your command.",
  843. "Waiting for model constructors...",
  844. "Please give your command.",
  845. # Manual transformation revise_plant
  846. "Please perform manual operation \"revise_plant\"",
  847. "Model loaded, ready for commands!",
  848. "Use 'help' command for a list of possible commands",
  849. "Please give your command.",
  850. "Waiting for model constructors...",
  851. "Please give your command.",
  852. # Manual transformation revise_environment
  853. "Please perform manual operation \"revise_environment\"",
  854. "Model loaded, ready for commands!",
  855. "Use 'help' command for a list of possible commands",
  856. "Please give your command.",
  857. "Waiting for model constructors...",
  858. "Please give your command.",
  859. # Manual transformation revise_control
  860. "Please perform manual operation \"revise_control\"",
  861. "Model loaded, ready for commands!",
  862. "Use 'help' command for a list of possible commands",
  863. "Please give your command.",
  864. "Waiting for model constructors...",
  865. "Please give your command.",
  866. # Manual transformation revise_query
  867. "Please perform manual operation \"revise_query\"",
  868. "Model loaded, ready for commands!",
  869. "Use 'help' command for a list of possible commands",
  870. "Please give your command.",
  871. "Waiting for model constructors...",
  872. "Please give your command.",
  873. # Manual transformation revise_architecture
  874. "Please perform manual operation \"revise_architecture\"",
  875. "Model loaded, ready for commands!",
  876. "Use 'help' command for a list of possible commands",
  877. "Please give your command.",
  878. "Waiting for model constructors...",
  879. "Please give your command.",
  880. # Computations happen without output
  881. # Got an error!
  882. "Found error path:",
  883. None,
  884. # Manual transformation revise_plant
  885. "Please perform manual operation \"revise_plant\"",
  886. "Model loaded, ready for commands!",
  887. "Use 'help' command for a list of possible commands",
  888. "Please give your command.",
  889. "Waiting for model constructors...",
  890. "Please give your command.",
  891. # Manual transformation revise_environment
  892. "Please perform manual operation \"revise_environment\"",
  893. "Model loaded, ready for commands!",
  894. "Use 'help' command for a list of possible commands",
  895. "Please give your command.",
  896. "Waiting for model constructors...",
  897. "Please give your command.",
  898. # Manual transformation revise_control
  899. "Please perform manual operation \"revise_control\"",
  900. "Model loaded, ready for commands!",
  901. "Use 'help' command for a list of possible commands",
  902. "Please give your command.",
  903. "Waiting for model constructors...",
  904. "Please give your command.",
  905. # Manual transformation revise_query
  906. "Please perform manual operation \"revise_query\"",
  907. "Model loaded, ready for commands!",
  908. "Use 'help' command for a list of possible commands",
  909. "Please give your command.",
  910. "Waiting for model constructors...",
  911. "Please give your command.",
  912. # Manual transformation revise_architecture
  913. "Please perform manual operation \"revise_architecture\"",
  914. "Model loaded, ready for commands!",
  915. "Use 'help' command for a list of possible commands",
  916. "Please give your command.",
  917. "Waiting for model constructors...",
  918. "Please give your command.",
  919. # Finished, so we go back to the start
  920. "Ready for command...",
  921. ]))
  922. @slow
  923. def test_process_powerwindow_slow(self):
  924. self.assertTrue(run_file(all_files,
  925. [ "root", "root", "root",
  926. "model_add",
  927. "SimpleClassDiagrams",
  928. "ReachabilityGraph",
  929. ] + get_model_constructor_2("models/reachability_graph.mvc") + [
  930. "model_add",
  931. "SimpleClassDiagrams",
  932. "PetriNet",
  933. ] + get_model_constructor_2("integration/code/pn_design.mvc") + [
  934. "model_add",
  935. "SimpleClassDiagrams",
  936. "Encapsulated_PetriNet",
  937. ] + get_model_constructor_2("models/petrinet_ports.mvc") + [
  938. "model_add",
  939. "SimpleClassDiagrams",
  940. "PW_Plant",
  941. ] + get_model_constructor_2("models/plant_PW.mvc") + [
  942. "model_add",
  943. "SimpleClassDiagrams",
  944. "PW_Environment",
  945. ] + get_model_constructor_2("models/environment_PW.mvc") + [
  946. "model_add",
  947. "SimpleClassDiagrams",
  948. "PW_Control",
  949. ] + get_model_constructor_2("models/control_PW.mvc") + [
  950. "model_add",
  951. "SimpleClassDiagrams",
  952. "Requirements",
  953. ] + get_model_constructor_2("models/requirements.mvc") + [
  954. "model_add",
  955. "SimpleClassDiagrams",
  956. "Query",
  957. ] + get_model_constructor_2("models/query.mvc") + [
  958. "model_add",
  959. "ProcessModel",
  960. "pm_powerwindow",
  961. ] + get_model_constructor_2("models/pm_req_analyse.mvc") + [
  962. "model_add",
  963. "SimpleClassDiagrams",
  964. "Architecture",
  965. ] + get_model_constructor_2("models/architecture.mvc") + [
  966. "model_list",
  967. "transformation_add_MT_language",
  968. "PetriNet",
  969. "Encapsulated_PetriNet",
  970. "PW_Plant",
  971. "PW_Control",
  972. "PW_Environment",
  973. "Requirements",
  974. "ReachabilityGraph",
  975. "Query",
  976. "Architecture",
  977. "",
  978. "All_RAM",
  979. "model_modify",
  980. "__merged_All_RAM",
  981. "instantiate",
  982. "Association",
  983. "CTRL2EPN_link",
  984. "PW_Control/State",
  985. "Encapsulated_PetriNet/Place",
  986. "instantiate",
  987. "Association",
  988. "CTRL2EPN_tlink",
  989. "PW_Control/Transition",
  990. "Encapsulated_PetriNet/Transition",
  991. "instantiate",
  992. "Association",
  993. "PLANT2EPN_link",
  994. "PW_Plant/State",
  995. "Encapsulated_PetriNet/Place",
  996. "instantiate",
  997. "Association",
  998. "PLANT2EPN_tlink",
  999. "PW_Plant/Transition",
  1000. "Encapsulated_PetriNet/Transition",
  1001. "instantiate",
  1002. "Association",
  1003. "ENV2EPN_link",
  1004. "PW_Environment/Event",
  1005. "Encapsulated_PetriNet/Place",
  1006. "instantiate",
  1007. "Association",
  1008. "EPN2PN_place_link",
  1009. "Encapsulated_PetriNet/Place",
  1010. "PetriNet/Place",
  1011. "instantiate",
  1012. "Association",
  1013. "EPN2PN_transition_link",
  1014. "Encapsulated_PetriNet/Transition",
  1015. "PetriNet/Transition",
  1016. "exit",
  1017. "transformation_RAMify",
  1018. "__merged_All_RAM",
  1019. "All_RAM",
  1020. "transformation_add_MANUAL",
  1021. "Requirements",
  1022. "",
  1023. "Requirements",
  1024. "",
  1025. "revise_req",
  1026. "transformation_add_MANUAL",
  1027. "Requirements",
  1028. "PW_Environment",
  1029. "",
  1030. "PW_Environment",
  1031. "",
  1032. "revise_environment",
  1033. "transformation_add_MANUAL",
  1034. "Requirements",
  1035. "PW_Plant",
  1036. "",
  1037. "PW_Plant",
  1038. "",
  1039. "revise_plant",
  1040. "transformation_add_MANUAL",
  1041. "Requirements",
  1042. "PW_Control",
  1043. "",
  1044. "PW_Control",
  1045. "",
  1046. "revise_control",
  1047. "transformation_add_MANUAL",
  1048. "Requirements",
  1049. "Query",
  1050. "",
  1051. "Query",
  1052. "",
  1053. "revise_query",
  1054. "transformation_add_MANUAL",
  1055. "Requirements",
  1056. "Architecture",
  1057. "",
  1058. "Architecture",
  1059. "",
  1060. "revise_architecture",
  1061. "transformation_add_MT",
  1062. "All_RAM",
  1063. "",
  1064. "PW_Plant",
  1065. "PW_Environment",
  1066. "PW_Control",
  1067. "Query",
  1068. "Architecture",
  1069. "Requirements",
  1070. "",
  1071. "make_initial_models",
  1072. ] + get_model_constructor_2("models/initialize.mvc") + [
  1073. "transformation_add_MT",
  1074. "All_RAM",
  1075. "PW_Plant",
  1076. "",
  1077. "Encapsulated_PetriNet",
  1078. "",
  1079. "plant_to_EPN",
  1080. ] + get_model_constructor_2("models/plant_to_EPN.mvc") + [
  1081. "transformation_add_MT",
  1082. "All_RAM",
  1083. "PW_Control",
  1084. "",
  1085. "Encapsulated_PetriNet",
  1086. "",
  1087. "control_to_EPN",
  1088. ] + get_model_constructor_2("models/control_to_EPN.mvc") + [
  1089. "transformation_add_MT",
  1090. "All_RAM",
  1091. "PW_Environment",
  1092. "",
  1093. "Encapsulated_PetriNet",
  1094. "",
  1095. "environment_to_EPN",
  1096. ] + get_model_constructor_2("models/environment_to_EPN.mvc") + [
  1097. "transformation_add_MT",
  1098. "All_RAM",
  1099. "Encapsulated_PetriNet",
  1100. "Architecture",
  1101. "",
  1102. "Encapsulated_PetriNet",
  1103. "",
  1104. "combine_EPN",
  1105. ] + get_model_constructor_2("models/combine_EPN.mvc") + [
  1106. "transformation_add_MT",
  1107. "All_RAM",
  1108. "ReachabilityGraph",
  1109. "Query",
  1110. "",
  1111. "",
  1112. "match",
  1113. ] + get_model_constructor_2("models/matches.mvc") + [
  1114. "transformation_add_AL",
  1115. "PetriNet",
  1116. "",
  1117. "ReachabilityGraph",
  1118. "",
  1119. "reachability",
  1120. ] + get_constructor(open("models/reachability.alc", "r").read()) + [
  1121. "transformation_add_AL",
  1122. "ReachabilityGraph",
  1123. "",
  1124. "",
  1125. "bfs",
  1126. ] + get_constructor(open("models/bfs.alc", "r").read()) + [
  1127. "model_list",
  1128. "process_execute",
  1129. "pm_powerwindow",
  1130. "pm_",
  1131. # revise_req
  1132. "upload",
  1133. ] + get_model_constructor_2("models/requirements_model.mvc") + [
  1134. "exit",
  1135. #### First phase
  1136. # revise_plant
  1137. "upload",
  1138. ] + get_model_constructor_2("models/plant_model.mvc") + [
  1139. "exit",
  1140. # revise_environment
  1141. "upload",
  1142. ] + get_model_constructor_2("models/environment_model.mvc") + [
  1143. "exit",
  1144. # revise_control
  1145. "upload",
  1146. ] + get_model_constructor_2("models/control_model_wrong.mvc") + [
  1147. "exit",
  1148. # revise_query
  1149. "upload",
  1150. ] + get_model_constructor_2("models/query_model.mvc") + [
  1151. "exit",
  1152. # revise_architecture
  1153. "upload",
  1154. ] + get_model_constructor_2("models/architecture_model.mvc") + [
  1155. "exit",
  1156. #### Second phase
  1157. # revise_plant
  1158. "upload",
  1159. ] + get_model_constructor_2("models/plant_model.mvc") + [
  1160. "exit",
  1161. # revise_environment
  1162. "upload",
  1163. ] + get_model_constructor_2("models/environment_model.mvc") + [
  1164. "exit",
  1165. # revise_control
  1166. "upload",
  1167. ] + get_model_constructor_2("models/control_model.mvc") + [
  1168. "exit",
  1169. # revise_query
  1170. "upload",
  1171. ] + get_model_constructor_2("models/query_model.mvc") + [
  1172. "exit",
  1173. # revise_architecture
  1174. "upload",
  1175. ] + get_model_constructor_2("models/architecture_model.mvc") + [
  1176. "exit",
  1177. ],
  1178. [ # bootup phase
  1179. "Desired username for admin user?",
  1180. "Desired password for admin user?",
  1181. "Please repeat the password",
  1182. "Passwords match!",
  1183. "Welcome to the Model Management Interface v2.0!",
  1184. "Use the 'help' command for a list of possible commands",
  1185. "Ready for command...",
  1186. # model_add * 10
  1187. ] + [ "Creating new model!",
  1188. "Model type?",
  1189. "Model name?",
  1190. "Waiting for model constructors...",
  1191. "Model upload success!",
  1192. "Ready for command...", ] * 10 + [
  1193. # model_list
  1194. model_list |
  1195. set([
  1196. " ReachabilityGraph : SimpleClassDiagrams",
  1197. " PetriNet : SimpleClassDiagrams",
  1198. " Encapsulated_PetriNet : SimpleClassDiagrams",
  1199. " PW_Plant : SimpleClassDiagrams",
  1200. " PW_Environment : SimpleClassDiagrams",
  1201. " PW_Control : SimpleClassDiagrams",
  1202. " Requirements : SimpleClassDiagrams",
  1203. " Query : SimpleClassDiagrams",
  1204. " pm_powerwindow : ProcessModel",
  1205. " Architecture : SimpleClassDiagrams",
  1206. ]),
  1207. "Ready for command...",
  1208. # transformation_add_MT_language
  1209. "Formalisms to include (terminate with empty string)?",
  1210. "Name of the RAMified transformation metamodel?",
  1211. "Ready for command...",
  1212. # model_modify
  1213. "Which model do you want to modify?",
  1214. "Model loaded, ready for commands!",
  1215. "Use 'help' command for a list of possible commands",
  1216. "Please give your command.",
  1217. # instantiate * 7
  1218. ] + [ "Type to instantiate?",
  1219. "Name of new element?",
  1220. "Source name?",
  1221. "Destination name?",
  1222. "Instantiation successful!",
  1223. "Please give your command.", ] * 7 + [
  1224. "Ready for command...",
  1225. # transformation_RAMify
  1226. "Which metamodel do you want to RAMify?",
  1227. "Where do you want to store the RAMified metamodel?",
  1228. "Ready for command...",
  1229. # transformation_add_MANUAL * 6
  1230. ] + [
  1231. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  1232. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  1233. "Name of operation model?",
  1234. "Ready for command...",
  1235. ] * 6 + [
  1236. # transformation_add_MT * 6
  1237. ] + [
  1238. "RAMified metamodel to use?",
  1239. "Supported metamodels:",
  1240. set([" PetriNet",
  1241. " Encapsulated_PetriNet",
  1242. " PW_Plant",
  1243. " Architecture",
  1244. " Query",
  1245. " PW_Environment",
  1246. " Requirements",
  1247. " PW_Control",
  1248. " ReachabilityGraph",
  1249. ]),
  1250. "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  1251. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  1252. "Name of new operation?",
  1253. "Waiting for model constructors...",
  1254. "Ready for command...",
  1255. ] * 6 + [
  1256. # transformation_add_AL * 2
  1257. ] + [ "Which metamodels do you want to use as source for the operation (empty string to finish)?",
  1258. "Which metamodels do you want to use as target for the operation (empty string to finish)?",
  1259. "Name of operation model?",
  1260. "Waiting for model constructors...",
  1261. "Ready for command...", ] * 2 + [
  1262. # model_list
  1263. model_list |
  1264. set([
  1265. " PetriNet : SimpleClassDiagrams",
  1266. " Encapsulated_PetriNet : SimpleClassDiagrams",
  1267. " PW_Plant : SimpleClassDiagrams",
  1268. " PW_Environment : SimpleClassDiagrams",
  1269. " PW_Control : SimpleClassDiagrams",
  1270. " Requirements : SimpleClassDiagrams",
  1271. " Query : SimpleClassDiagrams",
  1272. " reachability : ActionLanguage",
  1273. " revise_req : ManualOperation",
  1274. " revise_plant : ManualOperation",
  1275. " revise_control : ManualOperation",
  1276. " revise_environment : ManualOperation",
  1277. " revise_query : ManualOperation",
  1278. " revise_architecture : ManualOperation",
  1279. " __merged_bfs : SimpleClassDiagrams",
  1280. " __merged_reachability : SimpleClassDiagrams",
  1281. " __merged_revise_req : SimpleClassDiagrams",
  1282. " __merged_All_RAM : SimpleClassDiagrams",
  1283. " __merged_revise_plant : SimpleClassDiagrams",
  1284. " __merged_revise_control : SimpleClassDiagrams",
  1285. " __merged_revise_environment : SimpleClassDiagrams",
  1286. " __merged_revise_query : SimpleClassDiagrams",
  1287. " __merged_revise_architecture : SimpleClassDiagrams",
  1288. " match : All_RAM",
  1289. " All_RAM : SimpleClassDiagrams",
  1290. " make_initial_models : All_RAM",
  1291. " pm_powerwindow : ProcessModel",
  1292. " plant_to_EPN : All_RAM",
  1293. " combine_EPN : All_RAM",
  1294. " environment_to_EPN : All_RAM",
  1295. " control_to_EPN : All_RAM",
  1296. " ReachabilityGraph : SimpleClassDiagrams",
  1297. " Architecture : SimpleClassDiagrams",
  1298. " bfs : ActionLanguage",
  1299. ]),
  1300. "Ready for command...",
  1301. # process_execute
  1302. "Which process model do you want to execute?",
  1303. "Model prefix to use?",
  1304. # Manual transformation revise_req
  1305. "Please perform manual operation \"revise_req\"",
  1306. "Model loaded, ready for commands!",
  1307. "Use 'help' command for a list of possible commands",
  1308. "Please give your command.",
  1309. "Waiting for model constructors...",
  1310. "Please give your command.",
  1311. # Manual transformation revise_plant
  1312. "Please perform manual operation \"revise_plant\"",
  1313. "Model loaded, ready for commands!",
  1314. "Use 'help' command for a list of possible commands",
  1315. "Please give your command.",
  1316. "Waiting for model constructors...",
  1317. "Please give your command.",
  1318. # Manual transformation revise_environment
  1319. "Please perform manual operation \"revise_environment\"",
  1320. "Model loaded, ready for commands!",
  1321. "Use 'help' command for a list of possible commands",
  1322. "Please give your command.",
  1323. "Waiting for model constructors...",
  1324. "Please give your command.",
  1325. # Manual transformation revise_control
  1326. "Please perform manual operation \"revise_control\"",
  1327. "Model loaded, ready for commands!",
  1328. "Use 'help' command for a list of possible commands",
  1329. "Please give your command.",
  1330. "Waiting for model constructors...",
  1331. "Please give your command.",
  1332. # Manual transformation revise_query
  1333. "Please perform manual operation \"revise_query\"",
  1334. "Model loaded, ready for commands!",
  1335. "Use 'help' command for a list of possible commands",
  1336. "Please give your command.",
  1337. "Waiting for model constructors...",
  1338. "Please give your command.",
  1339. # Manual transformation revise_architecture
  1340. "Please perform manual operation \"revise_architecture\"",
  1341. "Model loaded, ready for commands!",
  1342. "Use 'help' command for a list of possible commands",
  1343. "Please give your command.",
  1344. "Waiting for model constructors...",
  1345. "Please give your command.",
  1346. # Computations happen without output
  1347. #### ERROR detected: go back to the start to fix it
  1348. "Found error path:",
  1349. None,
  1350. # Manual transformation revise_plant
  1351. "Please perform manual operation \"revise_plant\"",
  1352. "Model loaded, ready for commands!",
  1353. "Use 'help' command for a list of possible commands",
  1354. "Please give your command.",
  1355. "Waiting for model constructors...",
  1356. "Please give your command.",
  1357. # Manual transformation revise_environment
  1358. "Please perform manual operation \"revise_environment\"",
  1359. "Model loaded, ready for commands!",
  1360. "Use 'help' command for a list of possible commands",
  1361. "Please give your command.",
  1362. "Waiting for model constructors...",
  1363. "Please give your command.",
  1364. # Manual transformation revise_control
  1365. "Please perform manual operation \"revise_control\"",
  1366. "Model loaded, ready for commands!",
  1367. "Use 'help' command for a list of possible commands",
  1368. "Please give your command.",
  1369. "Waiting for model constructors...",
  1370. "Please give your command.",
  1371. # Manual transformation revise_query
  1372. "Please perform manual operation \"revise_query\"",
  1373. "Model loaded, ready for commands!",
  1374. "Use 'help' command for a list of possible commands",
  1375. "Please give your command.",
  1376. "Waiting for model constructors...",
  1377. "Please give your command.",
  1378. # Manual transformation revise_architecture
  1379. "Please perform manual operation \"revise_architecture\"",
  1380. "Model loaded, ready for commands!",
  1381. "Use 'help' command for a list of possible commands",
  1382. "Please give your command.",
  1383. "Waiting for model constructors...",
  1384. "Please give your command.",
  1385. # Finished, so we go back to the start
  1386. "Ready for command...",
  1387. ]))