7.8 Deductive-analysis strategy

7.8 Deductive-analysis strategy

7.8.1 Deductive-analysis assumptions

Deduction is “the process of reasoning in which a conclusion follows necessarily from the stated premises” or “inference by reasoning from the general to the specific,” according to the American Heritage Dictionary of the English Language .

The deductive-analysis strategy assumes that you have extensive experience in programming to draw on and a thorough understanding of the details of the application you’re debugging. This body of general knowledge supplements the specific information you have about the bug, making it possible to work from this general knowledge to a specific hypothesis. We don’t recommend this approach for people who are relative programming novices or who are attempting to debug a very large system.

7.8.2 Deductive-analysis control structure

The next code sample shows the control structure for the deductive-analysis strategy.

 Generate an initial hypothesis  Do while there are more untested hypotheses      Select a hypothesis according to one of the          debugging heuristics      If the hypothesis is false      Then          Generate more hypotheses      Else          Terminate search successfully      End-if  End-do  Last hypothesis evaluated explains the cause of the bug 

Debugging by Thinking. A Multidisciplinary Approach
Debugging by Thinking: A Multidisciplinary Approach (HP Technologies)
ISBN: 1555583075
EAN: 2147483647
Year: 2002
Pages: 172

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net