Record Details
Back To Results
Showing Item 7 of 12

Why Programs Fail:A Guide To Systematic Debugging

Andreas Zeller (Author).

Record details

  • ISBN: 9780123745156
  • Physical Description: Paperback
  • Edition: 2md Edition
  • Publisher: Burlinton Morgan Kaufmann 2009
Subject: Debugging in computer science

Available copies

  • 1 of 1 copy available at Headquarters.
Location Call Number / Copy Notes Barcode Shelving Location Status Due Date
Accra Central Library 201 005.14/ZEL 000002110158 000 - Almanacs, WorldRecords, Computers , Internet, UFO’S, Strange Stuff - REF Available -

No reviews or recommendations are currently available.
Forewordxv
Prefacexvii
Chapter 1. How Failures Come to Be1
1.1. My Program Does Not Work!1
1.2. From Defects to Failures2
1.3. Lost in Time and Space5
1.4. From Failures to Fixes8
1.4.1. Track the Problem8
1.4.2. Reproduce the Failure9
1.4.3. Automate and Simplify the Test Case9
1.4.4. Find Possible Infection Origins9
1.4.5. Focus on the Most Likely Origins12
1.4.6. Isolate the Origin of the Infection12
1.4.7. Correct the Defect13
1.5. Automated Debugging Techniques14
1.6. Bugs, Faults, or Defects?18
1.7. Concepts19
How to debug a program20
1.8. Tools20
1.9. Further Reading21
Exercises22
Chapter 2. Tracking Problems25
2.1. Oh! All These Problems25
2.2. Reporting Problems26
2.2.1. Problem Facts26
2.2.2. Product Facts28
2.2.3. Querying Facts Automatically29
2.3. Managing Problems31
2.4. Classifying Problems32
2.4.1. Severity33
2.4.2. Priority33
2.4.3. Identifier33
2.4.4. Comments34
2.4.5. Notification34
2.5. Processing Problems34
2.6. Managing Problem Tracking36
2.7. Requirements as Problems37
2.8. Managing Duplicates39
2.9. Relating Problems and Fixes40
2.10. Relating Problems and Tests43
2.11. Concepts44
How to obtain the relevant problem information44
How to write an effective problem report44
How to organize the debugging process44
How to track requirements44
How to keep problem tracking simple44
How to restore released versions45
How to separate fixes and features45
How to relate problems and fixes45
How to relate problems and tests, make a problem report obsolete45
2.12. Tools45
2.13. Further Reading46
Exercises46
Chapter 3. Making Programs Fail49
3.1. Testing for Debugging49
3.2. Controlling the Program50
3.3. Testing at the Presentation Layer53
3.3.1. Low-Level Interaction53
3.3.2. System-Level Interaction55
3.3.3. Higher-Level Interaction55
3.3.4. Assessing Test Results56
3.4. Testing at the Functionality Layer57
3.5. Testing at the Unit Layer59
3.6. Isolating Units63
3.7. Designing for Debugging66
3.8. Preventing Unknown Problems69
3.9. Concepts70
How to test for debugging70
How to automate program execution71
How to test at the presentation layer71
How to test at the functionality layer71
How to test at the unit layer71
How to isolate a unit71
How to design for debugging71
How to prevent unknown problems71
3.10. Tools72
3.11. Further Reading72
Exercises73
Chapter 4. Reproducing Problems75
4.1. The First Task in Debugging75
4.2. Reproducing the Problem Environment76
4.3. Reproducing Program Execution78
4.3.1. Reproducing Data80
4.3.2. Reproducing User Interaction80
4.3.3. Reproducing Communications82
4.3.4. Reproducing Time83
4.3.5. Reproducing Randomness83
4.3.6. Reproducing Operating Environments84
4.3.7. Reproducing Schedules86
4.3.8. Physical Influences88
4.3.9. Effects of Debugging Tools89
4.4. Reproducing System Interaction90
4.5. Focusing on Units91
4.5.1. Setting Up a Control Layer92
4.5.2. A Control Example92
4.5.3. Mock Objects95
4.5.4. Controlling More Unit Interaction97
4.6. Reproducing Crashes97
4.7. Concepts101
How to reproduce a problem101
How to reproduce the problem environment101
How to reproduce the problem execution101
How to reproduce unit behavior101
How to Mock objects101
How to reproduce a crash101
4.8. Tools101
4.9. Further Reading102
Exercises102
Chapter 5. Simplifying Problems105
5.1. Simplifying the Problem105
5.2. The Gecko Bug-a-Thon106
5.3. Manual Simplification109
5.4. Automatic Simplification110
5.5. A Simplification Algorithm112
5.6. Simplifying User Interaction117
5.7. Random Input Simplified118
5.8. Simplifying Faster119
5.8.1. Caching119
5.8.2. Stop Early120
5.8.3. Syntactic Simplification120
5.8.4. Isolate Differences, Not Circumstances121
5.9. Concepts123
How to simplify a test case123
How to automate simplification123
How to speed up automatic simplification123
5.10. Tools123
5.11. Further Reading123
Exercises124
Chapter 6. Scientific Debugging129
6.1. How to Become a Debugging Guru129
6.2. The Scientific Method130
6.3. Applying the Scientific Method132
6.3.1. Debugging `sample` — Preparation132
6.3.2. Debugging `sample` — Hypothesis 1132
6.3.3. Debugging `sample` — Hypothesis 2133
6.3.4. Debugging `sample` — Hypothesis 3133
6.3.5. Debugging `sample` — Hypothesis 4133
6.4. Explicit Debugging134
6.5. Keeping a Logbook135
6.6. Debugging Quick-and-Dirty136
6.7. Algorithmic Debugging137
6.8. Deriving a Hypothesis140
6.8.1. The Description of the Problem140
6.8.2. The Program Code140
6.8.3. The Failing Run140
6.8.4. Alternate Runs141
6.8.5. Earlier Hypotheses141
6.9. Reasoning about Programs142
6.10. Concepts144
How to isolate a failure cause144
How to understand the problem at hand144
How to avoid endless debugging sessions144
How to locate an error in a functional or logical program144
How to debug quick-and-dirty144
How to derive a hypothesis144
How to reason about programs144
6.11. Further Reading144
Exercises145
Chapter 7. Deducing Errors147
7.1. Isolating Value Origins147
7.2. Understanding Control Flow148
7.3. Tracking Dependences152
7.3.1. Effects of Statements152
7.3.2. Affected Statements153
7.3.3. Statement Dependences154
7.3.4. Following Dependences156
7.3.5. Leveraging Dependences156
7.4. Slicing Programs157
7.4.1. Forward Slices157
7.4.2. Backward Slices158
7.4.3. Slice Operations158
7.4.4. Leveraging Slices160
7.4.5. Executable Slices160
7.5. Deducing Code Smells161
7.5.1. Reading Uninitialized Variables161
7.5.2. Unused Values162
7.5.3. Unreachable Code162
7.6. Limits of Static Analysis166
7.7. Concepts170
How to isolate value origins170
How to slice a program170
7.8. Tools170
7.9. Further Reading171
Exercises171
Chapter 8. Observing Facts175
8.1. Observing State175
8.2. Logging Execution176
8.2.1. Logging Functions177
8.2.2. Logging Frameworks180
8.2.3. Logging with Aspects182
8.2.4. Logging at the Binary Level186
8.3. Using Debuggers188
8.3.1. A Debugging Session189
8.3.2. Controlling Execution192
8.3.3. Postmortem Debugging192
8.3.4. Logging Data193
8.3.5. Invoking Functions194
8.3.6. Fix and Continue194
8.3.7. Embedded Debuggers194
8.3.8. Debugger Caveats195
8.4. Querying Events196
8.4.1. Watchpoints196
8.4.2. Uniform Event Queries197
8.5. Hooking into the Interpreter199
8.6. Visualizing State200
8.7. Concepts202
How to observe state203
How to encapsulate and reuse debugging code203
How to observe the final state of a crashing program203
How to automate observation203
8.8. Tools203
8.9. Further Reading204
Exercises204
Chapter 9. Tracking Origins211
9.1. Reasoning Backward211
9.2. Exploring Execution History211
9.3. Dynamic Slicing213
9.4. Leveraging Origins216
9.5. Tracking Down Infections219
9.6. Concepts220
How to explore execution history220
How to isolate value origins for a specific run220
How to track down an infection220
9.7. Tools221
9.8. Further Reading221
Exercises221
Chapter 10. Asserting Expectations223
10.1. Automating Observation223
10.2. Basic Assertions224
10.3. Asserting Invariants226
10.4. Asserting Correctness229
10.5. Assertions as Specifications232
10.6. From Assertions to Verification233
10.7. Reference Runs235
10.8. System Assertions238
10.8.1. Validating the Heap with MALLOC_CHECK_239
10.8.2. Avoiding Buffer Overflows with ELECTRICFENCE239
10.8.3. Detecting Memory Errors with VALGRIND240
10.8.4. Language Extensions241
10.9. Checking Production Code242
10.10. Concepts244
How to automate observation244
How to use assertions245
How to check a program against a reference program245
How to check memory integrity245
How to prevent memory errors in a low-level language245
10.11. Tools245
10.12. Further Reading246
Exercises247
Chapter 11. Detecting Anomalies253
11.1. Capturing Normal Behavior253
11.2. Comparing Coverage254
11.3. Statistical Debugging259
11.4. Collecting Data in the Field260
11.5. Dynamic Invariants262
11.6. Invariants On-the-Fly265
11.7. From Anomalies to Defects266
11.8. Concepts267
How to determine abnormal behavior267
How to summarize behavior267
How to detect anomalies267
How to compare coverage267
How to sample return values267
How to collect data from the field267
How to determine invariants267
11.9. Tools268
11.10. Further Reading268
Exercises269
Chapter 12. Causes and Effects271
12.1. Causes and Alternate Worlds271
12.2. Verifying Causes272
12.3. Causality in Practice273
12.4. Finding Actual Causes275
12.5. Narrowing Down Causes276
12.6. A Narrowing Example277
12.7. The Common Context277
12.8. Causes in Debugging278
12.9. Concepts279
How to show causality279
How to find a cause279
How to find an actual cause279
12.10. Further Reading279
Exercises280
Chapter 13. Isolating Failure Causes283
13.1. Isolating Causes Automatically283
13.2. Isolating versus Simplifying284
13.3. An Isolation Algorithm286
13.4. Implementing Isolation288
13.5. Isolating Failure-Inducing Input290
13.6. Isolating Failure-Inducing Schedules291
13.7. Isolating Failure-Inducing Changes293
13.8. Problems and Limitations299
13.9. Concepts301
How to isolate a failure cause in the input301
How to isolate a failure cause in the thread schedule301
How to isolate a failure-inducing code change301
13.10. Tools301
13.11. Further Reading301
Exercises302
Chapter 14. Isolating Cause-Effect Chains305
14.1. Useless Causes305
14.2. Capturing Program States307
14.3. Comparing Program States311
14.4. Isolating Relevant Program States312
14.5. Isolating Cause-Effect Chains316
14.6. Isolating Failure-Inducing Code320
14.7. Issues and Risks324
14.8. Concepts326
How to understand how a failure cause propagates through the program run326
How to capture program states326
How to compare program states326
How to isolate failure-inducing program states326
How to find the code that causes the failure326
How to narrow down the defect along a cause-effect chain326
14.9. Tools326
14.10. Further Reading327
Exercises327
Chapter 15. Fixing the Defect329
15.1. Locating the Defect329
15.2. Focusing on the Most Likely Errors330
15.3. Validating the Defect332
15.3.1. Does the Error Cause the Failure?333
15.3.2. Is the Cause Really an Error?333
15.3.3. Think Before You Code
15.4. Correcting the Defect335
15.4.1. Does the Failure No Longer Occur?336
15.4.2. Did the Correction Introduce New Problems?336
15.4.3. Was the Same Mistake Made Elsewhere?337
15.4.4. Did I Do My Homework?338
15.5. Workarounds338
15.6. Concepts339
How to isolate the infection chain339
How to find the most likely origins339
How to correct the defect339
How to ensure your correction is successful339
How to avoid introducing new problems339
15.7. Further Reading340
Exercises340
Chapter 16. Learning from Mistakes343
16.1. Where the Defects Are343
16.2. Mining the Past344
16.3. Where Defects Come From346
16.4. Errors during Specification347
16.4.1. What You Can Do347
16.4.2. What You Should Focus On348
16.5. Errors during Programming349
16.5.1. What You Can Do349
16.5.2. What You Should Focus On350
16.6. Errors during Quality Assurance351
16.6.1. What You Can Do352
16.6.2. What You Should Focus On353
16.7. Predicting Problems353
16.7.1. Predicting Errors from Imports354
16.7.2. Predicting Errors from Change Frequency355
16.7.3. A Cache for Bugs355
16.7.4. Recommendation Systems356
16.7.5. A Word of Warning356
16.8. Fixing the Process357
16.9. Concepts359
How to learn from mistakes359
How to map defects to components359
How to reduce the risk of errors in specification359
How to reduce the risk of errors in the code359
How to reduce the risk of errors in quality assurance359
How to allocate quality-assurance resources wisely359
16.10. Further Reading359
Exercises360
Appendix: Formal Definitions363
A.1. Delta Debugging363
A.1.1. Configurations363
A.1.2. Passing and Failing Run363
A.1.3. Tests363
A.1.4. Minimality364
A.1.5. Simplifying364
A.1.6. Differences364
A.1.7. Isolating365
A.2. Memory Graphs365
A.2.1. Formal Structure365
A.2.2. Unfolding Data Structures367
A.2.3. Matching Vertices and Edges368
A.2.4. Computing the Common Subgraph368
A.2.5. Computing Graph Differences369
A.2.6. Applying Partial State Changes371
A.2.7. Capturing C State372
A.3. Cause-Effect Chains374
Glossary377
Bibliography381
Index391

Loading shelf browser…

MARC record not available.
Back To Results
Showing Item 7 of 12

Session Timeout

Your session will expire in minutes and seconds.

If you need more time, please click "Continue Session."

Session Ended

Your session has ended. Redirecting to the home page...