I'm teaching the ‘formal spec’ course in January-March 2007. Here are some details you may find useful.
The book
This course is based on Ed Currie's excellent book The Essence of Z (available on campus from Blackwell's).
Buy it, read it.
The times
-
Monday, 12:15, EM336.
- Tuesday, 15:15, EM306.
- Thursday, 10:15, EM306.
- Tuesday, 15:15, EM306.
Z fonts
This Z font (.ttf) is compatible with Microsoft Windows and should let you type Z symbols in Word. This Z font is compatible with the Apple Mac (.sea). You might also be interested in CutePDF, a free PDF converter; it installs itself as a printer, which you just select to print to from within any program running under Windows, to produce a .pdf file.Class tests
The message forum contains a number of threads in which your fellow students work through to a polished answer online, as well as model answers they have provided. All these things are valid exam fodder, and useful for you to consider.Module descriptor
It's official — you gotta learn!Slides
If you spot typos contact me.-
Lecture 1, Monday 8 January.
(Introduction; Propositions) -
Try ttable, a handy perl script for making truth tables.
An online truth table generator is here (from a logic course online at the University of Kentucky).
If the exercises in the lecture notes and “The essence of Z” are not enough for you, you can also play with these exercises. -
Lecture 2, Monday 8 January.
(Predicates; Quantifiers; Sets) -
If the exercises in the lecture notes and “The essence of Z” are not enough for you, you can also play with these exercises and their solutions.
- A video of the first two lectures is online. Yes, the quality is excrable. Yes, I'm off frame half the time. Yes, the white balance is off. Yes, it needs editing. If you have compatibility issues, then contact me.
Lectures 1 and 2 [video] - A video of the first two lectures is online. Yes, the quality is excrable. Yes, I'm off frame half the time. Yes, the white balance is off. Yes, it needs editing. If you have compatibility issues, then contact me.
-
Lecture 3, Tuesday 9 January.
(More on sets: subset, cardinality, types) -
- A video of the third lecture is online. Overall quality still very poor, I'm afraid. The problem is, ‘better’ equipment records to tape — and do I have time or inclination to spend an hour recording to computer after each of my lectures?? I don't think so! For goodness' sake JVC, Sony, Canon, and Panasonic, this is the 21st century — tape is for the 80s! Quit faffing around and catch up with mpeg4!
Lecture 3 [video] - A video of the third lecture is online. Overall quality still very poor, I'm afraid. The problem is, ‘better’ equipment records to tape — and do I have time or inclination to spend an hour recording to computer after each of my lectures?? I don't think so! For goodness' sake JVC, Sony, Canon, and Panasonic, this is the 21st century — tape is for the 80s! Quit faffing around and catch up with mpeg4!
- Problem Class 1, Thursday 11 January.
-
I was astonished by the turnout for this class. I had absolutely not expected such dedication and professionalism of the students. I hope that in the resplendant tapestry that is the Heriot-Watt student body, my students stand out as truly exceptional.
I was so moved the the turnout, I wrote my students a letter about my feelings. You can read it and my students' replies, here.Problem class 1 [video] -
Lecture 4, Monday 15 January.
(Schema, specifications) -
The slides.
- The video.
Lecture 4 [video] - The video.
-
Lecture 5, Tuesday 16 January.
(Combining schema, initial state, preconditions, totality) -
- A video is online. I spend much of my time off frame to the left, with just my hand visible holding the laser pointer. It makes me think of a hi-tech muppet out of costume.
Lecture 5 [video] - A video is online. I spend much of my time off frame to the left, with just my hand visible holding the laser pointer. It makes me think of a hi-tech muppet out of costume.
- Problem Class 2, Thursday 18 January.
-
Turnout was better and the absentees e-mailed me their excuses — one was in Z.
But some hadn't done a stroke of work in preparation, and were looking at exercises from way back in Chapters 3 and 2 obviously for the first time.
No good, no good! I wrote another letter.Problem class 2 [video] - Case Study 1, Monday 22 January.
-
I thought it might be an idea to try building a spec from scratch. We specified a ‘door’ (which could be open, closed, or locked) and schema to open and close doors.
Then we considered a variety of ways of specifying room, and a building as a set of rooms and doors.
Case Study 1 [video]
-
Lecture 6, Tuesday 23 January.
(Totalising schema of more than one variable, preconditions again, methodology for developing Z schema) -
- By popular request I handed out a printout of the 2004 class test with answers. Note that the 2004 class test was shorter and simpler than what you will see next Thursday. Leftover printouts are in my pigeonhole in EM1.24. For your convenience I include pdf online.
2004 problems class [pdf]- For your further convenience, a video of the class is online. There's some after-class commentary on hiding and preconditions at the very end.
Lecture 6 [video]- Mickey Mouse signed the class attendance sheet today. A celebrity in the class! That's nice.
- By popular request I handed out a printout of the 2004 class test with answers. Note that the 2004 class test was shorter and simpler than what you will see next Thursday. Leftover printouts are in my pigeonhole in EM1.24. For your convenience I include pdf online.
- After-exam discussion, Monday 29 January.
-
So I set an exam. One person did all questions, two or three people came close — most people crashed and burned. Rout. Disaster. Panic. Mayhem.
I am told I must set a test worth 10% of the exam. So that'll follow in a week or two. In the meantime watch this video, read the wiki, don't be shy about e-mailing me or your friendly neighbourhood swot — and write your own damn specs from scratch!
Once upon a time I had to worry about my exam success. That was easy, because I did everything I told myself to do. Now I worry about the exam success of 37 perfect strangers, who don't. Give us a break! Who are you guys, anyway? Who put you in my class? Who put me in my class?? Why didn't I take an easy job, like a mercenary or a stock trader or one of those guys who paints the Golden Gate bridge?Discussion [video] -
Lecture 7, Tuesday 30 January.
(Relations, and what to do with them) -
- People asked questions during class. Well done. A number of students also contacted me with questions in the hours immediately following the lecture. Well done to you too.
Lecture 7 [video] - People asked questions during class. Well done. A number of students also contacted me with questions in the hours immediately following the lecture. Well done to you too.
- Problem class, Tuesday 30 January.
-
We did ‘bite-sized’ case studies with some success. It took some minutes, but eventually you started coming out with all kinds of questions. Good.
Also, it did not degenerate into me just saying stuff; during the class I asked one student whether they wanted me to tell them the answer. ‘No!’ was the immediate reply. This man is a hero. You really have to at least try before seeing the answer or it just doesn't go in.
I suggested we go 1/2 hour over time in order to really sort out people's difficulties, and bless you, you all stayed. Absentees check out the video. When you do I suggest you do the class with us; try my questions before viewing the answers.Problem class [video] - Problem class, Monday 5 February.
-
Ianthe Hind took this problems class. She said she was happy with how it went, and the students are happy with the course. She did however note that some people had still turned up without having done the exercises. Obviously this is all my fault and I have not expressed myself clearly on the topic of the importance of doing exercises.
Perhaps more forceful methods are required, so I may bring my electrodes to the office tomorrow. I can't restrain a student with one hand while holding a conducting rod in the other, but to judge by some of the posts on the message forum there are students who would find it amusing to help; much of good management is delegation. The team leader supplies the spark, one might say, and the team as a whole administers the force to ensure it is applied in the right place.
I'm delegating your learning to you. A revolution in education! -
Lecture 8, Tuesday 6 February.
(Functions and half of sequences) -
My friend Christoph Benzmüller happened to be in town. He gave a pep talk on the usefulness of formal methods.
- The video.
Lecture 8 [video] - The video.
- Problem class, Thursday 8 February.
-
The video.
Problem class [video]
-
Lecture 9, Monday 12 February.
(Sequences, partition, let, and schema composition) -
- The video.
Lecture 9 [video] - The video.
Problem sets
Buy the book, and your problems will be solved.F22HO2 Forum
On students' suggestion, a message forum is available. A course WiKi is also online.FAQ
- Q. I'm dying to read your slides in bed, but how can I print them more than one to a sheet?
- A. Thanks to John for this screenshot. The menu on your computer may differ, just look for ‘pages per sheet’. You may get the best results printing in landscape mode.
- Q. Why don't you provide printed slides, ya cheap bastard?
- A. I'm not cheap, but that's a different side of my life. The book is for home study; the slides are merely a version for presentation in class. If I print the slides my students may use them instead of the better presentation in the book.
- Q. Is logical disjunction P ∨ Q ‘exclusive or’ — P or Q but not both?
- No, it's ‘inclusive or’. P ∨ Q has truth-value T when at least one of P and Q has truth-value T.