Bläddra i källkod

Added combine_EPN to PM

Yentl Van Tendeloo 8 år sedan
förälder
incheckning
7a47f6f338
2 ändrade filer med 43 tillägg och 2 borttagningar
  1. 29 0
      integration/test_powerwindow.py
  2. 14 2
      models/pm_req_analyse.mvc

+ 29 - 0
integration/test_powerwindow.py

@@ -174,6 +174,14 @@ class TestPowerWindow(unittest.TestCase):
                     "",
                     "environment_to_EPN",
                     ] + get_model_constructor_2("models/environment_to_EPN.mvc") + [
+                "transformation_add_MT",
+                    "All_RAM",
+                    "Encapsulated_PetriNet",
+                    "",
+                    "Encapsulated_PetriNet",
+                    "",
+                    "combine_EPN",
+                    ] + get_model_constructor_2("models/combine_EPN.mvc") + [
                 "transformation_add_AL",
                     "PetriNet",
                     "",
@@ -356,6 +364,26 @@ class TestPowerWindow(unittest.TestCase):
                 "Name of new transformation?",
                 "Waiting for model constructors...",
                 "Ready for command...",
+                # transformation_add_MT
+                "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...",
                 # transformation_add_AL
                 ] + [   "Which metamodels do you want to use as source for the action code (empty string to finish)?",
                         "Model added as source",
@@ -390,6 +418,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  make_initial_models : All_RAM",
                      "  pm_powerwindow : ProcessModel",
                      "  plant_to_EPN : All_RAM",
+                     "  combine_EPN : All_RAM",
                      "  environment_to_EPN : All_RAM",
                      "  control_to_EPN : All_RAM",
                      "  ReachabilityGraph : SimpleClassDiagrams",

+ 14 - 2
models/pm_req_analyse.mvc

@@ -40,6 +40,10 @@ ProcessModel analyse_requirements {
         name = "combine_EPN"
     }
 
+    Exec EPN_to_PN {
+        name = "EPN_to_PN"
+    }
+
     Exec analyse {
         name = "reachability"
     }
@@ -80,6 +84,10 @@ ProcessModel analyse_requirements {
         name = "environment_EPN"
         type = "Encapsulated_PetriNet"
     }
+    Data merged_EPN {
+        name = "merged_EPN"
+        type = "Encapsulated_PetriNet"
+    }
     Data pn {
         name = "pn"
         type = "PetriNet"
@@ -107,7 +115,8 @@ ProcessModel analyse_requirements {
     Next (environment_to_EPN, forkjoin2) {}
     Next (control_to_EPN, forkjoin2) {}
     Next (forkjoin2, combine_EPN) {}
-    Next (combine_EPN, analyse) {}
+    Next (combine_EPN, EPN_to_PN) {}
+    Next (EPN_to_PN, analyse) {}
     Next (analyse, forkjoin3) {}
     Next (refine_query, forkjoin3) {}
     Next (forkjoin3, matches) {}
@@ -139,7 +148,10 @@ ProcessModel analyse_requirements {
     Consumes (plant_EPN, combine_EPN) {}
     Consumes (environment_EPN, combine_EPN) {}
     Consumes (control_EPN, combine_EPN) {}
-    Produces (combine_EPN, pn) {}
+    Produces (combine_EPN, merged_EPN) {}
+
+    Consumes (merged_EPN, EPN_to_PN) {}
+    Produces (EPN_to_PN, pn) {}
 
     Consumes (pn, analyse) {}
     Produces (analyse, reachability_graph) {}