Bladeren bron

Complete process is running (though failing)

Yentl Van Tendeloo 8 jaren geleden
bovenliggende
commit
0a30a4cec4
4 gewijzigde bestanden met toevoegingen van 61 en 31 verwijderingen
  1. 31 1
      integration/test_powerwindow.py
  2. 28 28
      models/combine_EPN.mvc
  3. 1 1
      models/match.mvc
  4. 1 1
      models/pm_req_analyse.mvc

+ 31 - 1
integration/test_powerwindow.py

@@ -199,6 +199,14 @@ class TestPowerWindow(unittest.TestCase):
                     "",
                     "reachability",
                     ] + get_constructor(open("integration/code/reachability.alc", "r").read()) + [
+                "transformation_add_MT",
+                    "All_RAM",
+                    "ReachabilityGraph",
+                    "Query",
+                    "",
+                    "",
+                    "matches",
+                    ] + get_model_constructor_2("models/matches.mvc") + [
                 "model_list",
                 "process_execute",
                 "pm_powerwindow",
@@ -402,6 +410,26 @@ class TestPowerWindow(unittest.TestCase):
                         "Name of Action Language model?",
                         "Waiting for model constructors...",
                         "Ready for command...", ] * 1 + [
+                # 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",
+                "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([
@@ -424,6 +452,7 @@ class TestPowerWindow(unittest.TestCase):
                      "  __merged_refine_control : SimpleClassDiagrams",
                      "  __merged_refine_environment : SimpleClassDiagrams",
                      "  __merged_refine_query : SimpleClassDiagrams",
+                     "  matches : All_RAM",
                      "  All_RAM : SimpleClassDiagrams",
                      "  make_initial_models : All_RAM",
                      "  pm_powerwindow : ProcessModel",
@@ -473,5 +502,6 @@ class TestPowerWindow(unittest.TestCase):
                 "Waiting for model constructors...",
                 "Please give your command.",
                 # Computations happen without output
-                "",
+                # Finished, so we go back to the start
+                "Ready for command...",
             ]))

+ 28 - 28
models/combine_EPN.mvc

@@ -249,15 +249,15 @@ A B {
 
         {Contains} ForAll copy_transitions {
             LHS {
-                Pre_Encapsulated_PetriNets/Transition {
+                Pre_Encapsulated_PetriNet/Transition {
                     label = "0"
                 }
             }
             RHS {
-                Post_Encapsulated_PetriNets/Transition ct1 {
+                Post_Encapsulated_PetriNet/Transition ct1 {
                     label = "0"
                 }
-                Post_PetriNets/Transition ct2 {
+                Post_PetriNet/Transition ct2 {
                     label = "1"
                     value_executing = $
                         Boolean function value(model : Element, name : String, mapping : Element):
@@ -275,15 +275,15 @@ A B {
         }
         {Contains} ForAll copy_places {
             LHS {
-                Pre_Encapsulated_PetriNets/Place {
+                Pre_Encapsulated_PetriNet/Place {
                     label = "0"
                 }
             }
             RHS {
-                Post_Encapsulated_PetriNets/Place cp1 {
+                Post_Encapsulated_PetriNet/Place cp1 {
                     label = "0"
                 }
-                Post_PetriNets/Place cp2 {
+                Post_PetriNet/Place cp2 {
                     label = "1"
                     value_tokens = $
                         Integer function value(model : Element, name : String, mapping : Element):
@@ -301,19 +301,19 @@ A B {
         }
         {Contains} ForAll copy_P2T {
             LHS {
-                Pre_Encapsulated_PetriNets/Place cp2t_p{
+                Pre_Encapsulated_PetriNet/Place cp2t_p{
                     label = "0"
                 }
-                Pre_Encapsulated_PetriNets/Transition cp2t_t{
+                Pre_Encapsulated_PetriNet/Transition cp2t_t{
                     label = "1"
                 }
-                Pre_Encapsulated_PetriNets/P2T (cp2t_p, cp2t_t){
+                Pre_Encapsulated_PetriNet/P2T (cp2t_p, cp2t_t){
                     label = "2"
                 }
-                Pre_PetriNets/Place cp2t_p2{
+                Pre_PetriNet/Place cp2t_p2{
                     label = "3"
                 }
-                Pre_PetriNets/Transition cp2t_t2{
+                Pre_PetriNet/Transition cp2t_t2{
                     label = "4"
                 }
                 Pre_EPN2PN_place_link (cp2t_p, cp2t_p2){
@@ -324,19 +324,19 @@ A B {
                 }
             }
             RHS {
-                Post_Encapsulated_PetriNets/Place rhs_cp2t_p{
+                Post_Encapsulated_PetriNet/Place rhs_cp2t_p{
                     label = "0"
                 }
-                Post_Encapsulated_PetriNets/Transition rhs_cp2t_t{
+                Post_Encapsulated_PetriNet/Transition rhs_cp2t_t{
                     label = "1"
                 }
-                Post_Encapsulated_PetriNets/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
+                Post_Encapsulated_PetriNet/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
                     label = "2"
                 }
-                Post_PetriNets/Place rhs_cp2t_p2 {
+                Post_PetriNet/Place rhs_cp2t_p2 {
                     label = "3"
                 }
-                Post_PetriNets/Transition rhs_cp2t_t2 {
+                Post_PetriNet/Transition rhs_cp2t_t2 {
                     label = "4"
                 }
                 Post_EPN2PN_place_link (rhs_cp2t_p, rhs_cp2t_p2){
@@ -345,7 +345,7 @@ A B {
                 Post_EPN2PN_transition_link (rhs_cp2t_t, rhs_cp2t_t2){
                     label = "6"
                 }
-                Post_PetriNets/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
+                Post_PetriNet/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
                     label = "7"
                     value_weight = $
                         Integer function value(host_model : Element, name : String, mapping : Element):
@@ -356,19 +356,19 @@ A B {
         }
         {Contains} ForAll copy_T2P {
             LHS {
-                Pre_Encapsulated_PetriNets/Place ct2p_p{
+                Pre_Encapsulated_PetriNet/Place ct2p_p{
                     label = "0"
                 }
-                Pre_Encapsulated_PetriNets/Transition ct2p_t{
+                Pre_Encapsulated_PetriNet/Transition ct2p_t{
                     label = "1"
                 }
-                Pre_Encapsulated_PetriNets/T2P (ct2p_t, ct2p_p){
+                Pre_Encapsulated_PetriNet/T2P (ct2p_t, ct2p_p){
                     label = "2"
                 }
-                Pre_PetriNets/Place ct2p_p2{
+                Pre_PetriNet/Place ct2p_p2{
                     label = "3"
                 }
-                Pre_PetriNets/Transition ct2p_t2{
+                Pre_PetriNet/Transition ct2p_t2{
                     label = "4"
                 }
                 Pre_EPN2PN_place_link (ct2p_p, ct2p_p2){
@@ -379,19 +379,19 @@ A B {
                 }
             }
             RHS {
-                Post_Encapsulated_PetriNets/Place rhs_ct2p_p{
+                Post_Encapsulated_PetriNet/Place rhs_ct2p_p{
                     label = "0"
                 }
-                Post_Encapsulated_PetriNets/Transition rhs_ct2p_t{
+                Post_Encapsulated_PetriNet/Transition rhs_ct2p_t{
                     label = "1"
                 }
-                Post_Encapsulated_PetriNets/T2P (rhs_ct2p_t, rhs_ct2p_p){
+                Post_Encapsulated_PetriNet/T2P (rhs_ct2p_t, rhs_ct2p_p){
                     label = "2"
                 }
-                Post_PetriNets/Place rhs_ct2p_p2 {
+                Post_PetriNet/Place rhs_ct2p_p2 {
                     label = "3"
                 }
-                Post_PetriNets/Transition rhs_ct2p_t2 {
+                Post_PetriNet/Transition rhs_ct2p_t2 {
                     label = "4"
                 }
                 Post_EPN2PN_place_link (rhs_ct2p_p, rhs_ct2p_p2){
@@ -400,7 +400,7 @@ A B {
                 Post_EPN2PN_transition_link (rhs_ct2p_t, rhs_ct2p_t2){
                     label = "6"
                 }
-                Post_PetriNets/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
+                Post_PetriNet/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
                     label = "7"
                     value_weight = $
                         Integer function value(host_model : Element, name : String, mapping : Element):

+ 1 - 1
models/match.mvc

@@ -31,7 +31,7 @@ A B {
                 Pre_Query/Contains (pre_0, pre_2) {
                     label = "4"
                 }
-                Pre_Reachability/Contains (pre_1, pre_3) {
+                Pre_ReachabilityGraph/Contains (pre_1, pre_3) {
                     label = "5"
                 }
 

+ 1 - 1
models/pm_req_analyse.mvc

@@ -51,7 +51,7 @@ ProcessModel analyse_requirements {
     ForkJoin forkjoin3 {}
 
     Exec matches {
-        name = "query_match"
+        name = "matches"
     }
 
     Decision found {}