SE 504 (Formal Methods and Models)
Spring 2019
Syllabus
Student File Submission System
Homework Assignments
Homework #1: Predicate Strength/Weakness and Hoare Triple Laws
Homework #2: skip, Assignment, and Selection Commands
Solution to Problem 7
Homework #3: wp, Expression Calculation, Catenation, Selection
Homework #4: Repetition and Invariants
Homework #5: Strengthening the Invariant
Homework #6: Strengthening the Invariant, Array Assignment, Tail Recursion
Programming Assignments
Prog. Assg. #1: Longest Common Subsequences
Electronic Handouts
Gries/Schneider Theorems as presented by Warford
On Proofs Involving the Replacement of A by B, where A
implies
B
Developing Predicates from Informal Statements: A Checklist
On the Strength/Weakness Relationship between Predicates
Law of Assumptions and Textual Substitution
Properties/Laws of Hoare triples and the wp Predicate Transformer
Program Verification Summary
Axioms for the (family of) if functions
Correctness proofs of some simple programs:
A skip command
An assignment command
Another one
Calculating the right-hand side of an assignment command
A catenation (or sequential composition)
Proof of Correctness of a Selection Command
Two Examples of Deriving Selection Commands
A proof of a catenation of a selection and an assigment
Repetition (Looping)
Notes on Loop Invariants
Correctness proof of a program that computes 1+2+...+n
Development of a linear search program
When a selection command is nested inside a loop
Development of a program to calculate Fibonacci numbers
Development of a program to compute N
3
without multiplication or exponentation
Development of a program that does negative-positive pair counting in an array
Development of a program for the Maximum Segment Sum Problem
Arrays
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
A solution to the Length of Longest Common Subsequence problem
Tail Recursion
Developing programs to compute tail recursive functions
Development of a program for determining the majority of a bag
External Links
The Correctness-by-Construction Approach to Programming
, by D.G. Kourie and Bruce W. Watson.
Wikipedia entry on Design by Contract
Work by Bertrand Meyer on Program Correctness
Links to Publications
Applying "Design by Contract"
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