Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Q8: Quiz#8: Program verification and correctness


1. Q8: Program verification and correctness
38: Quiz#8: Program verification and correctness , Name: ___________________________ Given the following C-like assignment statements and loop, prove the (partial) correctness of the code in a manner similar to that done in class and in the class notes by filling in the assertions, doing substitutions, making simplifications, etc. Note that depending on how you simplify you may not need all comment lines or you may need more comment lines.

(omitted)

2. Scoring rubric

CS 340 - Q8 : Quiz#8: Program verification and correctness Your grade: _ / 20    [LATE] Late or redo penalty: _ / -20    loop invariant copy: _ / 4    loop condition copy , negate if needed: _ / 2    precondition derive and simplify: _ / 4    loop body statements derive and simplify: _ / 6    postcondition derive and simplify: _ / 4    [CREDIT] Extra credit: _ / +4 Comments:


3. Relevant content
Relevant content in the notes includes, but is not limited to, the following.

4. Exam help

{ 2:before: p where e replaces x } x = e; { 1:after: p }


{ pre : ... } { ... } { inv:p } while b do    { p and b }    S    { p }    end while { p and (not b) } { ... } { post: ... }


5. Post-quiz question and solution

6. End of page