This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: z>0) 4. What do you need to show in order to prove the following: (4 pts each) a. {P} ( if B1then A;B; if B2 then [C;D] else E;F {R} b. {P} if B1 then if B2 then A {R} c. {P} If B1 then [A;B] else C;D {R} 5. Given the flowing program a. Find correctness assertions only (8 pts) {n>o} (i, a, b := 1,1,0) { } While i/=n do { } (i, a, b := i+1, a+b, a) { } End {a= Fibonacci (n) } b. prove initialization (2 pts) {n>o} (i, a, b := 1,1,0) { } c. prove body of the loop (2 pts) { } (i, a, b := i+1, a+b, a) { }...
View
Full Document
 Spring '08
 cs536
 Following, pts

Click to edit the document details