Describes basic programming principles and their step-by-step applications. Numerous examples are included.
Inhaltsverzeichnis
0. Why Use Logic? Why Prove Programs Correct? . - I. Propositions and Predicates. - 1. Propositions. - 2. Reasoning using Equivalence Transformations. - 3. A Natural Deduction System. - 4. Predicates. - 5. Notations and Conventions for Arrays. - 6. Using Assertions to Document Programs. - II. The Semantics of a Small Language. - 7. The Predicate Transformer wp. - 8. The Commands skip, abort and Composition. - 9. The Assignment Command. - 10. The Alternative Command. - 11. The Iterative Command. - 12. Procedure Call. - III. The Development of Programs. - 13. Introduction. - 14. Programming as a Goal-Oriented Activity. - 15. Developing Loops from Invariants and Bounds. - 16. Developing Invariants. - 17. Notes on Bound Functions. - 18. Using Iteration Instead of Recursion. - 19. Efficiency Considerations. - 20. Two Larger Examples of Program Development. - 21. Inverting Programs. - 22. Notes on Documentation. - 23. Historical Notes. - Appendix 1. Backus-Naur Form. - Appendix 2. Sets, Sequences, Integers and Real Numbers. - Appendix 3. Relations and Functions. - Appendix 4. Asymptotic Execution Time Properties. - Answers to Exercises. - References.