|
@@ -70,10 +70,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"SimpleClassDiagrams",
|
|
|
"Query",
|
|
|
] + get_model_constructor(open("models/query.mvc", "r").read()) + [
|
|
|
- "model_add",
|
|
|
- "SimpleClassDiagrams",
|
|
|
- "Network",
|
|
|
- ] + get_model_constructor(open("models/network.mvc", "r").read()) + [
|
|
|
"model_add",
|
|
|
"ProcessModel",
|
|
|
"pm_powerwindow",
|
|
@@ -87,7 +83,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"PW_Environment",
|
|
|
"Requirements",
|
|
|
"ReachabilityGraph",
|
|
|
- "Network",
|
|
|
"Query",
|
|
|
"",
|
|
|
"All_RAM",
|
|
@@ -95,14 +90,19 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"__merged_All_RAM",
|
|
|
"instantiate",
|
|
|
"Association",
|
|
|
- "C2P_PlaceLink",
|
|
|
+ "CTRL2EPN/link",
|
|
|
"PW_Control/State",
|
|
|
"Encapsulated_PetriNet/Place",
|
|
|
"instantiate",
|
|
|
"Association",
|
|
|
- "C2P_TransitionLink",
|
|
|
- "PW_Control/Transition",
|
|
|
- "Encapsulated_PetriNet/Transition",
|
|
|
+ "PLANT2EPN/link",
|
|
|
+ "PW_Plant/State",
|
|
|
+ "Encapsulated_PetriNet/Place",
|
|
|
+ "instantiate",
|
|
|
+ "Association",
|
|
|
+ "ENV2EPN/link",
|
|
|
+ "PW_Environment/Event",
|
|
|
+ "Encapsulated_PetriNet/Place",
|
|
|
"exit",
|
|
|
"transformation_RAMify",
|
|
|
"__merged_All_RAM",
|
|
@@ -130,12 +130,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"PW_Control",
|
|
|
"",
|
|
|
"refine_control",
|
|
|
- "transformation_add_MANUAL",
|
|
|
- "Network",
|
|
|
- "",
|
|
|
- "Network",
|
|
|
- "",
|
|
|
- "refine_network",
|
|
|
"transformation_add_MANUAL",
|
|
|
"Query",
|
|
|
"",
|
|
@@ -148,7 +142,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"PW_Plant",
|
|
|
"PW_Environment",
|
|
|
"PW_Control",
|
|
|
- "Network",
|
|
|
"Query",
|
|
|
"",
|
|
|
"make_initial_models",
|
|
@@ -169,6 +162,14 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"",
|
|
|
"control_to_EPN",
|
|
|
] + get_model_constructor(open("models/control_to_EPN.mvc", "r").read()) + [
|
|
|
+ "transformation_add_MT",
|
|
|
+ "All_RAM",
|
|
|
+ "PW_Environment",
|
|
|
+ "",
|
|
|
+ "Encapsulated_PetriNet",
|
|
|
+ "",
|
|
|
+ "environment_to_EPN",
|
|
|
+ ] + get_constructor(open("models/environment_to_EPN.mvc", "r").read()) + [
|
|
|
"transformation_add_AL",
|
|
|
"PetriNet",
|
|
|
"",
|
|
@@ -176,13 +177,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"",
|
|
|
"reachability",
|
|
|
] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
|
|
|
- "transformation_add_AL",
|
|
|
- "PW_Environment",
|
|
|
- "",
|
|
|
- "Encapsulated_PetriNet",
|
|
|
- "",
|
|
|
- "environment_to_EPN",
|
|
|
- ] + get_constructor(open("models/environment_to_EPN.alc", "r").read()) + [
|
|
|
"model_list",
|
|
|
],
|
|
|
[ # bootup phase
|
|
@@ -193,13 +187,13 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Welcome to the Model Management Interface v2.0!",
|
|
|
"Use the 'help' command for a list of possible commands",
|
|
|
"Ready for command...",
|
|
|
- # model_add * 10
|
|
|
+ # model_add * 9
|
|
|
] + [ "Creating new model!",
|
|
|
"Model type?",
|
|
|
"Model name?",
|
|
|
"Waiting for model constructors...",
|
|
|
"Model upload success!",
|
|
|
- "Ready for command...", ] * 10 + [
|
|
|
+ "Ready for command...", ] * 9 + [
|
|
|
# model_list
|
|
|
model_list |
|
|
|
set([
|
|
@@ -211,7 +205,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
" PW_Control : SimpleClassDiagrams",
|
|
|
" Requirements : SimpleClassDiagrams",
|
|
|
" Query : SimpleClassDiagrams",
|
|
|
- " Network : SimpleClassDiagrams",
|
|
|
" pm_powerwindow : ProcessModel",
|
|
|
]),
|
|
|
"Ready for command...",
|
|
@@ -224,20 +217,13 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Model loaded, ready for commands!",
|
|
|
"Use 'help' command for a list of possible commands",
|
|
|
"Please give your command.",
|
|
|
- # instantiate 1
|
|
|
- "Type to instantiate?",
|
|
|
- "Name of new element?",
|
|
|
- "Source name?",
|
|
|
- "Destination name?",
|
|
|
- "Instantiation successful!",
|
|
|
- "Please give your command.",
|
|
|
- # instantiate 2
|
|
|
- "Type to instantiate?",
|
|
|
- "Name of new element?",
|
|
|
- "Source name?",
|
|
|
- "Destination name?",
|
|
|
- "Instantiation successful!",
|
|
|
- "Please give your command.",
|
|
|
+ # instantiate * 3
|
|
|
+ ] + [ "Type to instantiate?",
|
|
|
+ "Name of new element?",
|
|
|
+ "Source name?",
|
|
|
+ "Destination name?",
|
|
|
+ "Instantiation successful!",
|
|
|
+ "Please give your command.", ] * 3 + [
|
|
|
"Ready for command...",
|
|
|
# transformation_RAMify
|
|
|
"Which metamodel do you want to RAMify?",
|
|
@@ -251,7 +237,7 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Name of Manual operation model?",
|
|
|
"Ready for command...",
|
|
|
] + [
|
|
|
- # transformation_add_MANUAL * 5
|
|
|
+ # transformation_add_MANUAL * 4
|
|
|
] + [
|
|
|
"Which metamodels do you want to use as source for the manual operation (empty string to finish)?",
|
|
|
"Model added as source",
|
|
@@ -259,14 +245,13 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Model added as target",
|
|
|
"Name of Manual operation model?",
|
|
|
"Ready for command...",
|
|
|
- ] * 5 + [
|
|
|
+ ] * 4 + [
|
|
|
# transformation_add_MT
|
|
|
"RAMified metamodel to use?",
|
|
|
"Supported metamodels:",
|
|
|
set([" PetriNet",
|
|
|
" Encapsulated_PetriNet",
|
|
|
" PW_Plant",
|
|
|
- " Network",
|
|
|
" Query",
|
|
|
" PW_Environment",
|
|
|
" Requirements",
|
|
@@ -289,7 +274,6 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Supported metamodels:",
|
|
|
set([" PetriNet",
|
|
|
" Encapsulated_PetriNet",
|
|
|
- " Network",
|
|
|
" Query",
|
|
|
" PW_Plant",
|
|
|
" PW_Environment",
|
|
@@ -306,42 +290,33 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
"Waiting for model constructors...",
|
|
|
"Ready for command...",
|
|
|
# transformation_add_MT
|
|
|
- "RAMified metamodel to use?",
|
|
|
- "Supported metamodels:",
|
|
|
- set([" PetriNet",
|
|
|
- " Encapsulated_PetriNet",
|
|
|
- " Network",
|
|
|
- " Query",
|
|
|
- " PW_Plant",
|
|
|
- " PW_Environment",
|
|
|
- " Requirements",
|
|
|
- " PW_Control",
|
|
|
- " ReachabilityGraph",
|
|
|
- ]),
|
|
|
- "",
|
|
|
- "Which ones do you want to use as source (empty string to finish)?",
|
|
|
- "Model added as source",
|
|
|
- "Which ones do you want to use as target (empty string to finish)?",
|
|
|
- "Model added as target",
|
|
|
- "Name of new transformation?",
|
|
|
- "Waiting for model constructors...",
|
|
|
- "Ready for command...",
|
|
|
- # transformation_add_AL
|
|
|
- "Which metamodels do you want to use as source for the action code (empty string to finish)?",
|
|
|
- "Model added as source",
|
|
|
- "Which metamodels do you want to use as target for the action code (empty string to finish)?",
|
|
|
- "Model added as target",
|
|
|
- "Name of Action Language model?",
|
|
|
- "Waiting for model constructors...",
|
|
|
- "Ready for command...",
|
|
|
+ ] + [ "RAMified metamodel to use?",
|
|
|
+ "Supported metamodels:",
|
|
|
+ set([" PetriNet",
|
|
|
+ " Encapsulated_PetriNet",
|
|
|
+ " Query",
|
|
|
+ " PW_Plant",
|
|
|
+ " PW_Environment",
|
|
|
+ " Requirements",
|
|
|
+ " PW_Control",
|
|
|
+ " ReachabilityGraph",
|
|
|
+ ]),
|
|
|
+ "",
|
|
|
+ "Which ones do you want to use as source (empty string to finish)?",
|
|
|
+ "Model added as source",
|
|
|
+ "Which ones do you want to use as target (empty string to finish)?",
|
|
|
+ "Model added as target",
|
|
|
+ "Name of new transformation?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Ready for command...", ] * 3 + [
|
|
|
# transformation_add_AL
|
|
|
- "Which metamodels do you want to use as source for the action code (empty string to finish)?",
|
|
|
- "Model added as source",
|
|
|
- "Which metamodels do you want to use as target for the action code (empty string to finish)?",
|
|
|
- "Model added as target",
|
|
|
- "Name of Action Language model?",
|
|
|
- "Waiting for model constructors...",
|
|
|
- "Ready for command...",
|
|
|
+ ] + [ "Which metamodels do you want to use as source for the action code (empty string to finish)?",
|
|
|
+ "Model added as source",
|
|
|
+ "Which metamodels do you want to use as target for the action code (empty string to finish)?",
|
|
|
+ "Model added as target",
|
|
|
+ "Name of Action Language model?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
+ "Ready for command...", ] * 1 + [
|
|
|
# model_list
|
|
|
model_list |
|
|
|
set([
|
|
@@ -351,27 +326,24 @@ class TestPowerWindow(unittest.TestCase):
|
|
|
" PW_Environment : SimpleClassDiagrams",
|
|
|
" PW_Control : SimpleClassDiagrams",
|
|
|
" Requirements : SimpleClassDiagrams",
|
|
|
- " Network : SimpleClassDiagrams",
|
|
|
" Query : SimpleClassDiagrams",
|
|
|
" reachability : ActionLanguage",
|
|
|
" define_req : ManualOperation",
|
|
|
" refine_plant : ManualOperation",
|
|
|
" refine_control : ManualOperation",
|
|
|
" refine_environment : ManualOperation",
|
|
|
- " refine_network : ManualOperation",
|
|
|
" refine_query : ManualOperation",
|
|
|
" __merged_define_req : SimpleClassDiagrams",
|
|
|
" __merged_All_RAM : SimpleClassDiagrams",
|
|
|
" __merged_refine_plant : SimpleClassDiagrams",
|
|
|
" __merged_refine_control : SimpleClassDiagrams",
|
|
|
" __merged_refine_environment : SimpleClassDiagrams",
|
|
|
- " __merged_refine_network : SimpleClassDiagrams",
|
|
|
" __merged_refine_query : SimpleClassDiagrams",
|
|
|
" All_RAM : SimpleClassDiagrams",
|
|
|
" make_initial_models : All_RAM",
|
|
|
" pm_powerwindow : ProcessModel",
|
|
|
" plant_to_EPN : All_RAM",
|
|
|
- " environment_to_EPN : ActionLanguage",
|
|
|
+ " environment_to_EPN : All_RAM",
|
|
|
" control_to_EPN : All_RAM",
|
|
|
" ReachabilityGraph : SimpleClassDiagrams",
|
|
|
]),
|