Bit Flags
In this exercise we will model a series of bit flags using a function.
Variables
The spec should contain a single variable bits, which is a function whose domain {1, 2, 3} represents the bit indices and whose range {0, 1} represents the value of each bit.
Initial State
Initially all bits should be set to 0.
Transitions
- Any bit
iwhose value is0can be flipped to1. - After a bit is set to
1it should not be changed.