Correctness
To prove correctness in general, we have to reason about the program. This means three things:
We need a mathematical model of the operations of the programming language, defining what they should do. This model is called the language’s semantics.
We need to define what we would like the program to do. Usually, this is a mathematical definition of the inputs that the program needs and the output that it calculates. This is called the program’s specification.
We use mathematical techniques to reason about the program, using the semantics. We would like to demonstrate that the program satisfies the specification.引自第9页