Overview of Ada 2022
Chapter 3: Contracts
Ada 83 introduced the generic contract model, whereby
a contract is imposed on the types that can be used to instantiate a
Parameter modes, and subtypes with constraints,
also dating from Ada 83, can be regarded as forms of contract.
Ada 2012 added new forms: preconditions, postconditions, type invariants
and subtype predicates.
Ada 2022 adds further forms: aspect Nonblocking
states that no potentially blocking operation should be called; global-in
and global-out annotations to describe the use of global objects. Ada
2022 also offers improvements to the existing forms of contract. One
of the key benefits of contracts is that they allow checking by static
© 2021, 2022 Jeff Cousins