Hoare triples and wp’s
A nice relationship holds between Hoare triples and wp’s
To prove {P}S{Q}
- First compute wp(S,Q)
- And then prove P => wp(S,Q)
In essence, this computes backwards from the desired post-condition, through each statement, to the original pre-condition