Software Debugging: Past, Present, and Future
Alessandro (Alex) Orso
School of Computer Science – College of Computing Georgia Institute of Technology http://www.cc.gatech.edu/~orso/ Partially supported by: NSF, Google, IBM, and MSR
Software Debugging: Past, Present, and Future Alessandro (Alex) - - PowerPoint PPT Presentation
Software Debugging: Past, Present, and Future Alessandro (Alex) Orso School of Computer Science College of Computing Georgia Institute of Technology http://www.cc.gatech.edu/~orso/ Partially supported by : NSF, Google, IBM, and MSR
Software Debugging: Past, Present, and Future
Alessandro (Alex) Orso
School of Computer Science – College of Computing Georgia Institute of Technology http://www.cc.gatech.edu/~orso/ Partially supported by: NSF, Google, IBM, and MSRAutomated Debugging
Past Present Future
Past
A Short History of Debugging nThe Birth of Debugging
First reference to software errors Your guess?
??? 2017The Birth of Debugging
The Birth of Debugging
The Birth of Debugging
The Birth of Debugging
Symbolic Debugging
Symbolic Debugging
Symbolic Debugging
Symbolic Debugging
Program Slicing
Program Slicing
Static Slicing Example
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); }Program Slicing
Program Slicing
Dynamic Slicing Example
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); }Dynamic Slicing Example
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); }Dynamic Slicing Example
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); }Program Slicing
Program Slicing
Program Slicing
Program Slicing
Delta Debugging
Delta Debugging
✔ ✘
Today✔
Yesterday✔ ✘
Today✔
Yesterday✘
✔ ✘
Today✔
Yesterday✘ ✘
✔ ✘
Today✔
Yesterday✘ ✘
✔ ✘
Today✔
Yesterday✘ ✘ ✔ ✘
Failure cause … …✔ ✘
Today✔
Yesterday✘ ✘ ✔ ✘
Failure cause … …Applied to programs, inputs, states, ...
Statistical Debugging
Statistical Debugging
Tarantula
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); } 3,3,5 1,2,3 3,2,1 5,5,5 5,3,4 2,1,3 P P P P P FTarantula
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); } 3,3,5 1,2,3 3,2,1 5,5,5 5,3,4 2,1,3 P P P P P FTarantula
mid() { int x,y,z,m; 1: read(“Enter 3 numbers:”,x,y,z); 2: m = z; 3: if (y<z) 4: if (x<y) 5: m = y; 6: else if (x<z) 7: m = y; // bug 8: else 9: if (x>y) 10: m = y; 11: else if (x>z) 12: m = x; 13: print(“Middle number is:”, m); } 3,3,5 1,2,3 3,2,1 5,5,5 5,3,4 2,1,3 P P P P P FStatistical Debugging
Statistical Debugging
Statistical Debugging
Statistical Debugging
Statistical Debugging
Statistical Debugging
Additional Techniques
Additional Techniques
Not meant to be comprehensive!
Present
Can We Debug at the Push of a Button?Automated Debugging
(rank based)
…"
1)" 2)" 3)" 4)"Automated Debugging
(rank based)
…"
1)" 2)" 3)" 4)"Here$is$a$list$of$ places$to$check$out$
Automated Debugging
Conceptual Model
…"
1)" 2)" 3)" 4)"Ok,$I$will$check$out$ your$sugges3ons$
Automated Debugging
Conceptual Model
…"
1)" 2)" 3)" 4)"✔ ✔ ✔
Found&the&bug!&
Performance of Automated Debugging Techniques
Spectra-Based TechniquesPerformance of Automated Debugging Techniques
Spectra-Based TechniquesM i s s i
A c c
p l i s h e d ?
Assumption #1: Locating a bug in 10% of the code is a great result
Assumption #2: Programmers exhibit perfect bug understanding
Do you see a bug?
Assumption #3: Programmers inspect a list linearly and exhaustively
Good for comparison, but is it realistic?
Assumption #3: Programmers inspect a list linearly and exhaustively
Good for comparison, but is it realistic?
Does the conceptual model make sense? Have we really evaluated it?
Assumption #3: Programmers inspect a list linearly and exhaustively
Good for comparison, but is it realistic?
Does the conceptual model make sense? Have we really evaluated it? Are we headed in the right direction?
Are we headed in the right direction?
What do we know about automated debugging?
Studies on tools Human studiesWhat do we know about automated debugging?
Studies on tools Human studies Let’s&see…& Over&50&years&of&research&What do we know about automated debugging?
S t u d i e sAre these Techniques and Tools Actually Helping Programmers?
Are these Techniques and Tools Actually Helping Programmers?
User studies: Spectra based fault localization IR-based fault localization User studies: Spectra based fault localization IR-based fault localization
Experimental Protocol: Setup
…" 1)" 2)" 3)" 4)" ✔ ✔ ✔Experimental Protocol: Setup
…" 1)" 2)" 3)" 4)" ✔ ✔ ✔Tetris Bug
(Easier)NanoXML Bug
(Harder)Experimental Protocol: Setup
…" 1)" 2)" 3)" 4)" ✔ ✔ ✔Experimental Protocol:
Studies and Groups
Experimental Protocol:
Studies and Groups
A! B!
Part 1
Experimental Protocol:
Studies and Groups
Part 2
C! D!
Rank! Rank!
7➡35 83➡16Study Results
Tetris NanoXML A B C D A! B! C! D! Rank! Rank!Study Results
Tetris NanoXML A Not significantly different B C D A! B! C! D! Rank! Rank!Study Results
Tetris NanoXML A Not significantly different Not significantly different B C Not significantly different Not significantly different D A! B! C! D! Rank! Rank!Study Results
Tetris NanoXML A Significantly different for high performers Not significantly different B C Not significantly different Not significantly different D A! B! C! D! Rank! Rank! Stratifying participantsStudy Results
Tetris NanoXML A Significantly different for high performers Not significantly different B C Not significantly different Not significantly different D A! B! C! D! Rank! Rank! Stratifying participantsAnalysis of results and questionnaires...
Findings
RQ1: Do programmers who use automated debugging tools locate bugs faster than programmers who do not use such tools? Experts are faster when using the tool ➡ Yes (with caveats) RQ2: Is the effectiveness of debugging with automated tools affected by the faulty statement’s rank Changes in rank have no significant effects ➡ No RQ3: Do developers navigate a list of statements ranked by suspiciousness in the order provided? Programmers do not visit each statement in the list, they search RQ4: Does perfect bug understanding exist? Perfect bug understanding is generally not a realistic assumptionFuture
Where Shall We Go Next?Feedback-based Debugging (Humans in the Loop)
Intuition: we should amplify, rather than replace human skills…"
1)" 2)" 3)" 4)" SFL…"
1)" 2)" 3)" 4)" SFL Assumption: Programmers exhibit perfect bug understanding Assumption: Programmers inspect a list linearly and exhaustively…"
1)" 2)" 3)" 4)" SFL Assumption: Programmers exhibit perfect bug understanding Assumption: Programmers inspect a list linearly and exhaustivelySwift
Example
Iteration 1
✓ ✗ ?Iteration 2
✓ ✗ ?Iteration 3
✓ ✗ ?Swift
Virtual Test CasesSwift
Virtual Test CasesPreliminary empirical results:
Formula-based Debugging (AKA Failure Explanation)
Formula-based Debugging (AKA Failure Explanation)
Formula-based Debugging (AKA Failure Explanation)
Formula-based Debugging (AKA Failure Explanation)
Formula-based Debugging (AKA Failure Explanation)
In Summary
...
Where Shall We Go Next?
With much appreciated input/contributions from