Procházet zdrojové kódy

Removed the infinite loop when a tracability link exists to/from a submodel not in the outputs

Yentl Van Tendeloo před 7 roky
rodič
revize
c083413b20
1 změnil soubory, kde provedl 11 přidání a 15 odebrání
  1. 11 15
      bootstrap/model_management.alc

+ 11 - 15
bootstrap/model_management.alc

@@ -272,21 +272,17 @@ Element function model_split(merged_model : Element, models : Element, tracabili
 				src = reverse[cast_id2s(read_edge_src(elem))]
 				dst = reverse[cast_id2s(read_edge_dst(elem))]
 
-				if (bool_and(dict_in(mapping, src), dict_in(mapping, dst))):
-					// All present, so create the link between them
-					src_name = list_pop_final(string_split(src, "/"))
-					dst_name = list_pop_final(string_split(dst, "/"))
-
-					source = instantiate_node(tracability_model, "Reference", "")
-					target = instantiate_node(tracability_model, "Reference", "")
-					instantiate_attribute(tracability_model, source, "name", src_name)
-					instantiate_attribute(tracability_model, target, "name", dst_name)
-
-					link = instantiate_link(tracability_model, "TracabilityLink", "", source, target)
-					instantiate_attribute(tracability_model, link, "type", type)
-				else:
-					// Not yet available!
-					set_add(second_keys, key)
+				// All present, so create the link between them
+				src_name = list_pop_final(string_split(src, "/"))
+				dst_name = list_pop_final(string_split(dst, "/"))
+
+				source = instantiate_node(tracability_model, "Reference", "")
+				target = instantiate_node(tracability_model, "Reference", "")
+				instantiate_attribute(tracability_model, source, "name", src_name)
+				instantiate_attribute(tracability_model, target, "name", dst_name)
+
+				link = instantiate_link(tracability_model, "TracabilityLink", "", source, target)
+				instantiate_attribute(tracability_model, link, "type", type)
 		else:
 			retyping_key = splitted[0]
 			if (list_len(string_split(key, "/")) > 1):