Properties of the WP phase #
The output of wpBody is a guarded program in which only obligations follow an assert
(wpBody_shape), the output of wpEntry on a well-scoped list reads only variables the list
reads (wpEntry_fv), and every arm of every ite of the output of wpEntry, at any depth,
contains an assert or a cover (wpEntry_armsHaveObl).
The ites of the output come from the nesting of the flat items (nest): a side branch is the
then arm of an ite whose else arm is the nesting of the rest of the list, and a real branch
is an ite of the nestings of its arms. The proof of wpEntry_armsHaveObl shows that every run
of obligations of the walk's output is nonempty, that every real branch has a run of obligations
or a real branch in each arm, and that a walk result carrying an obligation has a run of
obligations or a real branch in its output (ROK). It proves the facts about the walk along the
computations of the WP monad: Post m Q says that every successful run of m returns a value
with Q, and the tactic post_step decomposes such a goal along the binds, conditionals, matches
and join points of a do block.
Key theorems: wpBody_shape, wpEntry_fv, wpEntry_armsHaveObl.
Shape of the output #
The output of the WP phase is a guarded program in which only obligations follow each
assert in its list.
The names the output reads #
The output of the WP phase of a well-scoped loop-free list reads only variables the list reads.
Obligations in every arm of the output #
Flat items #
Items before resolution #
Successful runs of the WP monad #
The walk #
Every arm of every ite of the output of the WP phase, at any depth, contains an
assert or a cover.