|
@@ -460,6 +460,7 @@ def transformation_add_MT(source_metamodels, target_metamodels, operation_name,
|
|
|
|
|
|
|
|
def transformation_add_AL(source_metamodels, target_metamodels, operation_name, code, callback=lambda: None):
|
|
def transformation_add_AL(source_metamodels, target_metamodels, operation_name, code, callback=lambda: None):
|
|
|
"""Create a new action language model, which can be executed."""
|
|
"""Create a new action language model, which can be executed."""
|
|
|
|
|
+ global mode
|
|
|
_goto_mode(MODE_MODELLING)
|
|
_goto_mode(MODE_MODELLING)
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -469,16 +470,33 @@ def transformation_add_AL(source_metamodels, target_metamodels, operation_name,
|
|
|
|
|
|
|
|
mv_dict_rep = _dict_to_list(source_metamodels) + [""] + _dict_to_list(target_metamodels) + [""]
|
|
mv_dict_rep = _dict_to_list(source_metamodels) + [""] + _dict_to_list(target_metamodels) + [""]
|
|
|
_input(["transformation_add_AL"] + mv_dict_rep + [operation_name])
|
|
_input(["transformation_add_AL"] + mv_dict_rep + [operation_name])
|
|
|
|
|
+
|
|
|
|
|
+ # Possibly modify the merged metamodel first (add tracability links)
|
|
|
|
|
+ mode = MODE_MANUAL
|
|
|
|
|
+ _output() # Model loaded, ready for commands
|
|
|
|
|
+ callback()
|
|
|
|
|
+ _input("exit")
|
|
|
|
|
+ mode = MODE_MODELLING
|
|
|
|
|
+
|
|
|
_handle_output("Waiting for code constructors...")
|
|
_handle_output("Waiting for code constructors...")
|
|
|
_input(compiled)
|
|
_input(compiled)
|
|
|
_output("Success")
|
|
_output("Success")
|
|
|
|
|
|
|
|
def transformation_add_MANUAL(source_metamodels, target_metamodels, operation_name, callback=lambda: None):
|
|
def transformation_add_MANUAL(source_metamodels, target_metamodels, operation_name, callback=lambda: None):
|
|
|
"""Create a new manual model operation."""
|
|
"""Create a new manual model operation."""
|
|
|
|
|
+ global mode
|
|
|
_goto_mode(MODE_MODELLING)
|
|
_goto_mode(MODE_MODELLING)
|
|
|
|
|
|
|
|
mv_dict_rep = _dict_to_list(source_metamodels) + [""] + _dict_to_list(target_metamodels) + [""]
|
|
mv_dict_rep = _dict_to_list(source_metamodels) + [""] + _dict_to_list(target_metamodels) + [""]
|
|
|
_input(["transformation_add_MANUAL"] + mv_dict_rep + [operation_name])
|
|
_input(["transformation_add_MANUAL"] + mv_dict_rep + [operation_name])
|
|
|
|
|
+
|
|
|
|
|
+ # Possibly modify the merged metamodel first (add tracability links)
|
|
|
|
|
+ mode = MODE_MANUAL
|
|
|
|
|
+ _output() # Model loaded, ready for commands
|
|
|
|
|
+ callback()
|
|
|
|
|
+ _input("exit")
|
|
|
|
|
+ mode = MODE_MODELLING
|
|
|
|
|
+
|
|
|
_handle_output("Success")
|
|
_handle_output("Success")
|
|
|
|
|
|
|
|
def transformation_execute_AL(operation_name, input_models_dict, output_models_dict, callback=lambda i: None):
|
|
def transformation_execute_AL(operation_name, input_models_dict, output_models_dict, callback=lambda i: None):
|