test_powerwindow.py 63 KB

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