Chapter 3
Reasoning about programs


Aims


Issues

Relevance

It is an important fact that functional programs are more amenable to verification than most imperative programs, and it is therefore somewhat simpler to introduce verification in a functional setting. The thread on proof through the book can be treated as optional, but it has been included as an integral part of the text because I see it as central to learning functional programming.

Strategies for teaching proof

Proof is hard to teach; the ground rules for writing proofs are less clearly defined than for a programming language, and induction in particular looks circular to many students. There seems to be no `silver-bullet' explanation, but a number of ideas help:

Ultimately, there seems to be no substitute for trying examples and getting constructive feedback on the solutions.

Next Up


Written 18 May 1995.