Question: 6 . Let | | = = ? t o t { p 1 } S { q 1 } and | | = =

6. Let ||==?tot{p1}S{q1} and ||==?tot{p2}S{q2}. Decide whether necessarily satisfies the following triples under
total correctness, justify your answer briefly.
a.{p1??p2}S{q1vvq2}
b.{p1vvp2}S{q1??q2}
c.{p1vvp2}S{q1vvq2}
7. Let ||=={p1}S{q1} and ||=={p2}S{q2}. Decide whether the following triples are valid under partial correctness,
justify your answer briefly.
a.{p1??p2}S{q1??q2}
b.{p2}S{q1q2}
c.,{notp1p2}S{notq1q2}
8. Let w>wp(S,q), and let S be a deterministic program. Decide whether each of the following statements is true or false, justify your answer briefly. We assume (q) for any well-formed state .
a.||==?tot{w}S{q}
b.||=={w??q}S{q}
c. There exists some state such that w but M(S,)||==q.
d. If ||==w, then .
e. If w, then ||=={notw}S{notq}.
You don't have to logically simplify your answers to questions 9 and 10.
9. Let S-=y:=y%x and q-=y2>x.
a. Calculate wlp(S,q).
b. Calculate wp(S,q).
10. Let S-= if y0x:=yxx0x:=xy fi and wlp(S,q)wp(S,q)q-=x.
a. Calculate wlp(S,q).
b. Calculate wp(S,q).
6 . Let | | = = ? t o t { p 1 } S { q 1 } and | |

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!