the object has exactly two externally observable states:
u (unprepared)p (prepared)no other state is semantically visible or relevant.
a single predicate distinguishes the states:
upthe predicate must be authoritative and sufficient to decide validity for use.
u -> p
obligations:
failure rule:
uinit is total on u.
p -> u
obligations:
non-obligations:
uninit is total on p.
p -> p via initu -> u via uninitup implies all runtime invariants holdu implies no external resources are owneduinit is atomic with respect to p:
u or pbecause:
up -> uuthe sequence:
`u` -> init -> `p` -> uninit -> `u` -> init -> ...
is always valid.
the automaton is correct if and only if:
p