I am reasoning about an Hoare Logic's exercise.
I should find all the boolean expressions B
and all the programs S
and P
which satisfy the triple {true} if B then S; if B then P; {a >= 0}
, assuming that the evaluation of B
cannot modify the store, but the execution of S
may modify it and change the value of B
.
In particular, I don't know what I can say about a
, because it is present just in the postcondition and I have never found an example like this.
Thanks for your help!