Chapter 5

Computation Models and Design by Refinement

Objectives

After reading this chapter, you should understand:

  • How program execution can be abstracted through various program execution models
  • The Functional Model of computation
  • The Imperative Model of computation
  • Proofs of Correctness for simple algorithms
  • Efficiency of programs
  • Recursive programs and considerations for efficiency
  • Scope Rules
  • Tail Recursion and its implications
  • Program Design through Step-wise Refinement

Chapter Outline

5.1 Introduction

5.2 Functional Model

5.2.1 Features of Functional Model

5.2.2 Recursive Processes

5.2.3 Analysis of Correctness and Efficiency

5.2.4 More Examples of Recursive Algorithms

5.2.5 Scope Rules

5.2.6 Tail-Recursion and Iterative Processes

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.