Question: Question 3 : ( Hint: what inference rules apply? ) 1 . What would be the result of applying the If - Then inference rule

Question 3: (Hint: what inference rules apply?)1. What would be the result of applying the If-Then inference rule on the following hoare triples: (p q)(p r)(q r)(p q)(p r){q q}(q r)12. What can we conclude given the following two lines are true: p q {r q}(p r) p q {r q}(p r)3. What is the post-condition that makes the following Hoare triple valid? x =(i +1)!2i 3 i1{i i +1}(???)4. Suppose we are given the following Hoare triple: (x 10)(y >10){x x}(x < y) What else would we need to know in order to apply the if-then inference rule to conclude the following line? (y >10){if(x 10) then x x}(x < y)5. If we are given the following two Hoare triples, what can we conclude? (x i)(x = i 2){x x + x}(x =2i 2)(x < i)(x = i 2){x x + i2}(x =2i 2)

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!