An Inductive Invariant for a Reservation Counter

An inductive state invariant is true initially and maintained by every allowed transition. A counter rule can be checked at each operation.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace an allowed removal
  2. Check the fuller statement

Trace an allowed removal

Start with four free seats. An operation subtracting one only when free is positive keeps the counter nonnegative. A release adds one, subject to any upper-bound rule. See state transition tables.

Check the fuller statement

If the counter must also remain at most four, the release rule needs its own condition. Inductive invariants give the general method.[1]

References

  1. Benjamin C. Pierce et al., Software Foundations ↩