Question: Give a full proof outline under partial correctness obtained by expansion of the partial proof outline below. Please use the Forward Assignment Axiom to prove

Give a full proof outline under partial correctness obtained by expansion of the partial proof outline below. Please use the Forward Assignment Axiom to prove all the assignment statements. Give a brief explanation on each logical implication used in the proof outline.
{y1}x:=0;r:=1
{ inv 1r=2xy}
while 2**rydor:=2**r;x:=x+1od
{r=2xy2x+1}
Find a reasonable bound expression for the while loop in Question 3, then create a full proof outline under total correctness for the partial proof outline in Question 3. Please use the Backward Assignment Axiom to prove all the assignment statements. Give a brief explanation on each logical implication used in the proof outline.
Under total correctness, find a reasonable precondition p and create a full proof outline for the following provable triple:
{p}ifx2>y then x:=b[x-y] else y:=b[y-x]fi{x=y}
Hint: Using Conditional Rule 2 can avoid calculating the domain predicate for a conditional statement.
6. Under total correctness, find a reasonable postcondition q and create a full proof outline for the following provable triple:
{x2y}x:=x**y;x:=1x{q}
Hint: Since the precondition and the statement are not safe, we should include their domain predicates in the precondition for total correctness. Be careful of the domain predicate for a sequence statement.
7. Let W-={invp}{bdt} while B do S od and |--?tot{invp}{bdt}|| while B do S od {p??notB}. For each of the following statements about bound expression, decide true or false and justify your answer briefly.
a. Let |||==p, then |)??(d)!inM(W,).
b. The value of t can be negative after the execution the last iteration of W.
c.
Give a full proof outline under partial

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 Programming Questions!