|
@@ -263,13 +263,20 @@ String function conformance_scd(model : Element):
|
|
|
if (result != "OK"):
|
|
|
return ((("Complex attribute doesn't match for: " + complex_instance) + "\n Message: ") + result)!
|
|
|
|
|
|
- // Structure seems fine, now do static semantics
|
|
|
- if (dict_in(metamodel, "constraints")):
|
|
|
- Element constraint_function
|
|
|
- constraint_function = metamodel["constraints"]
|
|
|
- return constraint_function(model)!
|
|
|
- else:
|
|
|
- return "OK"!
|
|
|
+ // Structure seems fine, now do global constraints
|
|
|
+ Element global_constraints
|
|
|
+ String constraint
|
|
|
+ Element func
|
|
|
+
|
|
|
+ global_constraints = allInstances(model, "GlobalConstraints")
|
|
|
+ while (read_nr_out(global_constraints) > 0):
|
|
|
+ constraint = set_pop(global_constraints)
|
|
|
+ func = get_func_AL_model(import_node(read_attribute(model, constraint, "global_constraint")))
|
|
|
+ result = func(model)
|
|
|
+ if (result != "OK"):
|
|
|
+ return result!
|
|
|
+
|
|
|
+ return "OK"!
|
|
|
|
|
|
String function check_location_conformance(instance_location : String, type_location : String):
|
|
|
// Check whether the instance is typed by the type
|