CHAPTER 7 Deducing Errors

In this chapter, we begin exploring the techniques for creating hypotheses introduced in Chapter 6. We start with deduction techniques—reasoning from the abstract program code to the concrete program run. In particular, we present program slicing, an automated means of determing possible origins of a variable value. Using program slicing, one can effectively narrow down the number of possible infection sites.


Oops! We have observed something that should not happen—the program has reached some state it never should have reached. How did it get into this state? Kernighan and Pike (1999) give a hint:

Something impossible occurred, and the only solid information is that it really did occur. ...

Get Why Programs Fail, 2nd Edition 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.