SE 504 (Formal Methods and Models)
Spring 2020
Syllabus
Zoom Guide
Student File Submission System
Homework Assignments
Homework #1: Developing Predicates and Specifications
Homework #2: skip, Assignment, and Selection Commands
Homework #3: wp, Catenation, Selection
Homework #4: Repetition
Homework #5: Repetition and Strengthening the Invariant
Homework #6: Max Segment Sum Revisted; Array Element Assignment
Homework #7: Strengthening the Invariant, Array Assignment, Tail Recursion
Homework #8: Tail Recursion, k-Majorities
Programming Assignments
Prog. Assg. #1: Longest Common Subsequences
Electronic Handouts
From SE 500:
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
Axioms for the (family of) if functions
New to SE 504:
Properties/Laws of Hoare triples and the wp Predicate Transformer
Law of Assumptions and Textual Substitution
Program Verification Summary
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
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
Search by Elimination
Longest Upsequence
Subprograms
Notes on Proofs of Programs Involving Subprograms
Example of a correctness proof involving a subprogram invocation (maximum())
Richard Denman: Procedure Declarations and Calls (Chapter 20)
Proving Correctness of Recursive Programs
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
Bertrand Meyer's technology+ blog
Loop invariants: analysis, classification, and examples
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