瀏覽代碼

Use Architecture and BFS everywhere + update location of reachability
algorithm and MM

Yentl Van Tendeloo 8 年之前
父節點
當前提交
94213022d2
共有 1 個文件被更改,包括 51 次插入6 次删除
  1. 51 6
      integration/test_powerwindow.py

+ 51 - 6
integration/test_powerwindow.py

@@ -42,7 +42,7 @@ class TestPowerWindow(unittest.TestCase):
                 "model_add",
                     "SimpleClassDiagrams",
                     "ReachabilityGraph",
-                    ] + get_model_constructor_2("integration/code/reachability_graph.mvc") + [
+                    ] + get_model_constructor_2("models/reachability_graph.mvc") + [
                 "model_add",
                     "SimpleClassDiagrams",
                     "PetriNet",
@@ -213,7 +213,13 @@ class TestPowerWindow(unittest.TestCase):
                     "ReachabilityGraph",
                     "",
                     "reachability",
-                    ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
+                    ] + get_constructor(open("models/reachability.alc", "r").read()) + [
+                "transformation_add_AL",
+                    "ReachabilityGraph",
+                    "",
+                    "",
+                    "bfs",
+                    ] + get_constructor(open("models/bfs.alc", "r").read()) + [
                 "transformation_add_MT",
                     "All_RAM",
                     "ReachabilityGraph",
@@ -274,6 +280,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  Requirements : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  pm_powerwindow : ProcessModel",
+                     "  Architecture : SimpleClassDiagrams",
                      ]),
                 "Ready for command...",
                 # transformation_add_MT_language
@@ -425,6 +432,12 @@ class TestPowerWindow(unittest.TestCase):
                         "Name of Action Language model?",
                         "Waiting for model constructors...",
                         "Ready for command...", ] * 1 + [
+                ] + [   "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)?",
+                        "Name of Action Language model?",
+                        "Waiting for model constructors...",
+                        "Ready for command...", ] * 1 + [
                 # transformation_add_MT
                 "RAMified metamodel to use?",
                 "Supported metamodels:",
@@ -476,6 +489,8 @@ class TestPowerWindow(unittest.TestCase):
                      "  environment_to_EPN : All_RAM",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",
+                     "  Architecture : SimpleClassDiagrams",
+                     "  bfs : ActionLanguage",
                      ]),
                 "Ready for command...",
                 # process_execute
@@ -528,7 +543,7 @@ class TestPowerWindow(unittest.TestCase):
                 "model_add",
                     "SimpleClassDiagrams",
                     "ReachabilityGraph",
-                    ] + get_model_constructor_2("integration/code/reachability_graph.mvc") + [
+                    ] + get_model_constructor_2("models/reachability_graph.mvc") + [
                 "model_add",
                     "SimpleClassDiagrams",
                     "PetriNet",
@@ -699,7 +714,13 @@ class TestPowerWindow(unittest.TestCase):
                     "ReachabilityGraph",
                     "",
                     "reachability",
-                    ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
+                    ] + get_constructor(open("models/reachability.alc", "r").read()) + [
+                "transformation_add_AL",
+                    "ReachabilityGraph",
+                    "",
+                    "",
+                    "bfs",
+                    ] + get_constructor(open("models/bfs.alc", "r").read()) + [
                 "transformation_add_MT",
                     "All_RAM",
                     "ReachabilityGraph",
@@ -778,6 +799,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  Requirements : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  pm_powerwindow : ProcessModel",
+                     "  Architecture : SimpleClassDiagrams",
                      ]),
                 "Ready for command...",
                 # transformation_add_MT_language
@@ -929,6 +951,12 @@ class TestPowerWindow(unittest.TestCase):
                         "Name of Action Language model?",
                         "Waiting for model constructors...",
                         "Ready for command...", ] * 1 + [
+                ] + [   "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)?",
+                        "Name of Action Language model?",
+                        "Waiting for model constructors...",
+                        "Ready for command...", ] * 1 + [
                 # transformation_add_MT
                 "RAMified metamodel to use?",
                 "Supported metamodels:",
@@ -980,6 +1008,8 @@ class TestPowerWindow(unittest.TestCase):
                      "  environment_to_EPN : All_RAM",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",
+                     "  Architecture : SimpleClassDiagrams",
+                     "  bfs : ActionLanguage",
                      ]),
                 "Ready for command...",
                 # process_execute
@@ -1061,7 +1091,7 @@ class TestPowerWindow(unittest.TestCase):
                 "model_add",
                     "SimpleClassDiagrams",
                     "ReachabilityGraph",
-                    ] + get_model_constructor_2("integration/code/reachability_graph.mvc") + [
+                    ] + get_model_constructor_2("models/reachability_graph.mvc") + [
                 "model_add",
                     "SimpleClassDiagrams",
                     "PetriNet",
@@ -1239,7 +1269,13 @@ class TestPowerWindow(unittest.TestCase):
                     "ReachabilityGraph",
                     "",
                     "reachability",
-                    ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
+                    ] + get_constructor(open("models/reachability.alc", "r").read()) + [
+                "transformation_add_AL",
+                    "ReachabilityGraph",
+                    "",
+                    "",
+                    "bfs",
+                    ] + get_constructor(open("models/bfs.alc", "r").read()) + [
                 "transformation_add_MT",
                     "All_RAM",
                     "ReachabilityGraph",
@@ -1314,6 +1350,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  Requirements : SimpleClassDiagrams",
                      "  Query : SimpleClassDiagrams",
                      "  pm_powerwindow : ProcessModel",
+                     "  Architecture : SimpleClassDiagrams",
                      ]),
                 "Ready for command...",
                 # transformation_add_MT_language
@@ -1484,6 +1521,12 @@ class TestPowerWindow(unittest.TestCase):
                         "Name of Action Language model?",
                         "Waiting for model constructors...",
                         "Ready for command...", ] * 1 + [
+                ] + [   "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)?",
+                        "Name of Action Language model?",
+                        "Waiting for model constructors...",
+                        "Ready for command...", ] * 1 + [
                 # transformation_add_MT
                 "RAMified metamodel to use?",
                 "Supported metamodels:",
@@ -1546,6 +1589,8 @@ class TestPowerWindow(unittest.TestCase):
                      "  environment_to_EPN : All_RAM",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",
+                     "  Architecture : SimpleClassDiagrams",
+                     "  bfs : ActionLanguage",
                      ]),
                 "Ready for command...",
                 # process_execute