|
@@ -132,6 +132,7 @@ String function conformance_scd(model : Element):
|
|
|
keys = dict_keys(model["model"])
|
|
|
while (0 < list_len(keys)):
|
|
|
model_name = set_pop(keys)
|
|
|
+ log("Check element " + model_name)
|
|
|
element = model["model"][model_name]
|
|
|
|
|
|
if (bool_not(dict_in_node(typing, element))):
|
|
@@ -165,8 +166,11 @@ String function conformance_scd(model : Element):
|
|
|
Integer upper_val
|
|
|
Integer instances
|
|
|
|
|
|
+ log("Check cardinalities")
|
|
|
check_list = selectPossibleOutgoing(model, model_name, dict_keys(cardinalities))
|
|
|
+ log("Got outgoing")
|
|
|
while (0 < list_len(check_list)):
|
|
|
+ log("Loop")
|
|
|
check_type = set_pop(check_list)
|
|
|
if (dict_in(cardinalities, check_type)):
|
|
|
// Cardinalities defined for this association, so check them
|
|
@@ -184,7 +188,9 @@ String function conformance_scd(model : Element):
|
|
|
|
|
|
// Identical, but for outgoing, and thus for A in the figure
|
|
|
check_list = selectPossibleIncoming(model, model_name, dict_keys(cardinalities))
|
|
|
+ log("Got incoming")
|
|
|
while (0 < list_len(check_list)):
|
|
|
+ log("Loop")
|
|
|
check_type = set_pop(check_list)
|
|
|
if (dict_in(cardinalities, check_type)):
|
|
|
// Cardinalities defined for this association, so check them
|
|
@@ -200,6 +206,7 @@ String function conformance_scd(model : Element):
|
|
|
if (integer_lt(cardinalities[check_type]["suc"], instances)):
|
|
|
return "Upper cardinality violation for incoming edge at " + model_name
|
|
|
|
|
|
+ log("Finished, check multiplicities")
|
|
|
// Check multiplicities, if they are defined (optional)
|
|
|
Element metamodel_keys
|
|
|
String metamodel_element
|