SE 504
Formal Methods and Models
Spring 2022
Time: Tuesdays, 6:30pm — 9:10pm
Place: Loyola Science Center 091
Instructor: Dr. R. McCloskey
Office: Loyola Science Center 191
Telephone: 941-4221 (office), 941-7774 (CS Dept. office),
941-4250 (fax)
E-mail: robert.mccloskey@scranton.edu
Home Page:
www.cs.uofs.edu/~mccloske/
Office Hours: To be posted on office door and on home page.
Text: Programming: The Derivation of Algorithms,
by A. Kaldewaij, Prentice Hall, 1990.
Homeworks: Approximately eight.
Final Exam:
Take-home final exam near end of semester, due at end of
final exam week.
Grading: Based on homework assignments, final exam,
and class participation.
Objective: The student will become proficient in the practice
of calculational programming, an approach in which a program and its
proof of correctness are developed hand-in-hand.
Topics:
- predicate logic (review)
- notion of state and correspondence of a
predicate to a set of states
- state space of a program
- specification of programs via pre- and post-conditions
- design/programming by contract
- Hoare triples and notion of weakest precondition
- Dijkstra's Guarded Command Language
- skip command
- assignment command
- selection (if) command
- repetition (do) command and loop invariants
- subprograms
- program derivation techniques
- calculating expressions in assignments
- deriving selection (if) commands
- developing loops and loop invariants
- by deleting a conjunct
- by replacing a constant
(or one of multiple occurrences of a variable)
by a variable
- by strengthening the invariant
- using tail recursion
- derivations of interesting programs
- Polynomial Evaluation
- Linear and Binary Search
- Dutch National Flag Problem (Array Partition)
- The Celebrity Problem
- Majority Vote Problem
- Maximum Segment Sum
- Array Rotation
- Longest Increasing Subsequence
- Sorting
- Proving the correctness of recursive algorithms
CTLE:
Services for Students
U of S Academic Code of Honesty
Reporting Obligations