Constraints over function results make little sense/should be expressed in other ways. Should be discouraged.


Constraining operations/methods (e.g. is_integral from dv_quantity) make little sense when dealing with data (you are fixing the result of the operation, not executing the operation itself). This allows the generation of 'wrong' instances that do in fact follow the archetype (in the former example, if the result is fixed to 'true' but nothing is said to the precision, then having data instances with precision >0 and is_integral = true would be compliant with the archetype).

This kind of constraints should be transformed to assertions/rules in order to really being able to test or calculate the values.


Diego Bosca