|
@@ -63,7 +63,7 @@ Element function precompute_cardinalities(model : Element):
|
|
|
keys = allInstances(metamodel, "Association")
|
|
|
|
|
|
cardinalities = dict_create()
|
|
|
- while (0 < list_len(keys)):
|
|
|
+ while (0 < set_len(keys)):
|
|
|
key = set_pop(keys)
|
|
|
tmp_dict = dict_create()
|
|
|
slc = read_attribute(metamodel, key, "source_lower_cardinality")
|
|
@@ -80,11 +80,11 @@ Element function precompute_cardinalities(model : Element):
|
|
|
if (element_neq(tuc, read_root())):
|
|
|
dict_add_fast(tmp_dict, "tuc", tuc)
|
|
|
|
|
|
- if (list_len(tmp_dict) > 0):
|
|
|
+ if (dict_len(tmp_dict) > 0):
|
|
|
dict_add_fast(cardinalities, key, tmp_dict)
|
|
|
|
|
|
keys = allInstances(metamodel, "AttributeLink")
|
|
|
- while (0 < list_len(keys)):
|
|
|
+ while (0 < set_len(keys)):
|
|
|
key = set_pop(keys)
|
|
|
tmp_dict = dict_create()
|
|
|
|
|
@@ -98,7 +98,7 @@ Element function precompute_cardinalities(model : Element):
|
|
|
else:
|
|
|
dict_add_fast(tmp_dict, "tlc", 1)
|
|
|
|
|
|
- if (list_len(tmp_dict) > 0):
|
|
|
+ if (dict_len(tmp_dict) > 0):
|
|
|
dict_add_fast(cardinalities, key, tmp_dict)
|
|
|
|
|
|
return cardinalities!
|
|
@@ -138,7 +138,7 @@ String function conformance_scd(model : Element):
|
|
|
typing = model["type_mapping"]
|
|
|
|
|
|
// Create dictionary with all associations and allowed cardinalities
|
|
|
- if (list_len(model["model"]) > 0):
|
|
|
+ if (dict_len(model["model"]) > 0):
|
|
|
cardinalities = precompute_cardinalities(model)
|
|
|
|
|
|
// Iterate over each element of the model, finding out whether everything is fine
|