Chapter 7

Design by Proof Rules

Objectives

After reading this chapter, you should understand:

  • How to design correct programs using proof rules
  • The importance of pre-and post-conditions in arguing about programs
  • How to select appropriate program statement types based on proof rules
  • The correct design of program Loops using proof rules
  • The implications of strict, ordinary and complete pre-conditions

Chapter Outline

7.1 A fresh look at proof rules

7.1.1 Referring to Previous Values of Variables

7.1.2 Proof Rules

7.2 Designing correct programs

7.2.1 The Interface Specification

7.2.2 Applying the Rules to deduce the Program Statement Types

7.2.3 Design Example

7.3 Design of a loop

7.3.1 Loop Termination

7.4 A simple design procedure for loops based ...

Get Design and Analysis of Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.