Next: Verification Implementation
Up: Design By Contract /
Previous: Design By Contract /
Basic Idea of Verification:
Statements that verify that specified conditions are true are
conditionally compiled into the code, allowing error checking that
can be turned off completely for fast execution.
Basic Idea of Design by Contract:
Routines satisfy a contract when they are called - input requirements
are verified upon entry and output guarantees are verified prior to exit.
These are very simple, but very powerful ideas. Unfortunately, the
main proponents of these ideas (Eiffel and C++) use bad nomenclature.
Here's a translation table, so you'll recognize these ideas in other venues:
Eiffel or C++ |
English |
assert |
verify |
precondition |
requirement |
postcondition |
guarantee |
class invariant |
valid state |
require |
verify (on routine entry) |
ensure |
verify (on routine exit) |
Next: Verification Implementation
Up: Design By Contract /
Previous: Design By Contract /
Michael L. Hall