Parcourir la source

Added missing increment of loop counter

Yentl Van Tendeloo il y a 9 ans
Parent
commit
efb909e1e4
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 6 1
      bootstrap/modelling.alc

+ 6 - 1
bootstrap/modelling.alc

@@ -115,10 +115,14 @@ Element function get_superclasses(model : Element, elem : Element):
 
 	// Read out all outgoing edges
 	num_edges = read_nr_out(elem)
+	log(cast_i2s(num_edges))
 	while (i < num_edges):
+		log("Search SC")
 		edge = read_out(elem, i)
+		log(cast_e2s(edge))
 		if (element_eq(dict_read_node(model["type_mapping"], edge), model["inheritance"])):
 			create_edge(result, read_edge_dst(edge))
+		i = i + 1
 
 	return result
 
@@ -134,6 +138,7 @@ Element function find_attribute_definer(model : Element, elem : Element, name :
 
 		superclasses = get_superclasses(model, elem)
 		while (list_len(superclasses) > 0):
+			log("Search")
 			current = set_pop(superclasses)
 			found = find_attribute_definer(model, current, name)
 			if (bool_not(element_eq(found, read_root()))):
@@ -151,7 +156,7 @@ Void function instantiate_attribute(model : Element, element : String, attribute
 
 	attr_type = find_attribute_type(model, element, attribute_name)
 	attr_name = model_add_value(model, "", value)
-	retype(attr_name, getName(model["metamodel"], read_edge_dst(model["metamodel"]["model"][attr_type])))
+	retype(model, attr_name, getName(model["metamodel"], read_edge_dst(model["metamodel"]["model"][attr_type])))
 	instantiate_link(model, attr_type, "", element, value)
 
 	return