|
@@ -1878,34 +1878,55 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
"OK",
|
|
|
"Ready for command...",
|
|
|
]))
|
|
|
+ """
|
|
|
|
|
|
- def test_transform_add_MT_pn_reachability(self):
|
|
|
+ def test_process_model(self):
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
[ "root", "root", "root",
|
|
|
"model_add",
|
|
|
"SimpleClassDiagrams",
|
|
|
- "PetriNets",
|
|
|
+ "PetriNet",
|
|
|
] + get_model_constructor(open("integration/code/pn_design.mvc", "r").read()) + [
|
|
|
"model_add",
|
|
|
"SimpleClassDiagrams",
|
|
|
"ReachabilityGraph",
|
|
|
] + get_model_constructor(open("integration/code/reachability_graph.mvc", "r").read()) + [
|
|
|
- "model_add",
|
|
|
- "PetriNets",
|
|
|
- "my_pn",
|
|
|
- ] + get_model_constructor(open("integration/code/pn_design_model_larger.mvc", "r").read()) + [
|
|
|
"model_list",
|
|
|
+ "transformation_add_MT_language",
|
|
|
+ "PetriNet",
|
|
|
+ "",
|
|
|
+ "PetriNet_RAM",
|
|
|
+ "transformation_add_MT_language",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "ReachabilityGraph_RAM",
|
|
|
+ "transformation_add_MT",
|
|
|
+ "",
|
|
|
+ "PetriNet",
|
|
|
+ "",
|
|
|
+ "initialize_PN",
|
|
|
+ "transformation_add_MANUAL",
|
|
|
+ "PetriNet",
|
|
|
+ "",
|
|
|
+ "PetriNet",
|
|
|
+ "",
|
|
|
+ "refine_PN",
|
|
|
"transformation_add_AL",
|
|
|
- "PetriNets",
|
|
|
+ "PetriNet",
|
|
|
"",
|
|
|
"ReachabilityGraph",
|
|
|
"",
|
|
|
- "pn_reachability",
|
|
|
+ "reachability",
|
|
|
] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
|
|
|
- "transformation_execute",
|
|
|
- "pn_reachability",
|
|
|
- "my_pn",
|
|
|
- "my_pn_reachability",
|
|
|
+ "transformation_add_MT",
|
|
|
+ "ReachabilityGraph",
|
|
|
+ "",
|
|
|
+ "",
|
|
|
+ "reachability_print",
|
|
|
+ "model_add",
|
|
|
+ "ProcessModel",
|
|
|
+ "pn_reachability",
|
|
|
+ ] + get_model_constructor(open("integration/code/pm_pn_reachability.mvc", "r").read()) + [
|
|
|
"model_list",
|
|
|
],
|
|
|
[ # bootup phase
|
|
@@ -1930,19 +1951,37 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
"Waiting for model constructors...",
|
|
|
"Model upload success!",
|
|
|
"Ready for command...",
|
|
|
- # model_add
|
|
|
- "Creating new model!",
|
|
|
- "Model type?",
|
|
|
- "Model name?",
|
|
|
- "Waiting for model constructors...",
|
|
|
- "Model upload success!",
|
|
|
- "Ready for command...",
|
|
|
# model_list
|
|
|
model_list |
|
|
|
set([
|
|
|
- " PetriNets : SimpleClassDiagrams",
|
|
|
- " ReachabilityGraph : SimpleClassDiagrams",
|
|
|
- " my_pn : PetriNets",]),
|
|
|
+ " PetriNet : 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...",
|
|
|
+ # transformation_add_MT_language
|
|
|
+ "Formalisms to include (terminate with empty string)?",
|
|
|
+ "Name of the RAMified transformation metamodel?",
|
|
|
+ "Ready for command...",
|
|
|
+ # transformation_add_MT
|
|
|
+ "RAMified metamodel to use?",
|
|
|
+ "Supported metamodels:",
|
|
|
+ set([" PetriNet",]),
|
|
|
+ "",
|
|
|
+ "Which ones do you want to use as source (empty string to finish)?",
|
|
|
+ "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_MANUAL
|
|
|
+ "Which metamodels do you want to use as source for the manual operation (empty string to finish)?",
|
|
|
+ "Model added as source",
|
|
|
+ "Which metamodels do you want to use as target for the manual operation (empty string to finish)?",
|
|
|
+ "Model added as target",
|
|
|
+ "Name of Manual operation model?",
|
|
|
"Ready for command...",
|
|
|
# transformation_add_AL
|
|
|
"Which metamodels do you want to use as source for the action code (empty string to finish)?",
|
|
@@ -1952,17 +1991,26 @@ class TestModelverseCore(unittest.TestCase):
|
|
|
"Name of Action Language model?",
|
|
|
"Waiting for model constructors...",
|
|
|
"Ready for command...",
|
|
|
- # transformation_execute (pn_reachability)
|
|
|
- "Which transformation do you want to execute?",
|
|
|
- "Which model to bind for source element PetriNets",
|
|
|
- "Which model to create for target element ReachabilityGraph",
|
|
|
+ # transformation_add_MT
|
|
|
+ "RAMified metamodel to use?",
|
|
|
+ "Supported metamodels:",
|
|
|
+ set([" 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)?",
|
|
|
+ "Name of new transformation?",
|
|
|
+ "Waiting for model constructors...",
|
|
|
"Ready for command...",
|
|
|
# model_list
|
|
|
model_list |
|
|
|
set([
|
|
|
- " PetriNets : SimpleClassDiagrams",
|
|
|
+ " PetriNet : SimpleClassDiagrams",
|
|
|
" ReachabilityGraph : SimpleClassDiagrams",
|
|
|
- " my_pn_reachability : ReachabilityGraph",
|
|
|
- " my_pn : PetriNets",]),
|
|
|
+ " initialize_PN : PetriNet_RAM",
|
|
|
+ " refine_PN : ManualOperation",
|
|
|
+ " reachability : ActionLanguage",
|
|
|
+ " reachability_print : ReachabilityGraph_RAM",
|
|
|
+ " pn_reachability : ProcessModel",
|
|
|
+ ]),
|
|
|
]))
|
|
|
- """
|