Act03_Satisfaction_and_Pgms

Act03_Satisfaction_and_Pgms - Illinois Institute of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 536 Activities for Lecture 3 Activity 1: Satisfaction and Validity A. Why? Our program speci ± cations are written using predicates, so it’s good to know what it means for a predicate to be true in a state or in all states. B. Outcomes At the end of this activity you should: Be able to check a predicate for satisfaction (in a state) or validity. C. Questions Let ! ! " x = 3 # y = 4 # b[0] = 7 # b[1] = 9 , let ! # = ! ! [ x ! 4 ], and let ! $ = ! # [ z ! –5 ]. 1. Does ! ! ! x < y # b[x–2] < b[y–3] ? Does ! # ! x < y # b[x–2] < b[y–3] ? 2. Does ! $ ! z > 0 $ 2+2 = 5 ? Does ! $ ! 2+2 = 5 $ z > 0 ? 3. Does ! ! ! % k . b[k] < b[k+1] ? If so, what witness did you use? Are there other possible witnesses? 4. Does ! ! ! % z . b[z] < b[z+1] ? Does it matter that z is unde ± ned in ! ! ? 5. Does ! ! ! % x . b[x] < b[x+1] ? Does it matter that ! ! ( x ) is de ± ned? Does it matter what value ! ! ( x ) is? [Does it matter that x is de ± ned in ! ! ?] 6. What do we have to check to determine whether or not
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Act03_Satisfaction_and_Pgms - Illinois Institute of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online