|
@@ -169,14 +169,15 @@ String function conformance_scd(model : Element):
|
|
if (dict_in(cardinalities[check_type], "tlc")):
|
|
if (dict_in(cardinalities[check_type], "tlc")):
|
|
// A lower cardinality was defined at the target
|
|
// A lower cardinality was defined at the target
|
|
if (integer_gt(cardinalities[check_type]["tlc"], instances)):
|
|
if (integer_gt(cardinalities[check_type]["tlc"], instances)):
|
|
- return "Lower cardinality violation for outgoing edge at " + model_info(model, model_name)
|
|
|
|
|
|
+ String error
|
|
|
|
+ error = (("Lower cardinality violation for outgoing edge of type " + check_type) + " at ") + model_info(model, model_name)
|
|
|
|
+ return error
|
|
if (dict_in(cardinalities[check_type], "tuc")):
|
|
if (dict_in(cardinalities[check_type], "tuc")):
|
|
// An upper cardinality was defined at the target
|
|
// An upper cardinality was defined at the target
|
|
if (integer_lt(cardinalities[check_type]["tuc"], instances)):
|
|
if (integer_lt(cardinalities[check_type]["tuc"], instances)):
|
|
- log("Instances: " + cast_i2s(instances))
|
|
|
|
- log("Cardinalities: " + cast_i2s(cardinalities[check_type]["tuc"]))
|
|
|
|
- log("Type: " + check_type)
|
|
|
|
- return "Upper cardinality violation for outgoing edge at " + model_info(model, model_name)
|
|
|
|
|
|
+ String error
|
|
|
|
+ error = (("Upper cardinality violation for outgoing edge of type " + check_type) + " at ") + model_info(model, model_name)
|
|
|
|
+ return error
|
|
|
|
|
|
// Identical, but for outgoing, and thus for A in the figure
|
|
// Identical, but for outgoing, and thus for A in the figure
|
|
if (bool_not(dict_in(spi_cache, type_name))):
|
|
if (bool_not(dict_in(spi_cache, type_name))):
|
|
@@ -192,11 +193,15 @@ String function conformance_scd(model : Element):
|
|
if (dict_in(cardinalities[check_type], "slc")):
|
|
if (dict_in(cardinalities[check_type], "slc")):
|
|
// A lower cardinality was defined at the source
|
|
// A lower cardinality was defined at the source
|
|
if (integer_gt(cardinalities[check_type]["slc"], instances)):
|
|
if (integer_gt(cardinalities[check_type]["slc"], instances)):
|
|
- return "Lower cardinality violation for incoming edge at " + model_info(model, model_name)
|
|
|
|
|
|
+ String error
|
|
|
|
+ error = (("Lower cardinality violation for incoming edge of type " + check_type) + " at ") + model_info(model, model_name)
|
|
|
|
+ return error
|
|
if (dict_in(cardinalities[check_type], "suc")):
|
|
if (dict_in(cardinalities[check_type], "suc")):
|
|
// An upper cardinality was defined at the source
|
|
// An upper cardinality was defined at the source
|
|
if (integer_lt(cardinalities[check_type]["suc"], instances)):
|
|
if (integer_lt(cardinalities[check_type]["suc"], instances)):
|
|
- return "Upper cardinality violation for incoming edge at " + model_info(model, model_name)
|
|
|
|
|
|
+ String error
|
|
|
|
+ error = (("Upper cardinality violation for incoming edge of type " + check_type) + " at ") + model_info(model, model_name)
|
|
|
|
+ return error
|
|
|
|
|
|
Element constraint_function
|
|
Element constraint_function
|
|
constraint_function = read_attribute(metamodel, reverseKeyLookup(metamodel["model"], dict_read_node(typing, element)), "constraint")
|
|
constraint_function = read_attribute(metamodel, reverseKeyLookup(metamodel["model"], dict_read_node(typing, element)), "constraint")
|