[10%] (b) Using your definition, show a full manual reduction for (T XOR F).
[5%] (a) It is possible during execution of P for variable k to be less than 0, but it only happens immediately after k was exactly 0.
[5%] (b) During execution of P, it never happens that k becomes greater than 100 and later returns to being less than 100.
[5%] (c) If resource R is requested, it is eventually granted; and, once granted, resource R is eventually released.
[5%] (b) What are the disadvantages of Model Checking over manual correctness proofs for program verification?
new : -> DES pushL : DES x ELT --> DES pushR : DES x ELT --> DES popL : DES --> DES popR : DES --> DES topL : DES --> ELT topR : DES --> ELT empty : DES --> boolean size : DES --> intUsing Guttag's heuristic, write axioms specifying the behavior of this type. It is basically two stacks glued together "back to back" at their bases. You can push and pop on either end, and you can inspect the top item on each end (without removing it). You can also tell if the entire stack is empty. Note that the following sequence of operations is fine:
topR(popR(topR(popR(topR(pushL(pushL(pushL(new(),1),2),3))))))and will produce the items 1, 2, 3 out in that order. We pushed the items onto the Left end, but popped them off the Right end... no problem. In this case, we got FIFO order out of the DES (very queue-like).