Question: For the precondition Q , x = x and the postcondition R , y 0, the correct Hoare triple for P 2 , written as
For the precondition Q, x = x and the postcondition R, y 0, the correct Hoare triple for P2, written as {Q B} P2 {R} is {x = 0 x 0} {y = -1*x} {y 0}.
{ } if x 0 then y = x else y = -1*x
end if
{y 0}
Question 6 options:
| True | |
| False |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
