$\small\textit{''The obvious things are the most difficult to understand''}$
May be the question does not make sense, but let me ask it anyway.
The Hoare assignment axiom is $$ \dfrac{}{\{Q[v \mapsto expr]\} \;\; v:=expr \;\; \{Q\}} $$
Is there an intuitive explanation of the axiom?
I "agree" with the Floyd assignment axiom:
$$
\dfrac{}{\{Q\} \;\; v:=expr \;\; \{\exists old: Q(old,..) \land v=expr(old,...)\}}
$$
which can be thought as "if Q
holds before the assignment, then after the assignment we know that the variables should satisfy: 1) Q(old)
holds for some old variables (since we assume Q
holds), 2) variable v
has the new valueexpr(old,...)
".
Is there a similar intuition for the Hoare assignment axiom?