Design safe Ada types with contracts

8 steps · about 3 h 50 min · Intermediate

  1. See how strong typing prevents mixing (guide, AdaCore learning materials, 20 min)

    This establishes the concepts the later implementation relies on.

  2. Define precise scalar types (guide, AdaCore learning materials, 30 min)

    This adds the next capability while keeping the design explicit.

  3. Constrain values with subtypes (guide, AdaCore learning materials, 40 min)

    This step turns the concept into a checkable part of the finished program.

  4. Group related domain values (guide, AdaCore learning materials, 20 min)

    This establishes the concepts the later implementation relies on.

  5. Hide representation in packages (guide, AdaCore learning materials, 30 min)

    This adds the next capability while keeping the design explicit.

  6. State preconditions and invariants (guide, AdaCore learning materials, 40 min)

    This step turns the concept into a checkable part of the finished program.

  7. Handle boundary failures (guide, AdaCore learning materials, 20 min)

    This establishes the concepts the later implementation relies on.

  8. Reuse checked abstractions (reference, AdaCore learning materials, 30 min)

    This adds the next capability while keeping the design explicit.