SlideShare a Scribd company logo
1 of 26
Download to read offline
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Constraint-Based Error Localization
LocFaults: A new flow-driven and constraint-based error
localization approach
Mohammed Bekkouche, Michel Rueher, H´el`ene Collavizza
{bekkouche,helen,rueher}@unice.fr
I3S/CNRS, BP 121, 06903 Sophia Antipolis Cedex, France
University of Nice-Sophia Antipolis
SAC 2015
April 13 - 17, 2015
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 1 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Outline
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 2 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Introduction
Motive to solve the subject
Error localization is an important task to debug an erroneous
program but complex at the same time
→ When a program is not conform to its specification, i.e.,
the program is erroneous :
• BMC(Bounded Model Checking) and testing tools can
generate one or more counterexamples
• The trace of the counterexample is often long and
complicated to understand
• The identification of erroneous portions of the code is
hard even for experienced programmers
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 3 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Introduction
The problem: inputs and goal
Inputs
• A program contradicts its specification
• The violated postcondition POST
• A counterexample CE provided by a BMC tool
Goal
A reduced set of suspicious statements allowing the
programmer to understand the origin of his mistakes
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 4 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Introduction
The ideas
1 The program is modeled in a CFG in DSA form
2 The program and its specification are translated in
numerical constraints
3 CE : a counterexample, PATH : an erroneous path
4 The CSP C = CE ∪ PATH ∪ POST is inconsistent
Key issues
• What are the erroneous instructions on PATH that make
C inconsistent ?
• Which subsets remove to make C feasible ?
• What paths to explore ? → path of CE, deviations
from CE
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 5 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
Calculate the absolute value of i-j
1 c l a s s AbsMinus {
2 /∗ r e t u r n s | i−j | , the a b s o l u t e v a l u e of i minus j ∗/
3 /∗@ e n s u r e s
4 @ ( r e s u l t ==|i−j | ) ;
5 @∗/
6 void AbsMinus ( i n t i , i n t j ) {
7 i n t r e s u l t ;
8 i n t k = 0;
9 i f ( i <= j ) {
10 k = k+2; // e r r o r : k = k+2 i n s t e a d of k=k+1
11 }
12 i f ( k == 1 && i != j ) {
13 r e s u l t = j−i ;
14 }
15 e l s e {
16 r e s u l t = i−j ;
17 }
18 }
19 }
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 6 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
Calculate the absolute value of i-j
1 c l a s s AbsMinus {
2 /∗ r e t u r n s | i−j | , the a b s o l u t e v a l u e of i minus j ∗/
3 /∗@ e n s u r e s
4 @ ( r e s u l t ==|i−j | ) ;
5 @∗/
6 void AbsMinus ( i n t i , i n t j ) {
7 i n t r e s u l t ;
8 i n t k = 0;
9 i f ( i <= j ) {
10 k = k+2; // e r r o r : k = k+2 i n s t e a d of k=k+1
11 }
12 i f ( k == 1 && i != j ) {
13 r e s u l t = j−i ;
14 }
15 e l s e {
16 r e s u l t = i−j ;
17 }
18 }
19 }
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|}
If Else
If Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 6 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
The path of the counterexample
POST:{r1 == |i − j|}
{i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, r1 =
i0 − j0, r1 = |i − j|} is inconsistent
Only one MCS on the path : {r1 = i0 − j0}
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|}
If Else
If Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 7 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Exemple
The path obtained by deviating the condition i0 ≤ j0
The deviated condition : {i0 ≤ j0}
P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 =
−1}
P ∪ {r1 = |i − j|} is inconsistent
The deviation {i0 ≤ j0} does not correct
the program
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|} is UNSAT
If Else (deviation)
If Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 8 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
The path by deviating the condition k1 = 1 ∧ i0! = j0
The deviated condition : {(k1 = 1 ∧ i0! = j0)}
P = {i0 = 0, j0 = 1, k0 = 0, k1 = 2, r1 = 1}
The deviation {(k1 = 1 ∧ i0! = j0)} corrects
the program
C = {i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, ¬(k1 =
1 ∧ i0! = j0)}
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|}
If Else
If (deviation) Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 9 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
The path by deviating the condition k1 = 1 ∧ i0! = j0
The deviated condition : {(k1 = 1 ∧ i0! = j0)}
P = {i0 = 0, j0 = 1, k0 = 0, k1 = 2, r1 = 1}
P ∪ {r1 = |i − j|} is consistent
The deviation {(k1 = 1 ∧ i0! = j0)} corrects
the program
C = {i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, ¬(k1 =
1 ∧ i0! = j0)}
C is inconsistent
MCS on the path : {k0 = 0}, {k1 = k0 + 2}
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|} is SAT
If Else
If (deviation) Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 9 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
The path of a non-minimal deviation : {i0 ≤ j0, k1 = 1 ∧ i0! = j0}
The deviated conditions :
{i0 ≤ j0, (k1 = 1 ∧ i0! = j0)}
P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 = 1}
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|}
If Else (deviation)
If (deviation) Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 10 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Example
The path of a non-minimal deviation : {i0 ≤ j0, k1 = 1 ∧ i0! = j0}
The deviated conditions :
{i0 ≤ j0, (k1 = 1 ∧ i0! = j0)}
P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 = 1}
P ∪ {r1 = |i − j|} is consistent
The deviation is not minimal
CE:{(i0 == 0) ∧ (j0 == 1)}
k0 = 0
i0 ≤ j0
k1 = k0 + 2 Error k1 = k0
k1 =
1 ∧ i0! = j0
r1 = j0 − i0 r1 = i0 − j0
POST:{r1 == |i − j|} is SAT
If Else (deviation)
If (deviation) Else
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 10 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
LocFaults approach
MCS: Minimal Correction Subset
MCS: Definition
Let C an infeasible set of constraints
M ⊆ C is a MCS ⇔



M ⊆ C
Sol(< X, CM, D >) = ∅
C ⊂ M : Sol(< X, CC , D >) = ∅
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
LocFaults approach
MCS: Minimal Correction Subset
MCS: Definition
Let C an infeasible set of constraints
M ⊆ C is a MCS ⇔



M ⊆ C
Sol(< X, CM, D >) = ∅
C ⊂ M : Sol(< X, CC , D >) = ∅
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
LocFaults approach
MCS: Minimal Correction Subset
MCS: Definition
Let C an infeasible set of constraints
M ⊆ C is a MCS ⇔



M ⊆ C
Sol(< X, CM, D >) = ∅
C ⊂ M : Sol(< X, CC , D >) = ∅
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
LocFaults approach
MCS: Minimal Correction Subset
MCS: Definition
Let C an infeasible set of constraints
M ⊆ C is a MCS ⇔



M ⊆ C
Sol(< X, CM, D >) = ∅
C ⊂ M : Sol(< X, CC , D >) = ∅
MCS: Example
• C = {c1 : i = 0, c2 : v = 5, c3 : w = 6, c4 : z = i + v + w, c5 : ((z =
0 ∨ i = 0) ∧ (v ≥ 0) ∧ (w ≥ 0))} is inconsistent
• C has 4 MCS: {c1}, {c4}, {c5},{c2, c3}
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
LocFaults approach
(LocFaults) algorithm
• Isolation of MCS on the path of CE
• DFS exploration of CFG by propagating CE and by
deviating at most k conditional statements c1, .., ck
• P: propagation constraints derived from CE (of the form
variable = constant)
• C: constraints of path up to ck
• If P |= POST:
* {¬c1, .., ¬ck } is a correction,
* MCS of C ∪ {¬c1, .., ¬ck } are corrections
• A bound for the MCS calculated and the conditions
deviated
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 12 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Experimental evaluation
Tools used
• LocFaults: our implementation
→ The IBM solvers CP OPTIMIZER and CPLEX
→ The tool CPBPV to generate the CFG and CE
→ Benchmarks: Java programs
• BugAssist: the tool of error localization for BugAssist
approach
→ The MaxSAT solver MSUnCore2
→ Benchmarks: ANSI-C programs
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 13 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Experimental evaluation
Programs built
• Variations on the Tritype program :
→ TritypeV1, TritypeV2,TritypeV3, TritypeV4, TritypeV5
→ TritypeV6 (returns the perimeter of the triangle)
→ TritypeV7, TritypeV8 (return non linear expressions)
• TCAS(Traffic Collision Avoidance System), a
realistic benchmark :
→ 1608 test cases, except cases for overflow
PositiveRAAltThresh table
→ TcasKO . . . TcasKO41
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 14 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Experimental evaluation
Results (MCS identified)
Program Counter-example Errors
LocFaults
BugAssist= 0 = 1 = 2 = 3
TritypeV1{i = 2, j = 3, k = 2} 54 {54} {26} {29, 32} /
{26, 27, 32,
{48},{30},{25}{53, 57},{30},{25}
33, 36, 48,
57, 68}
TritypeV2{i = 2, j = 2, k = 4} 53 {54} {21} {29, 57} /
{21, 26, 27,
{26} {32, 44}
29, 30, 32,
{35},{27},{25}
33, 35, 36,
{53},{27},{25}
33, 35, 36,
53, 68}
TritypeV3{i = 1, j = 2, k = 1} 31 {50}
{21}
{33, 45} / {21, 26, 27,{26}
29, 31, 33,{29}
34, 36, 37,{36},{31},{25}
49, 68}{49},{31},{25}
TritypeV4{i = 2, j = 3, k = 3} 45 {46}{45},{33},{25} {26, 32} {32, 35, 49}
{26, 27, 29,
{32, 35, 53}
30, 32, 33,
{32, 35, 57}
35, 45, 49,
68}
TritypeV5{i = 2, j = 3, k = 3} 32,45 {40} {26}
{32, 45}
/ {26, 27, 29,
{29}
{35, 49},{25}
30, 32, 33,{35, 53},{25}
35, 49, 68}{35, 57},{25}
TritypeV6{i = 2, j = 1, k = 2} 58 {58} {31} / /
{28, 29, 31,
{37},{32},{27}
32, 35, 37,
65, 72}
TritypeV7{i = 2, j = 1, k = 2} 58 {58} {31} / /
{72, 37, 53,
{37},{27},{32}
49, 29, 35,
32, 31, 28,
65, 34, 62}
TritypeV8{i = 3, j = 4, k = 3} 61 {61} {29} / /
{19, 61, 79,
{35},{30},{25}
35, 27, 33,
30, 42, 29,
26, 71, 32,
48, 51, 54}
LocFaults provides a more informative and explanatory localization
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 15 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Experimental evaluation
Results (computation times for non linear programs)
Programme
LocFaults BugAssist
P
L
P L
= 0 ≤ 1 ≤ 2 ≤ 3
TritypeV7 0, 722s 0, 051s 0, 112s 0, 119s 1, 144s 0, 140s 20, 373s
TritypeV8 0, 731s 0, 08s 0, 143s 0, 156s 0, 162s 0, 216s 25, 562s
LocFaults is an order of magnitude faster than BugAssist on these two
benchmarks
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 16 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Experimental evaluation
Results (number of errors localized for TCAS)
Programme Nb E Nb CE LF BA
V1 1 131 131 131
V2 2 67 67 67
V3 1 23 23 13
V4 1 20 4 20
V5 1 10 9 10
V6 1 12 11 12
V7 1 36 36 36
V8 1 1 1 1
V9 1 7 7 7
V10 2 14 12 14
V11 2 14 12 14
V12 1 70 45 48
V13 1 4 4 4
V14 1 50 50 50
V16 1 70 70 70
V17 1 35 35 35
V18 1 29 28 29
V19 1 19 18 19
V20 1 18 18 18
V21 1 16 16 16
V22 1 11 11 11
V23 1 41 41 41
V24 1 7 7 7
V25 1 3 2 3
V26 1 11 7 11
V27 1 10 9 10
V28 1 75 74 58
V29 1 18 17 14
V30 1 57 57 57
V34 1 77 77 77
V35 1 75 74 58
V36 1 122 120 126
V37 1 94 21 94
V39 1 3 2 3
V40 2 122 72 122
V41 1 20 16 20
The performances of LocFaults and
BugAssist are very similar on this
programs well adapted for a Boolean solver
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 17 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Related work
SAT-based approaches
BugAssist
• A BMC method, like ours
• Major differences :
→ It transforms the entire program into a SAT formula
→ It based on the use of MaxSAT solvers
+ Global approach
– The complement of the MaxSAT set does not necessarily
correspond to the instructions on the same path
→ Displaying the union of these complements
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 18 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Related work
Approaches based on systematic testing
Tarantula, Ochiai, AMPLE, Jaccard, Heuristics III
• Ranking of suspicious statements detected during the
execution of a test battery
+ Simple approaches
– Need many test cases
Approaches that require the existence of an oracle
→ Decide if the result of tens of thousands of test is
just
Our framework is less demanding
→ Bounded Model Checking
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 19 / 20
Introduction
Example
LocFaults approach
Experiments
Related work
Conclusion and future work
I3S Laboratory, UNS-CNRS
Conclusion and future work
• Our flow-based and incremental approach is a good way
to help the programmer with bug hunting
→ it locates the errors around the path of the
counter-example
• We plan :
- to develop an interactive version of our tool :
→ to provide the localizations one after the others
→ to take benefit from the user knowledge to select the
condition that must be diverted
- to extend our approach in straightforward way for error
localization in programs with floating-point numbers
computations
Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 20 / 20

More Related Content

Similar to LocFaults: A new flow-driven and constraint-based error localization approach

Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
Silent error detection in numerical time stepping schemes (SIAM PP 2014)
Silent error detection in numerical time stepping schemes (SIAM PP 2014)Silent error detection in numerical time stepping schemes (SIAM PP 2014)
Silent error detection in numerical time stepping schemes (SIAM PP 2014)Austin Benson
 
Stratified sampling and resampling for approximate Bayesian computation
Stratified sampling and resampling for approximate Bayesian computationStratified sampling and resampling for approximate Bayesian computation
Stratified sampling and resampling for approximate Bayesian computationUmberto Picchini
 
Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.Vissarion Fisikopoulos
 
A copula model to analyze minimum admission scores
A copula model to analyze minimum admission scores A copula model to analyze minimum admission scores
A copula model to analyze minimum admission scores Mariela Fernández
 
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...ActiveEon
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)Minhas Kamal
 
Lesson 19: The Mean Value Theorem (Section 041 handout)
Lesson 19: The Mean Value Theorem (Section 041 handout)Lesson 19: The Mean Value Theorem (Section 041 handout)
Lesson 19: The Mean Value Theorem (Section 041 handout)Matthew Leingang
 
Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAbhik Roychoudhury
 
Trajectory reconstruction for robot programming by demonstration
Trajectory reconstruction for robot programming  by demonstration  Trajectory reconstruction for robot programming  by demonstration
Trajectory reconstruction for robot programming by demonstration IJECEIAES
 
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...wvanroos
 
Show off the efficiency of dai-liao method in merging technology for monotono...
Show off the efficiency of dai-liao method in merging technology for monotono...Show off the efficiency of dai-liao method in merging technology for monotono...
Show off the efficiency of dai-liao method in merging technology for monotono...nooriasukmaningtyas
 
Robust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systemsRobust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systemsPantelis Sopasakis
 
TemporalSpreadingOfAlternativeTrainsPresentation
TemporalSpreadingOfAlternativeTrainsPresentationTemporalSpreadingOfAlternativeTrainsPresentation
TemporalSpreadingOfAlternativeTrainsPresentationPeter Sels
 
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...SAJJAD KHUDHUR ABBAS
 
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITEgor Bogatov
 

Similar to LocFaults: A new flow-driven and constraint-based error localization approach (20)

Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
Absorbing Random Walk Centrality
Absorbing Random Walk CentralityAbsorbing Random Walk Centrality
Absorbing Random Walk Centrality
 
Kk2518251830
Kk2518251830Kk2518251830
Kk2518251830
 
Kk2518251830
Kk2518251830Kk2518251830
Kk2518251830
 
Silent error detection in numerical time stepping schemes (SIAM PP 2014)
Silent error detection in numerical time stepping schemes (SIAM PP 2014)Silent error detection in numerical time stepping schemes (SIAM PP 2014)
Silent error detection in numerical time stepping schemes (SIAM PP 2014)
 
Stratified sampling and resampling for approximate Bayesian computation
Stratified sampling and resampling for approximate Bayesian computationStratified sampling and resampling for approximate Bayesian computation
Stratified sampling and resampling for approximate Bayesian computation
 
Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.Oracle-based algorithms for high-dimensional polytopes.
Oracle-based algorithms for high-dimensional polytopes.
 
A copula model to analyze minimum admission scores
A copula model to analyze minimum admission scores A copula model to analyze minimum admission scores
A copula model to analyze minimum admission scores
 
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...
PhD Thesis Defense Presentation: Robust Low-rank and Sparse Decomposition for...
 
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
 
Lesson 19: The Mean Value Theorem (Section 041 handout)
Lesson 19: The Mean Value Theorem (Section 041 handout)Lesson 19: The Mean Value Theorem (Section 041 handout)
Lesson 19: The Mean Value Theorem (Section 041 handout)
 
Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWS
 
Trajectory reconstruction for robot programming by demonstration
Trajectory reconstruction for robot programming  by demonstration  Trajectory reconstruction for robot programming  by demonstration
Trajectory reconstruction for robot programming by demonstration
 
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
 
Show off the efficiency of dai-liao method in merging technology for monotono...
Show off the efficiency of dai-liao method in merging technology for monotono...Show off the efficiency of dai-liao method in merging technology for monotono...
Show off the efficiency of dai-liao method in merging technology for monotono...
 
Robust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systemsRobust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systems
 
TemporalSpreadingOfAlternativeTrainsPresentation
TemporalSpreadingOfAlternativeTrainsPresentationTemporalSpreadingOfAlternativeTrainsPresentation
TemporalSpreadingOfAlternativeTrainsPresentation
 
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...Episode 50 :  Simulation Problem Solution Approaches Convergence Techniques S...
Episode 50 : Simulation Problem Solution Approaches Convergence Techniques S...
 
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJIT
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

LocFaults: A new flow-driven and constraint-based error localization approach

  • 1. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Constraint-Based Error Localization LocFaults: A new flow-driven and constraint-based error localization approach Mohammed Bekkouche, Michel Rueher, H´el`ene Collavizza {bekkouche,helen,rueher}@unice.fr I3S/CNRS, BP 121, 06903 Sophia Antipolis Cedex, France University of Nice-Sophia Antipolis SAC 2015 April 13 - 17, 2015 Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 1 / 20
  • 2. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Outline Introduction Example LocFaults approach Experiments Related work Conclusion and future work Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 2 / 20
  • 3. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Introduction Motive to solve the subject Error localization is an important task to debug an erroneous program but complex at the same time → When a program is not conform to its specification, i.e., the program is erroneous : • BMC(Bounded Model Checking) and testing tools can generate one or more counterexamples • The trace of the counterexample is often long and complicated to understand • The identification of erroneous portions of the code is hard even for experienced programmers Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 3 / 20
  • 4. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Introduction The problem: inputs and goal Inputs • A program contradicts its specification • The violated postcondition POST • A counterexample CE provided by a BMC tool Goal A reduced set of suspicious statements allowing the programmer to understand the origin of his mistakes Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 4 / 20
  • 5. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Introduction The ideas 1 The program is modeled in a CFG in DSA form 2 The program and its specification are translated in numerical constraints 3 CE : a counterexample, PATH : an erroneous path 4 The CSP C = CE ∪ PATH ∪ POST is inconsistent Key issues • What are the erroneous instructions on PATH that make C inconsistent ? • Which subsets remove to make C feasible ? • What paths to explore ? → path of CE, deviations from CE Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 5 / 20
  • 6. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example Calculate the absolute value of i-j 1 c l a s s AbsMinus { 2 /∗ r e t u r n s | i−j | , the a b s o l u t e v a l u e of i minus j ∗/ 3 /∗@ e n s u r e s 4 @ ( r e s u l t ==|i−j | ) ; 5 @∗/ 6 void AbsMinus ( i n t i , i n t j ) { 7 i n t r e s u l t ; 8 i n t k = 0; 9 i f ( i <= j ) { 10 k = k+2; // e r r o r : k = k+2 i n s t e a d of k=k+1 11 } 12 i f ( k == 1 && i != j ) { 13 r e s u l t = j−i ; 14 } 15 e l s e { 16 r e s u l t = i−j ; 17 } 18 } 19 } Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 6 / 20
  • 7. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example Calculate the absolute value of i-j 1 c l a s s AbsMinus { 2 /∗ r e t u r n s | i−j | , the a b s o l u t e v a l u e of i minus j ∗/ 3 /∗@ e n s u r e s 4 @ ( r e s u l t ==|i−j | ) ; 5 @∗/ 6 void AbsMinus ( i n t i , i n t j ) { 7 i n t r e s u l t ; 8 i n t k = 0; 9 i f ( i <= j ) { 10 k = k+2; // e r r o r : k = k+2 i n s t e a d of k=k+1 11 } 12 i f ( k == 1 && i != j ) { 13 r e s u l t = j−i ; 14 } 15 e l s e { 16 r e s u l t = i−j ; 17 } 18 } 19 } k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} If Else If Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 6 / 20
  • 8. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example The path of the counterexample POST:{r1 == |i − j|} {i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, r1 = i0 − j0, r1 = |i − j|} is inconsistent Only one MCS on the path : {r1 = i0 − j0} CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} If Else If Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 7 / 20
  • 9. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Exemple The path obtained by deviating the condition i0 ≤ j0 The deviated condition : {i0 ≤ j0} P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 = −1} P ∪ {r1 = |i − j|} is inconsistent The deviation {i0 ≤ j0} does not correct the program CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} is UNSAT If Else (deviation) If Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 8 / 20
  • 10. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example The path by deviating the condition k1 = 1 ∧ i0! = j0 The deviated condition : {(k1 = 1 ∧ i0! = j0)} P = {i0 = 0, j0 = 1, k0 = 0, k1 = 2, r1 = 1} The deviation {(k1 = 1 ∧ i0! = j0)} corrects the program C = {i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, ¬(k1 = 1 ∧ i0! = j0)} CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} If Else If (deviation) Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 9 / 20
  • 11. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example The path by deviating the condition k1 = 1 ∧ i0! = j0 The deviated condition : {(k1 = 1 ∧ i0! = j0)} P = {i0 = 0, j0 = 1, k0 = 0, k1 = 2, r1 = 1} P ∪ {r1 = |i − j|} is consistent The deviation {(k1 = 1 ∧ i0! = j0)} corrects the program C = {i0 = 0, j0 = 1, k0 = 0, k1 = k0 + 2, ¬(k1 = 1 ∧ i0! = j0)} C is inconsistent MCS on the path : {k0 = 0}, {k1 = k0 + 2} CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} is SAT If Else If (deviation) Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 9 / 20
  • 12. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example The path of a non-minimal deviation : {i0 ≤ j0, k1 = 1 ∧ i0! = j0} The deviated conditions : {i0 ≤ j0, (k1 = 1 ∧ i0! = j0)} P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 = 1} CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} If Else (deviation) If (deviation) Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 10 / 20
  • 13. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Example The path of a non-minimal deviation : {i0 ≤ j0, k1 = 1 ∧ i0! = j0} The deviated conditions : {i0 ≤ j0, (k1 = 1 ∧ i0! = j0)} P = {i0 = 0, j0 = 1, k0 = 0, k1 = 0, r1 = 1} P ∪ {r1 = |i − j|} is consistent The deviation is not minimal CE:{(i0 == 0) ∧ (j0 == 1)} k0 = 0 i0 ≤ j0 k1 = k0 + 2 Error k1 = k0 k1 = 1 ∧ i0! = j0 r1 = j0 − i0 r1 = i0 − j0 POST:{r1 == |i − j|} is SAT If Else (deviation) If (deviation) Else Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 10 / 20
  • 14. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS LocFaults approach MCS: Minimal Correction Subset MCS: Definition Let C an infeasible set of constraints M ⊆ C is a MCS ⇔    M ⊆ C Sol(< X, CM, D >) = ∅ C ⊂ M : Sol(< X, CC , D >) = ∅ Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
  • 15. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS LocFaults approach MCS: Minimal Correction Subset MCS: Definition Let C an infeasible set of constraints M ⊆ C is a MCS ⇔    M ⊆ C Sol(< X, CM, D >) = ∅ C ⊂ M : Sol(< X, CC , D >) = ∅ Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
  • 16. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS LocFaults approach MCS: Minimal Correction Subset MCS: Definition Let C an infeasible set of constraints M ⊆ C is a MCS ⇔    M ⊆ C Sol(< X, CM, D >) = ∅ C ⊂ M : Sol(< X, CC , D >) = ∅ Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
  • 17. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS LocFaults approach MCS: Minimal Correction Subset MCS: Definition Let C an infeasible set of constraints M ⊆ C is a MCS ⇔    M ⊆ C Sol(< X, CM, D >) = ∅ C ⊂ M : Sol(< X, CC , D >) = ∅ MCS: Example • C = {c1 : i = 0, c2 : v = 5, c3 : w = 6, c4 : z = i + v + w, c5 : ((z = 0 ∨ i = 0) ∧ (v ≥ 0) ∧ (w ≥ 0))} is inconsistent • C has 4 MCS: {c1}, {c4}, {c5},{c2, c3} Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 11 / 20
  • 18. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS LocFaults approach (LocFaults) algorithm • Isolation of MCS on the path of CE • DFS exploration of CFG by propagating CE and by deviating at most k conditional statements c1, .., ck • P: propagation constraints derived from CE (of the form variable = constant) • C: constraints of path up to ck • If P |= POST: * {¬c1, .., ¬ck } is a correction, * MCS of C ∪ {¬c1, .., ¬ck } are corrections • A bound for the MCS calculated and the conditions deviated Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 12 / 20
  • 19. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Experimental evaluation Tools used • LocFaults: our implementation → The IBM solvers CP OPTIMIZER and CPLEX → The tool CPBPV to generate the CFG and CE → Benchmarks: Java programs • BugAssist: the tool of error localization for BugAssist approach → The MaxSAT solver MSUnCore2 → Benchmarks: ANSI-C programs Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 13 / 20
  • 20. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Experimental evaluation Programs built • Variations on the Tritype program : → TritypeV1, TritypeV2,TritypeV3, TritypeV4, TritypeV5 → TritypeV6 (returns the perimeter of the triangle) → TritypeV7, TritypeV8 (return non linear expressions) • TCAS(Traffic Collision Avoidance System), a realistic benchmark : → 1608 test cases, except cases for overflow PositiveRAAltThresh table → TcasKO . . . TcasKO41 Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 14 / 20
  • 21. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Experimental evaluation Results (MCS identified) Program Counter-example Errors LocFaults BugAssist= 0 = 1 = 2 = 3 TritypeV1{i = 2, j = 3, k = 2} 54 {54} {26} {29, 32} / {26, 27, 32, {48},{30},{25}{53, 57},{30},{25} 33, 36, 48, 57, 68} TritypeV2{i = 2, j = 2, k = 4} 53 {54} {21} {29, 57} / {21, 26, 27, {26} {32, 44} 29, 30, 32, {35},{27},{25} 33, 35, 36, {53},{27},{25} 33, 35, 36, 53, 68} TritypeV3{i = 1, j = 2, k = 1} 31 {50} {21} {33, 45} / {21, 26, 27,{26} 29, 31, 33,{29} 34, 36, 37,{36},{31},{25} 49, 68}{49},{31},{25} TritypeV4{i = 2, j = 3, k = 3} 45 {46}{45},{33},{25} {26, 32} {32, 35, 49} {26, 27, 29, {32, 35, 53} 30, 32, 33, {32, 35, 57} 35, 45, 49, 68} TritypeV5{i = 2, j = 3, k = 3} 32,45 {40} {26} {32, 45} / {26, 27, 29, {29} {35, 49},{25} 30, 32, 33,{35, 53},{25} 35, 49, 68}{35, 57},{25} TritypeV6{i = 2, j = 1, k = 2} 58 {58} {31} / / {28, 29, 31, {37},{32},{27} 32, 35, 37, 65, 72} TritypeV7{i = 2, j = 1, k = 2} 58 {58} {31} / / {72, 37, 53, {37},{27},{32} 49, 29, 35, 32, 31, 28, 65, 34, 62} TritypeV8{i = 3, j = 4, k = 3} 61 {61} {29} / / {19, 61, 79, {35},{30},{25} 35, 27, 33, 30, 42, 29, 26, 71, 32, 48, 51, 54} LocFaults provides a more informative and explanatory localization Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 15 / 20
  • 22. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Experimental evaluation Results (computation times for non linear programs) Programme LocFaults BugAssist P L P L = 0 ≤ 1 ≤ 2 ≤ 3 TritypeV7 0, 722s 0, 051s 0, 112s 0, 119s 1, 144s 0, 140s 20, 373s TritypeV8 0, 731s 0, 08s 0, 143s 0, 156s 0, 162s 0, 216s 25, 562s LocFaults is an order of magnitude faster than BugAssist on these two benchmarks Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 16 / 20
  • 23. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Experimental evaluation Results (number of errors localized for TCAS) Programme Nb E Nb CE LF BA V1 1 131 131 131 V2 2 67 67 67 V3 1 23 23 13 V4 1 20 4 20 V5 1 10 9 10 V6 1 12 11 12 V7 1 36 36 36 V8 1 1 1 1 V9 1 7 7 7 V10 2 14 12 14 V11 2 14 12 14 V12 1 70 45 48 V13 1 4 4 4 V14 1 50 50 50 V16 1 70 70 70 V17 1 35 35 35 V18 1 29 28 29 V19 1 19 18 19 V20 1 18 18 18 V21 1 16 16 16 V22 1 11 11 11 V23 1 41 41 41 V24 1 7 7 7 V25 1 3 2 3 V26 1 11 7 11 V27 1 10 9 10 V28 1 75 74 58 V29 1 18 17 14 V30 1 57 57 57 V34 1 77 77 77 V35 1 75 74 58 V36 1 122 120 126 V37 1 94 21 94 V39 1 3 2 3 V40 2 122 72 122 V41 1 20 16 20 The performances of LocFaults and BugAssist are very similar on this programs well adapted for a Boolean solver Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 17 / 20
  • 24. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Related work SAT-based approaches BugAssist • A BMC method, like ours • Major differences : → It transforms the entire program into a SAT formula → It based on the use of MaxSAT solvers + Global approach – The complement of the MaxSAT set does not necessarily correspond to the instructions on the same path → Displaying the union of these complements Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 18 / 20
  • 25. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Related work Approaches based on systematic testing Tarantula, Ochiai, AMPLE, Jaccard, Heuristics III • Ranking of suspicious statements detected during the execution of a test battery + Simple approaches – Need many test cases Approaches that require the existence of an oracle → Decide if the result of tens of thousands of test is just Our framework is less demanding → Bounded Model Checking Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 19 / 20
  • 26. Introduction Example LocFaults approach Experiments Related work Conclusion and future work I3S Laboratory, UNS-CNRS Conclusion and future work • Our flow-based and incremental approach is a good way to help the programmer with bug hunting → it locates the errors around the path of the counter-example • We plan : - to develop an interactive version of our tool : → to provide the localizations one after the others → to take benefit from the user knowledge to select the condition that must be diverted - to extend our approach in straightforward way for error localization in programs with floating-point numbers computations Mohammed, H´el`ene, Michel SAC 2015 Constraint-Based Error Localization 20 / 20