SE 504 (Formal Methods and Models)
Spring 2009
Syllabus
Homework Assignments
Homework #1: Developing Predicates
Homework #2: Predicate Strength/Weakness
Homework #3: skip and assignment commands
Homework #4: Catenation and Selection
Homework #5: More Selection, Plus an Invariant
Homework #6: Repetition
Homework #7: More Repetition, Including Strengthening the Invariant
Homework #8: More Repetition, Again
Homework #9: Tail Recursion
Final Exam Postmortem
Electronic Handouts
Developing predicates from informal statements: A checklist
On the strength/weakness relationship between predicates
On Proofs Involving the Replacement of A by B, where A
implies
B
Properties/Laws of Hoare triples and the wp predicate transformer
Axioms for the (family of) if functions
Program Verification Summary
Correctness proofs of some simple programs:
A skip command
An assignment command
A catenation (or sequential composition)
A selection (i.e., if) command
A derivation of a selection (i.e., if) command
Repetition (Looping)
Notes on Loop Invariants
Correctness proof of a program computing 0+1+...+N
Correctness proof of a program involving a repetition (loop) command
When a selection command is nested inside a loop
Development of a linear search program
Development of a program to compute N
3
without multiplication or exponentation
Development of a program to calculate Fibonacci numbers
Development of a program that does negative-positive pair counting in an array
Development of a program for the Maximum Segment Sum Problem
Developing programs to compute tail recursive functions
Arrays
Axioms for the (family of) if functions
Reasoning about arrays
Irrelevant Array Element Axiom
Development of a program for the Prefix Sums Problem
A solution to the Array Decomposition Problem
A solution to the 2-color version of Dutch National Flag Problem
Development of a program for determining the majority of a bag
Subprograms
Notes on Proofs of Programs Involving Subprograms
Example of a correctness proof involving a subprogram invocation (maximum())
Richard Denman: Procedure Declarations and Calls
External Links
Wikipedia entry on Design by Contract
Work by Bertrand Meyer on Program Correctness
Links to Publications
A Framework for Proving Contract-equipped Classes
Towards Practical Proofs of Class Correctness
Proving Pointer Program Properties Part 1: Context and Overview
Proving Pointer Program Properties Part 2: The Overall Object Structure