O'Reilly logo

Design and Analysis of Algorithms by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required