Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
Overview of Ada 2022
Jeff Cousins
Contents   Index   Search   Previous   Next 

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 unit. 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 analysis tools.

Contents   Index   Search   Previous   Next 
© 2021, 2022 Jeff Cousins