Question: Consider the following program, where : = denotes variable assignment. Assume only integer variables. y : = w + 1 ; z : = y
Consider the following program, where : denotes variable assignment. Assume only integer variables.
:;
:;
:
We don't want the last instruction to divide by zero. In order to avoid this contingency, what needs to be True in the initial
state?
Hint: insert the assertioncomment before the line that assigns to Then use the "magic" technique
described in Appendix D of the IFM book to determine what must be True before each of the preceding
assignments.
a
b
c
d
e
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
