Debugging By Thinking: A Multidisciplinary Approach

Chapter 7: Debugging Strategies

Strategy is the art of making use of time and space. I am less chary of the latter than the former. Space we can recover, lost time never.

Napoleon Bonaparte

7.1 Preview

This chapter presents the definitions of debugging strategies. These strategies are defined in terms of their assumptions and control structure. The first part explains the evaluation criteria that can be used to determine whether a given strategy is leading to progress in diagnosing a defect. The last part explains how to choose among the various strategies presented.

7.2 Evaluation mechanisms

Every debugging strategy consists of three parts: a set of assumptions, a control structure, and an evaluation mechanism. While the set of assumptions and the control structure are unique to each strategy, the evaluation mechanisms are independent and can be used interchangeably with different strategies.

The purpose of the evaluation mechanism is to tell you whether you re making progress. If you have been using a strategy for a while and the evaluation mechanism says that you aren t making progress, it s time to apply another strategy and, perhaps, try a different hypothesis.

There are several ways to evaluate whether a strategy is working.

  • The number of plausible hypotheses disproved should be increasing.

  • The effort required to reproduce the problem should be decreasing.

  • The size of the input required to reproduce the problem should be decreasing.

  • The amount of code excluded from consideration should be increasing.

These evaluation mechanisms are listed in increasing order of strength. The number...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Standards and Technical Documents
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.