Definition. Assertions & Havoc [004q]

We introduce 3 new syntactic constructs with their associated hoare rules, these constructs are:

  • The statement \(\texttt {assert(F)}\) which \(\texttt {fails}\) if \(F\) evaluates to \(\bot \)
  • The statement \(\texttt {assume(F)}\) which tells us that \(F\) evaluates to \(\top \)
  • The statement \(\texttt {x := havoc()}\) which assigns a non-deterministic value to a variable \(x\)