|
@@ -180,14 +180,14 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
|
|
|
src = cast_id2s(read_edge_src(model["model"][key]))
|
|
|
dst = cast_id2s(read_edge_dst(model["model"][key]))
|
|
|
if (bool_and(dict_in(elem_map, src), dict_in(elem_map, dst))):
|
|
|
- new_name = instantiate_link(new_model, retyping_key + type, key, elem_map[src], elem_map[dst])
|
|
|
+ new_name = instantiate_link(new_model, retyping_key + type, "", elem_map[src], elem_map[dst])
|
|
|
else:
|
|
|
set_add(second_keys, key)
|
|
|
new_name = ""
|
|
|
elif (has_value(model["model"][key])):
|
|
|
- new_name = instantiate_value(new_model, retyping_key + type, key, model["model"][key])
|
|
|
+ new_name = instantiate_value(new_model, retyping_key + type, "", model["model"][key])
|
|
|
else:
|
|
|
- new_name = instantiate_node(new_model, retyping_key + type, key)
|
|
|
+ new_name = instantiate_node(new_model, retyping_key + type, "")
|
|
|
|
|
|
if (new_name != ""):
|
|
|
// Add the new name to a map which registers the mapping to the new name
|
|
@@ -286,7 +286,6 @@ Element function model_split(merged_model : Element, models : Element, tracabili
|
|
|
src_name = list_read(string_split(read_type(merged_model, src), "/"), 0)
|
|
|
dst_name = list_read(string_split(read_type(merged_model, dst), "/"), 0)
|
|
|
|
|
|
-
|
|
|
// Check if we actually keep both models around, as otherwise it is useless anyway
|
|
|
if (bool_and(dict_in(result, src_name), dict_in(result, dst_name))):
|
|
|
if (bool_and(dict_in(mapping, src), dict_in(mapping, dst))):
|
|
@@ -321,7 +320,7 @@ Element function model_split(merged_model : Element, models : Element, tracabili
|
|
|
// Though we first check the model to which it was mapped, as this should be the same as we have now
|
|
|
if (bool_and(dict_in(result[retyping_key]["model"], mapping[src]), dict_in(result[retyping_key]["model"], mapping[dst]))):
|
|
|
// The matching worked fine
|
|
|
- dict_add_fast(mapping, key, instantiate_link(result[retyping_key], original_type, "", mapping[src], mapping[dst]))
|
|
|
+ dict_add_fast(mapping, key, instantiate_link(result[retyping_key], original_type, key, mapping[src], mapping[dst]))
|
|
|
else:
|
|
|
log("ERROR mapping: source/target mapped to model, but not found in expected model; ignoring")
|
|
|
else:
|
|
@@ -330,11 +329,11 @@ Element function model_split(merged_model : Element, models : Element, tracabili
|
|
|
|
|
|
elif (has_value(elem)):
|
|
|
// Has a value, so copy that as well
|
|
|
- dict_add_fast(mapping, key, instantiate_value(result[retyping_key], original_type, "", elem))
|
|
|
+ dict_add_fast(mapping, key, instantiate_value(result[retyping_key], original_type, key, elem))
|
|
|
|
|
|
else:
|
|
|
// Is a node
|
|
|
- dict_add_fast(mapping, key, instantiate_node(result[retyping_key], original_type, ""))
|
|
|
+ dict_add_fast(mapping, key, instantiate_node(result[retyping_key], original_type, key))
|
|
|
|
|
|
if (read_nr_out(keys) == 0):
|
|
|
keys = second_keys
|