The focus of the book is on "correct–by–construction" program design –– the discipline of calculating programs from their specifications. Modern, calculational logic is introduced in combination with key program construction principles, such as the assignment axiom, loop invariants and bound functions. This material is intertwined with motivational discussion, programming examples and challenging problem–solving exercises, bringing the book alive for its intended audience, undergraduates in computer science and mathematics, as well as professional programmers wishing to further develop their programming skills.
The book covers the elements of logic and program correctness that form the foundations of further study ––– the logical connectives and their algebraic properties, induction, quantifiers and program construction rules. Substantial examples of program construction are included. Many exercises are provided, all with detailed solutions.
A Science of Computing.
A Searching Problem and Its Solution.
Calculational Logic: Part 1.
Calculational Logic: Part 2.
Maximum and Minimum.
The Assignment Statement.
Sequential Composition and Conditional Statements.
Inductive Proofs and Constructions.
Sorting and Searching Algorithms.
Solutions to Exercises.
Glossary of Symbols.