Читал OCUP Guide и не смог понять для чего StateInvariant.
В офф.спецификации написано:
"A StateInvariant is a runtime constraint on the participants of the interaction. It may be used to specify a variety of different kinds of constraints, such as values of attributes or variables, internal or external states, and so on.
The Constraint is assumed to be evaluated during runtime. The Constraint is evaluated immediately prior to the execution of the next OccurrenceSpecification such that all actions that are not explicitly modeled have been executed. If the Constraint is true, the trace is a valid trace; if the Constraint is false, the trace is an invalid trace. In other words all traces
that have a StateInvariant with a false Constraint are considered invalid."
Ну допустим, trace is an invalid trace, и что дальше происходит? Для чего это проверять?
Прикрепленный пример из спецификации.