Design safe Ada types with contracts
8 steps · about 3 h 50 min · Intermediate
- See how strong typing prevents mixing (guide, AdaCore learning materials, 20 min)
This establishes the concepts the later implementation relies on.
- Define precise scalar types (guide, AdaCore learning materials, 30 min)
This adds the next capability while keeping the design explicit.
- Constrain values with subtypes (guide, AdaCore learning materials, 40 min)
This step turns the concept into a checkable part of the finished program.
- Group related domain values (guide, AdaCore learning materials, 20 min)
This establishes the concepts the later implementation relies on.
- Hide representation in packages (guide, AdaCore learning materials, 30 min)
This adds the next capability while keeping the design explicit.
- State preconditions and invariants (guide, AdaCore learning materials, 40 min)
This step turns the concept into a checkable part of the finished program.
- Handle boundary failures (guide, AdaCore learning materials, 20 min)
This establishes the concepts the later implementation relies on.
- Reuse checked abstractions (reference, AdaCore learning materials, 30 min)
This adds the next capability while keeping the design explicit.