Skip to content

drill.c - Many constraints / invariants are undocumented and/or implied #213

@henrygab

Description

@henrygab

This reduces maintainability of the code, and increases the likelihood of errors.

This is especially true when new maintainers attempt to fix bugs.

With invariant checking functions implemented, multiple benefits acrue:

  1. implicit rules become explicit.
  2. if explicit rule fires an assertion, it can more easily be reasoned over (and changed / edited / removed / adjusted)
  3. time is not wasted trying to guess if condition was invariant, or if condition was accidental
  4. documentation is improved ... and because it's a live check, the code becomes the documentation

Add functions that will validate the invariants hold true.
E.g., add function to validate invariants for drill_state_t

Fixed by #210

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions