Browse Source

Some additional renames

Yentl Van Tendeloo 3 years ago
parent
commit
492b5227a5

+ 25 - 26
run_pw.py

@@ -3,22 +3,21 @@ import sys
 import os
 sys.path.append("wrappers")
 from modelverse import *
-import threading
 
 init()
 login("admin", "admin")
 
-model_add("formalisms/ReachabilityGraph", "formalisms/SimpleClassDiagrams", open("models/reachability_graph.mvc", "r").read())
-model_add("formalisms/PetriNet", "formalisms/SimpleClassDiagrams", open("integration/code/pn_design.mvc", 'r').read())
-model_add("formalisms/Encapsulated_PetriNet", "formalisms/SimpleClassDiagrams", open("models/petrinet_ports.mvc", 'r').read())
-model_add("formalisms/PW_Plant", "formalisms/SimpleClassDiagrams", open("models/plant_PW.mvc", 'r').read())
-model_add("formalisms/PW_Environment", "formalisms/SimpleClassDiagrams", open("models/environment_PW.mvc", 'r').read())
-model_add("formalisms/PW_Control", "formalisms/SimpleClassDiagrams", open("models/control_PW.mvc", 'r').read())
-model_add("formalisms/Requirements", "formalisms/SimpleClassDiagrams", open("models/requirements.mvc", 'r').read())
-model_add("formalisms/Query", "formalisms/SimpleClassDiagrams", open("models/query.mvc", 'r').read())
-model_add("formalisms/Architecture", "formalisms/SimpleClassDiagrams", open("models/architecture.mvc", 'r').read())
+model_add("formalisms/ReachabilityGraph", "formalisms/SimpleClassDiagrams", open("models/ReachabilityGraph/metamodels/reachability_graph.mvc", "r").read())
+model_add("formalisms/PetriNet", "formalisms/SimpleClassDiagrams", open("models/PetriNets/metamodels/PetriNets.mvc", 'r').read())
+model_add("formalisms/Encapsulated_PetriNet", "formalisms/SimpleClassDiagrams", open("models/EncapsulatedPetriNets/metamodels/epn.mvc", 'r').read())
+model_add("formalisms/PW_Plant", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/plant.mvc", 'r').read())
+model_add("formalisms/PW_Environment", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/environment.mvc", 'r').read())
+model_add("formalisms/PW_Control", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/control.mvc", 'r').read())
+model_add("formalisms/Requirements", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/requirements.mvc", 'r').read())
+model_add("formalisms/Query", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/query.mvc", 'r').read())
+model_add("formalisms/Architecture", "formalisms/SimpleClassDiagrams", open("models/PowerWindow/metamodels/architecture.mvc", 'r').read())
 
-model_add("models/pm_powerwindow", "formalisms/ProcessModel", open("models/pm_req_analyse.mvc", 'r').read())
+model_add("models/pm_powerwindow", "formalisms/ProcessModel", open("models/PowerWindow/PM_analyze.mvc", 'r').read())
 
 transformation_add_MANUAL({"Requirements": "formalisms/Requirements"}, {"Requirements": "formalisms/Requirements"}, "models/revise_req")
 transformation_add_MANUAL({"Requirements": "formalisms/Requirements", "PW_Environment": "formalisms/PW_Environment"}, {"PW_Environment": "formalisms/PW_Environment"}, "models/revise_environment")
@@ -42,16 +41,16 @@ def tracability_EPN2PN(model):
     instantiate(model, "Association", ("Encapsulated_PetriNet/Place", "PetriNet/Place"), ID="EPN2PN_transition_link")
     instantiate(model, "Association", ("Encapsulated_PetriNet/Transition", "PetriNet/Transition"), ID="EPN2PN_place_link")
 
-transformation_add_MT({}, {"PW_Plant": "formalisms/PW_Plant", "PW_Environment": "formalisms/PW_Environment", "PW_Control": "formalisms/PW_Control", "Query": "formalisms/Query", "Architecture": "formalisms/Architecture", "Requirements": "formalisms/Requirements"}, "models/make_initial_models", open("models/initialize.mvc", 'r').read())
-transformation_add_MT({"PW_Plant": "formalisms/PW_Plant"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/plant_to_EPN", open("models/plant_to_EPN.mvc", 'r').read(), tracability_PLANT2EPN)
-transformation_add_MT({"PW_Control": "formalisms/PW_Control"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/control_to_EPN", open("models/control_to_EPN.mvc", 'r').read(), tracability_CTRL2EPN)
-transformation_add_MT({"PW_Environment": "formalisms/PW_Environment"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/environment_to_EPN", open("models/environment_to_EPN.mvc", 'r').read(), tracability_ENV2EPN)
-transformation_add_MT({"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet", "Architecture": "formalisms/Architecture"}, {"PetriNet": "formalisms/PetriNet"}, "models/combine_EPN", open("models/combine_EPN.mvc", 'r').read(), tracability_EPN2PN)
-transformation_add_MT({"ReachabilityGraph": "formalisms/ReachabilityGraph", "Query": "formalisms/Query"}, {"ReachabilityGraph": "formalisms/ReachabilityGraph"}, "models/match", open("models/matches.mvc", 'r').read())
+transformation_add_MT({}, {"PW_Plant": "formalisms/PW_Plant", "PW_Environment": "formalisms/PW_Environment", "PW_Control": "formalisms/PW_Control", "Query": "formalisms/Query", "Architecture": "formalisms/Architecture", "Requirements": "formalisms/Requirements"}, "models/make_initial_models", open("models/PowerWindow/transformations/initialize.mvc", 'r').read())
+transformation_add_MT({"PW_Plant": "formalisms/PW_Plant"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/plant_to_EPN", open("models/PowerWindow/transformations/plant_to_EPN.mvc", 'r').read(), tracability_PLANT2EPN)
+transformation_add_MT({"PW_Control": "formalisms/PW_Control"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/control_to_EPN", open("models/PowerWindow/transformations/control_to_EPN.mvc", 'r').read(), tracability_CTRL2EPN)
+transformation_add_MT({"PW_Environment": "formalisms/PW_Environment"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/environment_to_EPN", open("models/PowerWindow/transformations/environment_to_EPN.mvc", 'r').read(), tracability_ENV2EPN)
+transformation_add_MT({"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet", "Architecture": "formalisms/Architecture"}, {"PetriNet": "formalisms/PetriNet"}, "models/combine_EPN", open("models/EncapsulatedPetriNets/transformations/combine.mvc", 'r').read(), tracability_EPN2PN)
+transformation_add_MT({"ReachabilityGraph": "formalisms/ReachabilityGraph", "Query": "formalisms/Query"}, {"ReachabilityGraph": "formalisms/ReachabilityGraph"}, "models/match", open("models/ReachabilityGraph/transformations/match_query.mvc", 'r').read())
 
-transformation_add_AL({"PetriNet": "formalisms/PetriNet"}, {"ReachabilityGraph": "formalisms/ReachabilityGraph"}, "models/reachability", open("models/reachability.alc", 'r').read())
-transformation_add_AL({"ReachabilityGraph": "formalisms/ReachabilityGraph"}, {}, "models/bfs", open("models/bfs.alc", 'r').read())
-transformation_add_AL({"EPN_Plant": "formalisms/Encapsulated_PetriNet", "EPN_Control": "formalisms/Encapsulated_PetriNet", "EPN_Environment": "formalisms/Encapsulated_PetriNet"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/merge_EPN", open("models/merge_EPN.alc", 'r').read())
+transformation_add_AL({"PetriNet": "formalisms/PetriNet"}, {"ReachabilityGraph": "formalisms/ReachabilityGraph"}, "models/reachability", open("models/PetriNets/transformations/reachability.alc", 'r').read())
+transformation_add_AL({"ReachabilityGraph": "formalisms/ReachabilityGraph"}, {}, "models/bfs", open("models/ReachabilityGraph/transformations/bfs.alc", 'r').read())
+transformation_add_AL({"EPN_Plant": "formalisms/Encapsulated_PetriNet", "EPN_Control": "formalisms/Encapsulated_PetriNet", "EPN_Environment": "formalisms/Encapsulated_PetriNet"}, {"Encapsulated_PetriNet": "formalisms/Encapsulated_PetriNet"}, "models/EncapsulatedPetriNets/transformations/merge", open("models/EncapsulatedPetriNets/transformations/merge.alc", 'r').read())
 
 nr_of_operations = 6
 
@@ -75,12 +74,12 @@ def get_function(filename):
         model_overwrite(model, open(filename, "r").read())
     return func
 
-cb_req = get_function("models/requirements_model.mvc")
-cb_plant = get_function("models/plant_model.mvc")
-cb_env = get_function("models/environment_model.mvc")
-cb_ctrl = get_function("models/control_model.mvc")
-cb_query = get_function("models/query_model.mvc")
-cb_arch = get_function("models/architecture_model.mvc")
+cb_req = get_function(  "models/PowerWindow/models/requirements.mvc")
+cb_plant = get_function("models/PowerWindow/models/plant.mvc")
+cb_env = get_function(  "models/PowerWindow/models/environment.mvc")
+cb_ctrl = get_function( "models/PowerWindow/models/control.mvc")
+cb_query = get_function("models/PowerWindow/models/query.mvc")
+cb_arch = get_function( "models/PowerWindow/models/architecture.mvc")
 
 callbacks = {
         "models/revise_req": cb_req,

models/EncapsulatedPetriNets/transformations/combine_EPN.mvc → models/EncapsulatedPetriNets/transformations/combine.mvc


models/PowerWindow/models/control_model.mvc → models/PowerWindow/models/control.mvc


models/PowerWindow/models/control_model_wrong.mvc → models/PowerWindow/models/control_wrong.mvc


+ 0 - 28
models/old/pm_translate.py

@@ -1,28 +0,0 @@
-import sys
-sys.path.append("wrappers/")
-
-from modelverse import *
-
-init()
-login("admin", "admin")
-
-model_add("formalisms/DEVS/DEVS_MM", "formalisms/SimpleClassDiagrams", open("models/WSC/DEVS.mvc", 'r').read())
-model_add("formalisms/Metrics/Metrics_MM", "formalisms/SimpleClassDiagrams", open("models/WSC/metrics.mvc", 'r').read())
-model_add("formalisms/PM/PM_Extended_MM", "formalisms/SimpleClassDiagrams", open("models/WSC/pm.mvc", 'r').read())
-model_add("formalisms/Experiment/Experiment_MM", "formalisms/SimpleClassDiagrams", open("models/WSC/experiment.mvc", 'r').read())
-
-model_add("models/PM/to_DEVS", "formalisms/ProcessModel", open("models/WSC/pm_PM_to_DEVS.mvc").read())
-
-model_add("models/DEVS/PM_library", "formalisms/DEVS/DEVS_MM", open("models/WSC/pm_library.mvc", 'r').read())
-model_add("models/PM/example_PM", "formalisms/PM/PM_Extended_MM", open("models/WSC/pm_example.mvc", 'r').read())
-model_add("models/Experiment/example_experiment", "formalisms/Experiment/Experiment_MM", open("models/WSC/experiment_example.mvc", 'r').read())
-
-def traceability_pm_devs(model):
-    instantiate(model, "Association", ("PM/ProcessNode", "DEVS/DEVSInstance"), ID="Trace")
-    
-transformation_add_MT({"PM": "formalisms/PM/PM_Extended_MM"}, {"DEVS": "formalisms/DEVS/DEVS_MM"}, "formalisms/PM/to_DEVS", open("models/WSC/PM_to_DEVS.mvc", 'r').read(), traceability_pm_devs)
-
-transformation_add_AL({"model1": "formalisms/DEVS/DEVS_MM", "model2": "formalisms/DEVS/DEVS_MM"}, {"result": "formalisms/DEVS/DEVS_MM"}, "formalisms/DEVS/merge", open("models/WSC/DEVS_merge.alc", 'r').read())
-transformation_add_AL({"DEVS": "formalisms/DEVS/DEVS_MM", "Experiment": "formalisms/Experiment/Experiment_MM"}, {"metrics": "formalisms/Metrics/Metrics_MM"}, "formalisms/DEVS/simulate", open("models/WSC/DEVS_simulate.alc", 'r').read())
-
-process_execute("models/PM/to_DEVS", {"PM": "models/PM/example_PM", "DEVS library": "models/DEVS/PM_library", "Metrics": "models/Metrics/metric", "Experiment": "models/Experiment/example_experiment"}, {})

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Thu May 17 10:06:19 2018
+Date:   Thu May 17 10:28:13 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server