Unified Modeling Language Reference Manual, The, Second Edition
by James Rumbaugh, Ivar Jacobson, Grady Booch
precondition
A constraint that must be true when an operation is invoked.
See also postcondition.
Semantics
A precondition is a Boolean expression that must be true when an operation is called. It is the responsibility of the caller to satisfy the condition. The receiver should not have to check the condition. A precondition is not a guard condition. It is a condition that must be true, not a way to optionally execute an operation. As an implementation practice, it can be useful to test the precondition at the beginning of the operation, but this is in the nature of debugging a program. The condition is supposed to be true, and anything else is a programming error. If the condition is not satisfied, no statement can be made about the integrity ...
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