Browse Source

Fixed finding of types for bottom type

Yentl Van Tendeloo 8 years ago
parent
commit
471fb835f1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      bootstrap/conformance_finding.alc

+ 4 - 2
bootstrap/conformance_finding.alc

@@ -33,6 +33,8 @@ Boolean function find_type_mapping(model : Element):
 		
 	// 2) find a mapping based on the current partial mapping, but only if it is not yet complete
 	if (dict_len(model["model"]) > dict_len(tm)):
+		log("Searching for model type!")
+
 		result = True
 		// TODO for now, this only returns something for a simple case, where the MM has one edge, and one node
 		//      and it makes the assumption that SCD is the M3 level...
@@ -48,11 +50,11 @@ Boolean function find_type_mapping(model : Element):
 		while (set_len(elems) > 0):
 			elem = set_pop(elems)
 
-			if (bool_not(is_edge(elem))):
+			if (bool_not(is_edge(model["metamodel"]["model"][elem]))):
 				node_element = elem
 			else:
 				// Is an edge, but might be the inheritance link...
-				if (read_type(model["metamodel"]["model"], elem) != "Inheritance"):
+				if (read_type(model["metamodel"], elem) != "Inheritance"):
 					// Is not the inheritance link
 					edge_element = elem