|
@@ -2131,3 +2131,131 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
]),
|
|
|
"Ready for command...",
|
|
|
]))
|
|
|
+
|
|
|
+ def test_process_powerwindow(self):
|
|
|
+ self.assertTrue(run_file(all_files,
|
|
|
+ [ "root", "root", "root",
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ ] + get_model_constructor(open("integration/code/reachability_graph.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "PetriNet",
|
|
|
+ ] + get_model_constructor(open("integration/code/pn_design.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "Encapsulated_PetriNet",
|
|
|
+ ] + get_model_constructor(open("models/petrinet_ports.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "Requirement",
|
|
|
+ ] + get_model_constructor(open("models/requirements.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "PW_Plant",
|
|
|
+ ] + get_model_constructor(open("models/plant_PW.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "PW_Plant",
|
|
|
+ "plant_model",
|
|
|
+ ] + get_model_constructor(open("models/plant_model.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "PW_Environment",
|
|
|
+ ] + get_model_constructor(open("models/environment_PW.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "PW_Plant",
|
|
|
+ "environment_model",
|
|
|
+ ] + get_model_constructor(open("models/environment_model.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "SimpleClassDiagrams",
|
|
|
+ "PW_Control",
|
|
|
+ ] + get_model_constructor(open("models/control_PW.mvc", "r").read()) + [
|
|
|
+ "model_add",
|
|
|
+ "PW_Plant",
|
|
|
+ "control_model",
|
|
|
+ ] + get_model_constructor(open("models/control_model.mvc", "r").read()) + [
|
|
|
+ "model_list",
|
|
|
+ "transformation_add_MT_language",
|
|
|
+ "PetriNet",
|
|
|
+ "Encapsulated_PetriNet",
|
|
|
+ "PW_Plant",
|
|
|
+ "PW_Environment",
|
|
|
+ "PW_Control",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "All_RAM",
|
|
|
+ "transformation_add_MT",
|
|
|
+ "All_RAM",
|
|
|
+ "",
|
|
|
+ "PW_Plant",
|
|
|
+ "PW_Control",
|
|
|
+ "PW_Environment",
|
|
|
+ "",
|
|
|
+ "initialize_PN",
|
|
|
+ ] + get_model_constructor(open("models/initialize_all.mvc", "r").read()) + [
|
|
|
+ "transformation_add_MANUAL",
|
|
|
+ "Requirement",
|
|
|
+ "PW_Plant",
|
|
|
+ "",
|
|
|
+ "PW_Plant",
|
|
|
+ "",
|
|
|
+ "refine_Plant",
|
|
|
+ "transformation_add_MT",
|
|
|
+ "All_RAM",
|
|
|
+ "PW_Plant",
|
|
|
+ "",
|
|
|
+ "Encapsulated_PetriNet",
|
|
|
+ "",
|
|
|
+ "Plant2EPN",
|
|
|
+ ] + get_model_constructor(open("models/plant_to_EPN", "r").read()) + [
|
|
|
+ "transformation_add_AL",
|
|
|
+ "PetriNet",
|
|
|
+ "",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "reachability_analyse",
|
|
|
+ ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
|
|
|
+ "transformation_add_MT",
|
|
|
+ "All_RAM",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "reachability_print",
|
|
|
+ ] + get_model_constructor(open("integration/code/reachabilitygraph_print.mvc", "r").read()) + [
|
|
|
+ "model_list",
|
|
|
+ ],
|
|
|
+ [ # bootup phase
|
|
|
+ "Desired username for admin user?",
|
|
|
+ "Desired password for admin user?",
|
|
|
+ "Please repeat the password",
|
|
|
+ "Passwords match!",
|
|
|
+ "Welcome to the Model Management Interface v2.0!",
|
|
|
+ "Use the 'help' command for a list of possible commands",
|
|
|
+ "Ready for command...",
|
|
|
+ # model_add * 10
|
|
|
+ ] + [ "Creating new model!",
|
|
|
+ "Model type?",
|
|
|
+ "Model name?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Model upload success!",
|
|
|
+ "Ready for command...", ] * 10 + [
|
|
|
+ # model_list
|
|
|
+ model_list |
|
|
|
+ set([
|
|
|
+ " PetriNet : SimpleClassDiagrams",
|
|
|
+ " Encapsulated_PetriNet : SimpleClassDiagrams",
|
|
|
+ " PW_Plant : SimpleClassDiagrams",
|
|
|
+ " PW_Environment : SimpleClassDiagrams",
|
|
|
+ " PW_Control : SimpleClassDiagrams",
|
|
|
+ " plant_model : PW_Plant",
|
|
|
+ " control_model : PW_Control",
|
|
|
+ " environment_model : PW_Environment",
|
|
|
+ " Requirement : SimpleClassDiagrams",
|
|
|
+ " ReachabilityGraph : SimpleClassDiagrams",]),
|
|
|
+ "Ready for command...",
|
|
|
+ # transformation_add_MT_language
|
|
|
+ "Formalisms to include (terminate with empty string)?",
|
|
|
+ "Name of the RAMified transformation metamodel?",
|
|
|
+ "Ready for command...",
|
|
|
+ ]))
|