Activity 13: Define a data constraint
-
Add the following data constraint which expresses that when the return of money is requested, the delivered amount cannot be negative:
data constraints variables int val returnReg command ReturnMoney;reply(val) where val >= 0 observe returned := val
The last line specifies that the value has to be stored using variable returned to obtain statistical information about the values returned.
-
Run the monitoring and inspect the results. Note that the monitoring dashboard contains statistics about the data constraint.