Browse Source

Fixed some more bugs in RAMify attributes

Yentl Van Tendeloo 8 years ago
parent
commit
34683d3173
1 changed files with 6 additions and 6 deletions
  1. 6 6
      bootstrap/ramify.alc

+ 6 - 6
bootstrap/ramify.alc

@@ -139,10 +139,10 @@ Element function ramify(model : Element):
 			cnt = read_nr_out(copied_attributes)
 			while (i < cnt):
 				attr_name = read_edge_dst(read_out(copied_attributes, i))
-				if (element_neq(read_attribute(old_m, key, attr_name), read_root())):
+				if (element_neq(read_attribute(model, key, attr_name), read_root())):
 					// Attribute was defined, so reassign in both LHS and RHS
-					instantiate_attribute(new_model, "Pre_" + key, attr_name, read_attribute(old_m, key, attr_name))
-					instantiate_attribute(new_model, "Post_" + key, attr_name, read_attribute(old_m, key, attr_name))
+					instantiate_attribute(new_model, "Pre_" + key, attr_name, read_attribute(model, key, attr_name))
+					instantiate_attribute(new_model, "Post_" + key, attr_name, read_attribute(model, key, attr_name))
 				i = i + 1
 
 		elif (type_name == "AttributeLink"):
@@ -182,10 +182,10 @@ Element function ramify(model : Element):
 			cnt = read_nr_out(copied_attributes)
 			while (i < cnt):
 				attr_name = read_edge_dst(read_out(copied_attributes, i))
-				if (element_neq(read_attribute(old_m, key, attr_name), read_root())):
+				if (element_neq(read_attribute(model, key, attr_name), read_root())):
 					// Attribute was defined, so reassign in both LHS and RHS
-					instantiate_attribute(new_model, "Pre_" + key, attr_name, read_attribute(old_m, key, attr_name))
-					instantiate_attribute(new_model, "Post_" + key, attr_name, read_attribute(old_m, key, attr_name))
+					instantiate_attribute(new_model, "Pre_" + key, attr_name, read_attribute(model, key, attr_name))
+					instantiate_attribute(new_model, "Post_" + key, attr_name, read_attribute(model, key, attr_name))
 				i = i + 1
 
 		elif (type_name == "Inheritance"):