Question: Problem 5 ( 1 2 pts . , 0 . 5 pts . each condition ) : Backward reasoning Find the weakest precondition of each

Problem 5(12 pts.,0.5 pts. each condition): Backward reasoning
Find the weakest precondition of each code sequence by inserting the appropriate condition in
each blank. The first intermediate condition in part (1) is supplied as an example. Please simplify
your answers as much as possible. Assume all referenced variables are defined as integers.
(1) Use the wp() notation shown in the example for all conditions in this part.
x=-1;
{wp(z=2**y+x;,z10)}={2y+x10}=
{2y10-x}={y?bar(10)-x2}
z=2*y+x;
{z10}
(2) Use the wp() notation for all conditions in this part.
{:{x0}
 Problem 5(12 pts.,0.5 pts. each condition): Backward reasoning Find the weakest

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!