Unified Modeling Language Reference Manual, The, Second Edition
by James Rumbaugh, Ivar Jacobson, Grady Booch
invariant
A constraint that must be true at all times (or at least at all times when no operation is incomplete), or at least at all times during a specified time interval or when specified conditions are true.
Semantics
An invariant is a Boolean expression that must be true at all times when specified conditions are true. It is not expected to be true below a certain granularity, for example, during the execution of an operation that updates the values on which the constraint depends. The exact granularity is often implied rather than stated formally. An invariant is an assertion, not an executable statement. If it fails, the model is ill formed; it is not intended to specify a corrective action (although bug-checking software might well take ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access