Act08_Pf_outlines_wp_sp

Act08_Pf_outlines_wp_sp - Illinois Institute of Technology...

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

CS 536 Activities: Proof Outlines, WP and SP (Note: I changed Question 5 before posting the notes from Monday Oct 25.) Thu, Oct 28, 2010 - Fixed typos in Questions 4 and 5 A. Why? Proof outlines are a shorthand for formal proofs, so they give us an easier way to think about correctness than formal proofs. Weakest preconditions and strongest postconditions help us expand partial proof outlines. B. Outcomes At the end of this activity you should: Be able to translate partial proof outlines to full proof outlines to formal proofs. Be able to calculate simple weakest preconditions and strongest postconditions. C. Questions 1. Calculate wp ( if B then x:= x/2 fi ; y:= x , Q ) 2. Calculate wp ( a:= a *( a-b ); b:= b-c , Q ) 3. Calculate wp ( if x 0 then x:= x*2 else x:= y fi ; x:= c*x , a x < y ) 4. Calculate wp ( s:= s+i; i:= i+1 , P ) where P is 0 i n s = sum(0, i) . Does P i < n imply this wp ? What’s the problem? 5.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

Act08_Pf_outlines_wp_sp - Illinois Institute of Technology...

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

View Full Document
Ask a homework question - tutors are online