Making a Claim About Program State
A state claim describes values allowed at a particular point. Specifying that point matters because operations can change whether the claim holds.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a reservation
If three slots remain and one valid reservation occurs, two slots remain afterward. The observation “at least one slot remains” holds both before and after this particular update. See input, state, and output.
Check another starting value
Beginning at one leaves zero after one reservation. A general invariant can instead claim availability never becomes negative. Representation invariants describe which operations must preserve it.[1]