Act08_Pf_outlines_wp_sp

Act08_Pf_outlines_wp_sp - Illinois Institute of Technology...

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

View Full Document Right Arrow Icon
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.
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.

This note was uploaded on 04/17/2011 for the course CS 536 taught by Professor Cs536 during the Fall '08 term at Illinois Tech.

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 Right Arrow Icon
Ask a homework question - tutors are online