To be Precise:
Regression Aware Debugging
Awanish Pandey
Assistant Professor
Indian Institute of Technology Roorkee
Published in OOPSLA ‘16
What is Regression
Introduction to Bug Localization...
Input/Output or Input/Assert Pairs
Contains a failing test
To Be Precise : Regression Aware Debugging
TEST-SUITE
LOCALIZER
{ Set of SUSPICIOUS Program Locations }
What is a good Bug Localization?
To Be Precise : Regression Aware Debugging
Background : Partial-MaxSAT for Bug Localization
To Be Precise : Regression Aware Debugging
Partial MaxSAT?
HARD Clauses
CANNOT be relaxed(ignored)
SOFT Clauses
CAN be relaxed(ignored)
Minimum number of clauses to relax for satisfiability?
CNF Formula
(x1||x2||x3) && (!x1||x2||x3) && (x1||!x2||x3) && (x1||x2||!x3)
BugAssist [Jose et al. ‘11]
Input Constraint : (c == 0)
Output Constraint : (a == 2)
(Buggy Testcase)
To Be Precise : Regression Aware Debugging
HARD
HARD
SOFT
SOFT
SOFT
SOFT
(c==0) && (a == 0) &&
(((c == 1) && (a_1 == a + 1)) ||
((c != 1) && (a_1 == a - 1))) &&
(a_1 == 2)
a = 2;
HARD
a = 3;
BugAssist [Jose et al. ‘11]
To Be Precise : Regression Aware Debugging
Regression Awareness
To Be Precise : Regression Aware Debugging
No suspicious locations are created equal
Our Contribution
To Be Precise : Regression Aware Debugging
Tintin
Background : Craig Interpolation
To Be Precise : Regression Aware Debugging
Craig Interpolation (on an execution trace)
To Be Precise : Regression Aware Debugging
工
}
A
}
B
Negated Output Constraint : (a != 1)
(Passing Testcase)
Input Constraint : (c == 1)
Regression Score
No. of relaxed statements (ns) + No. of relaxed roadblocks (nr)
To Be Precise : Regression Aware Debugging
Motivating Example
To Be Precise : Regression Aware Debugging
Traffic Collision Avoidance System (Part of Siemen’s Benchmarks)
Artificially injected faults to create ~40 buggy versions
Motivating Example
IIT Kanpur
To Be Precise : Regression Aware Debugging
Failing Test :
Own_Tracked_Alt == Other_Tracked_Alt
How does BugAssist perform?
IIT Kanpur
To Be Precise : Regression Aware Debugging
How does Tintin perform?
IIT Kanpur
To Be Precise : Regression Aware Debugging
Motivating Example
IIT Kanpur
To Be Precise : Regression Aware Debugging
Passing Tests (Truncated)-
Other_Tracked_Alt = 424
Output : 1
2) Own_Tracked_Alt = 560
Other_Tracked_Alt = 601
Output : 0
...
(Own_Tracked_Alt > Other_Tracked_Alt)
⇓
return 0;
(Own_Tracked_Alt < Other_Tracked_Alt)
⇓
return 1;
Proof Breakage != Test Failure (Regression)
To Be Precise : Regression Aware Debugging
Implementation
To Be Precise : Regression Aware Debugging
Evaluation
To Be Precise : Regression Aware Debugging
RQ 1a (w.r.t Ground-Truth location)
To Be Precise : Regression Aware Debugging
RQ 1a
RQ1b (w.r.t all Repairable locations)
To Be Precise : Regression Aware Debugging
RQ1b
To Be Precise : Regression Aware Debugging
Evaluation Approach 2
To Be Precise : Regression Aware Debugging
75% of crosses lie below the 60% mark
RQ2 : Overhead
To Be Precise : Regression Aware Debugging
What about Program Repair
To Be Precise : Regression Aware Debugging
Tintin - A compromise
INTERPOLANT PRECOND - (a > b)�if (choice == 1) {� selection = b + a;�} else if (choice == 2) {� selection = b - a;�}...�INTERPOLANT POSTCOND - (selection > 0)�
Repair in Tintin
To Be Precise : Regression Aware Debugging
Future Work
Summary
To Be Precise : Regression Aware Debugging
Thank you!
Questions?