Formal Methods -- SE304/CS407

"But what good are formal methods? You know, in many cases, formal methods are just rubbish. Sometimes one gains more from simply having a friendly chat. Oh, the formal methods will always be with us, sir, you may be assured of that; but what good are they, in the last analysis, I ask you?"
-- Porfiry Petrovich (a character in "Crime and Punishment" by Fyodor Dostoyevsky).

Overview DBC CafeOBJ Links Software


Note for repeat exam

If you are repeating this exam in Autumn 2005, this is my advice. Work through the sample paper, and January's paper. All of the answers are available in the lecture notes (linked below). If you have worked through the lecture notes and still cannot find the answer to a question, email me at

mmcgaleycs.nuim.ie

Sample and Past Paper

Sample paper (.doc format)
January 2005 paper (.doc format)


Overview

The whole point of formal methods is to improve software quality. By carefully specifying what a piece of software should do before thinking about how it should do it, and by using mathematics to ensure that that specification is unambiguous, complete and consistent, we can avoid many of the most common software development errors.

This course aims to teach the basic concepts behind formal methods through Design by Contract in Java with JML and algebraic specification in CafeOBJ. The website for last year's course is still available.

All labs are compulsory, and contribute towards your continuous assessment mark.

The lecture slides will be available here after each lecture. Note that these slides are notes only, and do not necessarily contain everything you need to konw for the course.


Introduction


Design By Contract, JML

LecturesLabsDownloads
DBC 1
DBC 2
Lab project 1 - Design By Contract Lab 1 sample solution
DBC 3
DBC 4
Lab project 2 - DBC for Vote class Lab 2 sample solution:
VoteReader.java
Vote.java
Preference.java
SpoiledVoteException.java
ElectionENV.java
Refinement 1
JML revision
Lab project 3 - Refinement Harbour case study
Sample Answer - BoundedBinaryTree
BinaryTreeSpec.java BinaryTreeImp.java

CafeOBJ

LecturesLabsDownloads
CafeOBJ 1
CafeOBJ 2
Lab 4 - CafeOBJ
CafeOBJ 3
my notes for CafeOBJ 4
Lab 5 - CafeOBJ Lab 5 sample solution
CafeOBJ 5
my notes for CafeOBJ 6
Lab 6 - CafeOBJ Lab 6 sample solution
my notes for CafeOBJ 7 Experiment
CafeOBJ 9
CafeOBJ 10, module from lab
Lab 7 - CafeOBJ Lab 7 sample solution
CafeOBJ 11
CafeOBJ 12
Lab 8 - CafeOBJ Lab 8 sample solution

Links


Software


Home The VIM Homepage Valid HTML
		    4.01!