|
@@ -23,7 +23,6 @@ Boolean function is_nominal_subtype(metamodel : Element, subclass : Element, sup
|
|
|
Element new_superclass
|
|
|
Element result
|
|
|
|
|
|
- log((("Nominal subtype? " + reverseKeyLookup(metamodel["model"], subclass)) + " --|> ") + reverseKeyLookup(metamodel["model"], superclass))
|
|
|
superclasses = get_superclasses(metamodel, subclass)
|
|
|
|
|
|
while (0 < list_len(superclasses)):
|
|
@@ -123,8 +122,6 @@ String function conformance_scd(model : Element):
|
|
|
|
|
|
if (list_len(tmp_dict) > 0):
|
|
|
dict_add(cardinalities, key, tmp_dict)
|
|
|
- else:
|
|
|
- log("Not checking cardinalities of " + key)
|
|
|
|
|
|
// Iterate over each element of the model, finding out whether everything is fine
|
|
|
keys = dict_keys(model["model"])
|
|
@@ -159,7 +156,6 @@ String function conformance_scd(model : Element):
|
|
|
// A ---------------------> B
|
|
|
//
|
|
|
// First the incoming, so we are at B in the above figure
|
|
|
- log("At element " + model_name)
|
|
|
Integer lower_val
|
|
|
Integer upper_val
|
|
|
Integer instances
|
|
@@ -169,7 +165,6 @@ String function conformance_scd(model : Element):
|
|
|
check_type = set_pop(check_list)
|
|
|
if (dict_in(cardinalities, reverseKeyLookup(metamodel["model"], check_type))):
|
|
|
// Cardinalities defined for this association, so check them
|
|
|
- log(" check " + reverseKeyLookup(metamodel["model"], check_type))
|
|
|
lower_val = cardinalities[check_type]["tlc"]
|
|
|
upper_val = cardinalities[check_type]["tlc"]
|
|
|
instances = list_len(allIncomingAssociationInstances(model, element, check_type))
|
|
@@ -188,7 +183,6 @@ String function conformance_scd(model : Element):
|
|
|
check_type = set_pop(check_list)
|
|
|
if (dict_in(cardinalities, reverseKeyLookup(metamodel["model"], check_type))):
|
|
|
// Cardinalities defined for this association, so check them
|
|
|
- log(" check " + reverseKeyLookup(metamodel["model"], check_type))
|
|
|
lower_val = cardinalities[check_type]["slc"]
|
|
|
upper_val = cardinalities[check_type]["slc"]
|
|
|
instances = list_len(allOutgoingAssociationInstances(model, element, check_type))
|