The Correctness-by-Construction Approach to Programming

  • Derrick G. Kourie
  • Bruce W. Watson

Table of contents

  1. Front Matter
    Pages i-xiii
  2. Derrick G. Kourie, Bruce W. Watson
    Pages 1-6
  3. Derrick G. Kourie, Bruce W. Watson
    Pages 7-54
  4. Derrick G. Kourie, Bruce W. Watson
    Pages 55-93
  5. Derrick G. Kourie, Bruce W. Watson
    Pages 95-159
  6. Derrick G. Kourie, Bruce W. Watson
    Pages 161-195
  7. Derrick G. Kourie, Bruce W. Watson
    Pages 197-226
  8. Derrick G. Kourie, Bruce W. Watson
    Pages 227-257
  9. Back Matter
    Pages 259-264

About this book


The focus of this book is on bridging the gap between two extreme methods for developing software. On the one hand, there are texts and approaches that are so formal that they scare off all but the most dedicated theoretical computer scientists. On the other, there are some who believe that any measure of formality is a waste of time, resulting in software that is developed by following gut feelings and intuitions.

Kourie and Watson advocate an approach known as “correctness-by-construction,” a technique to derive algorithms that relies on formal theory, but that requires such theory to be deployed in a very systematic and pragmatic way.  First they provide the key theoretical background (like first-order predicate logic or refinement laws) that is needed to understand and apply the method. They then detail a series of graded examples ranging from binary search to lattice cover graph construction and finite automata minimization in order to show how it can be applied to increasingly complex algorithmic problems. 

The principal purpose of this book is to change the way software developers approach their task at programming-in-the-small level, with a view to improving code quality. Thus it coheres with both the IEEE’s Guide to the Software Engineering Body of Knowledge (SWEBOK) recommendations, which identifies themes covered in this book as part of the software engineer’s arsenal of tools and methods, and with the goals of the Software Engineering Method and Theory (SEMAT) initiative, which aims to “refound software engineering based on a solid theory.”


algorithm correctness first-order predicate logic formal methods pre- and post-conditions predicate calculus program correctness

Authors and affiliations

  • Derrick G. Kourie
    • 1
  • Bruce W. Watson
    • 2
  1. 1., Department of Computer ScienceUniversity of PretoriaPretoriaSouth Africa
  2. 2.FASTAR Group, Information ScienceStellenbosch UniversityStellenboschSouth Africa

Bibliographic information

  • DOI
  • Copyright Information Springer-Verlag Berlin Heidelberg 2012
  • Publisher Name Springer, Berlin, Heidelberg
  • eBook Packages Computer Science
  • Print ISBN 978-3-642-27918-8
  • Online ISBN 978-3-642-27919-5
  • Buy this book on publisher's site