|
@@ -306,7 +306,6 @@ Void function user_function_skip_init(user_id : String):
|
|
output("")
|
|
output("")
|
|
output("Transformation-specific operations")
|
|
output("Transformation-specific operations")
|
|
output(" transformation_add_MT_language -- Create a RAMified metamodel")
|
|
output(" transformation_add_MT_language -- Create a RAMified metamodel")
|
|
- output(" transformation_reRAMify -- RAMify a merged metamodel again")
|
|
|
|
output(" transformation_add_MT -- Initialize a new model transformation")
|
|
output(" transformation_add_MT -- Initialize a new model transformation")
|
|
output(" transformation_add_AL -- [TODO] Initialize a new action language transformation")
|
|
output(" transformation_add_AL -- [TODO] Initialize a new action language transformation")
|
|
output(" transformation_add_EXT -- [TODO] Initialize a new external tool transformation")
|
|
output(" transformation_add_EXT -- [TODO] Initialize a new external tool transformation")
|
|
@@ -608,7 +607,7 @@ Void function user_function_skip_init(user_id : String):
|
|
if (allow_read(user_id, model_id)):
|
|
if (allow_read(user_id, model_id)):
|
|
type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
|
|
type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
|
|
if (bool_or(old_type_id == "", type_id == old_type_id)):
|
|
if (bool_or(old_type_id == "", type_id == old_type_id)):
|
|
- set_add(all_formalisms, create_tuple(name, import_node(read_attribute(core, model_id, "location"))))
|
|
|
|
|
|
+ set_add(all_formalisms, create_tuple(name + "/", import_node(read_attribute(core, model_id, "location"))))
|
|
old_type_id = type_id
|
|
old_type_id = type_id
|
|
elif (old_type_id != type_id):
|
|
elif (old_type_id != type_id):
|
|
// Already have a previous type_id and now another: CLASH
|
|
// Already have a previous type_id and now another: CLASH
|
|
@@ -655,39 +654,6 @@ Void function user_function_skip_init(user_id : String):
|
|
else:
|
|
else:
|
|
output("At least one formalism is required")
|
|
output("At least one formalism is required")
|
|
|
|
|
|
- elif (cmd == "transformation_reRAMify"):
|
|
|
|
- String model_id
|
|
|
|
- String source_id
|
|
|
|
- Element trace_links
|
|
|
|
- String trace_link
|
|
|
|
- String merged_model_id
|
|
|
|
- Element new_model
|
|
|
|
- String location
|
|
|
|
-
|
|
|
|
- output("Merged metamodel to RAMify again?")
|
|
|
|
- model_id = get_model_id(input())
|
|
|
|
-
|
|
|
|
- if (model_id != ""):
|
|
|
|
- if (allow_write(user_id, model_id)):
|
|
|
|
- // We must be able to write the RAMification model, as we will update it in-place
|
|
|
|
- trace_links = allOutgoingAssociationInstances(core, model_id, "tracability")
|
|
|
|
- merged_model_id = ""
|
|
|
|
- while (read_nr_out(trace_links) > 0):
|
|
|
|
- trace_link = set_pop(trace_links)
|
|
|
|
- if (value_eq(read_attribute(core, trace_link, "type"), "RAMified")):
|
|
|
|
- // Found a RAMification link, so redo it on the original model
|
|
|
|
- merged_model_id = readAssociationDestination(core, trace_link)
|
|
|
|
-
|
|
|
|
- if (merged_model_id != ""):
|
|
|
|
- new_model = ramify(core["model"][merged_model_id])
|
|
|
|
- model_overwrite(new_model, model_id)
|
|
|
|
- else:
|
|
|
|
- output("Could not determine original model of RAMified metamodel!")
|
|
|
|
- else:
|
|
|
|
- output("Permission denied")
|
|
|
|
- else:
|
|
|
|
- output("No such model")
|
|
|
|
-
|
|
|
|
elif (cmd == "transformation_add_MT"):
|
|
elif (cmd == "transformation_add_MT"):
|
|
// Add a model transformation model
|
|
// Add a model transformation model
|
|
// Just a usual model instantiation, but need to add the source and target links based on user info
|
|
// Just a usual model instantiation, but need to add the source and target links based on user info
|