|
@@ -49,7 +49,7 @@ Element function get_full_model(model_id : String, metamodel_id : String):
|
|
|
|
|
|
choice = get_instanceOf_link(model_id, metamodel_id)
|
|
|
|
|
|
- m = create_node()
|
|
|
+ m = dict_create()
|
|
|
dict_add(m, "model", import_node(read_attribute(core, model_id, "location")))
|
|
|
dict_add(m, "type_mapping", import_node(read_attribute(core, choice, "typing_location")))
|
|
|
dict_add(m, "semantics", set_pop(allAssociationDestinations(core, choice, "semantics")))
|
|
@@ -345,13 +345,13 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
Element output_metamodels
|
|
|
Element iter
|
|
|
String edge
|
|
|
- input_metamodels = create_node()
|
|
|
+ input_metamodels = dict_create()
|
|
|
iter = allOutgoingAssociationInstances(core, operation_id, "transformInput")
|
|
|
while (read_nr_out(iter) > 0):
|
|
|
edge = set_pop(iter)
|
|
|
dict_add(input_metamodels, read_attribute(core, edge, "name"), read_attribute(core, readAssociationDestination(core, edge), "name"))
|
|
|
|
|
|
- output_metamodels = create_node()
|
|
|
+ output_metamodels = dict_create()
|
|
|
iter = allOutgoingAssociationInstances(core, operation_id, "transformOutput")
|
|
|
while (read_nr_out(iter) > 0):
|
|
|
edge = set_pop(iter)
|
|
@@ -370,7 +370,7 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
// 2) Merge source models
|
|
|
|
|
|
if (merged_metamodel_id != ""):
|
|
|
- model_tuples = create_node()
|
|
|
+ model_tuples = set_create()
|
|
|
keys = dict_keys(input_models)
|
|
|
while (read_nr_out(keys) > 0):
|
|
|
key = set_pop(keys)
|
|
@@ -420,7 +420,7 @@ Element function execute_operation(operation_id : String, input_models : Element
|
|
|
tracability = False
|
|
|
|
|
|
if (result):
|
|
|
- model_tuples = create_node()
|
|
|
+ model_tuples = set_create()
|
|
|
keys = dict_keys(output_models)
|
|
|
while (read_nr_out(keys) > 0):
|
|
|
key = set_pop(keys)
|
|
@@ -468,9 +468,9 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
|
|
|
String produce
|
|
|
Element output_map
|
|
|
|
|
|
- inputs = create_node()
|
|
|
- outputs = create_node()
|
|
|
- output_map = create_node()
|
|
|
+ inputs = dict_create()
|
|
|
+ outputs = dict_create()
|
|
|
+ output_map = dict_create()
|
|
|
|
|
|
// Read out the referenced element from the MvC
|
|
|
transformation_id = get_model_id(read_attribute(pm, element, "name"))
|
|
@@ -531,13 +531,13 @@ Void function enact_PM(pm : Element, prefix : String, user_id : String):
|
|
|
output("Success")
|
|
|
|
|
|
// Initialize Join counters
|
|
|
- counters = create_node()
|
|
|
+ counters = dict_create()
|
|
|
join_nodes = allInstances(pm, "Join")
|
|
|
while (read_nr_out(join_nodes) > 0):
|
|
|
dict_add(counters, set_pop(join_nodes), 0)
|
|
|
|
|
|
// Create the worklist with the Start instance as first element
|
|
|
- worklist = create_node()
|
|
|
+ worklist = set_create()
|
|
|
set_add(worklist, create_tuple(set_pop(allInstances(pm, "Start")), True))
|
|
|
|
|
|
while (bool_not(pm_finished(worklist, pm))):
|
|
@@ -757,12 +757,12 @@ String function cmd_model_render(user_id : String, model_name : String, mapper_n
|
|
|
tracability_name = (("__TRACABILITY_" + model_name) + "__") + mapper_name
|
|
|
|
|
|
// Take the abstract syntax model and the previously rendered model
|
|
|
- inputs = create_node()
|
|
|
+ inputs = dict_create()
|
|
|
dict_add(inputs, "abstract", model_name)
|
|
|
dict_add(inputs, "rendered", rendered_name)
|
|
|
|
|
|
// Fetch the output types
|
|
|
- output_map = create_node()
|
|
|
+ output_map = dict_create()
|
|
|
out_links = allOutgoingAssociationInstances(core, mapper_ID, "transformOutput")
|
|
|
while(read_nr_out(out_links) > 0):
|
|
|
link = set_pop(out_links)
|
|
@@ -829,7 +829,7 @@ String function cmd_transformation_execute(user_id : String, transformation_name
|
|
|
if (allow_read(user_id, transformation_id)):
|
|
|
if (is_nominal_instance(core, transformation_id, "Transformation")):
|
|
|
// Read out source and target links
|
|
|
- inputs = create_node()
|
|
|
+ inputs = dict_create()
|
|
|
|
|
|
sources = allOutgoingAssociationInstances(core, transformation_id, "transformInput")
|
|
|
while (read_nr_out(sources) > 0):
|
|
@@ -858,8 +858,8 @@ String function cmd_transformation_execute(user_id : String, transformation_name
|
|
|
return "Model not found: " + source_model_name!
|
|
|
|
|
|
targets = allOutgoingAssociationInstances(core, transformation_id, "transformOutput")
|
|
|
- outputs = create_node()
|
|
|
- output_map = create_node()
|
|
|
+ outputs = dict_create()
|
|
|
+ output_map = dict_create()
|
|
|
while (read_nr_out(targets) > 0):
|
|
|
target = set_pop(targets)
|
|
|
assoc_name = read_attribute(core, target, "name")
|
|
@@ -941,9 +941,9 @@ String function cmd_new_verify(user_id : String, model_name : String, metamodel_
|
|
|
Element conformance
|
|
|
|
|
|
conformance_operation = set_pop(allAssociationDestinations(core, get_instanceOf_link(model_id, get_model_id(metamodel_name)), "semantics"))
|
|
|
- inputs = create_node()
|
|
|
+ inputs = dict_create()
|
|
|
dict_add(inputs, "SimpleClassDiagrams", model_name)
|
|
|
- result = execute_operation(conformance_operation, inputs, create_node(), read_root())
|
|
|
+ result = execute_operation(conformance_operation, inputs, dict_create(), read_root())
|
|
|
return ""!
|
|
|
else:
|
|
|
return "Permission denied to model: " + model_name!
|
|
@@ -1065,10 +1065,10 @@ String function transformation_add(user_id : String, source_models : Element, ta
|
|
|
Element keys
|
|
|
String key
|
|
|
|
|
|
- source = create_node()
|
|
|
- target = create_node()
|
|
|
- all_formalisms = create_node()
|
|
|
- formalism_map = create_node()
|
|
|
+ source = dict_create()
|
|
|
+ target = dict_create()
|
|
|
+ all_formalisms = set_create()
|
|
|
+ formalism_map = set_create()
|
|
|
|
|
|
keys = dict_keys(source_models)
|
|
|
while (read_nr_out(keys) > 0):
|
|
@@ -1185,9 +1185,9 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
|
|
|
String merged_formalism_id
|
|
|
String tracability_link
|
|
|
|
|
|
- source = create_node()
|
|
|
- target = create_node()
|
|
|
- to_ramify = create_node()
|
|
|
+ source = dict_create()
|
|
|
+ target = dict_create()
|
|
|
+ to_ramify = set_create()
|
|
|
|
|
|
keys = dict_keys(source_models)
|
|
|
while (read_nr_out(keys) > 0):
|