Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

LocFaults, a bounded constraint-based approach to aid for error localization

20.066 Aufrufe

Veröffentlicht am

When a program is not conform to its specification, i.e., the program is erroneous, provide useful information for error localization is an important task to debug the program but complex at the same time. The goal is to provide a reduced set of suspicious statements to understand the origin of errors in the program. In our research we propose a new constraint-based approach to support the problem of error localization for which a counterexample is available, i.e., a test case proving the non conformity. From the counterexample, our approach generate a constraint system for each path of the CFG (Control Flow Graph) for which at most k conditional statements are suspected. Then, we calculate Minimal Correction Subsets (MCS) of bounded size for each erroneous path. The removal of one of these sets of constraints yields a Maximal Satisfiable Subset (MSS), a maximal subset of constraints satisfying the postcondition. We export and adapt the generic algorithm proposed by Liffiton and Sakallah to handle programs with numerical statements more efficiently. We present preliminary experimental results that are quite encouraging.

Veröffentlicht in: Wissenschaft
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

LocFaults, a bounded constraint-based approach to aid for error localization

  1. 1. Introduction Approach Example State of the art Experimentation Conclusion and outlook Error localization A bounded constraint-based approach to aid for error localization Bekkouche Mohammed, Collavizza Helene, Rueher Michel Univ. Nice Sophia Antipolis, CNRS, I3S, UMR 7271 06900 Sophia Antipolis, France JFPC 2014 October 18, 2014 Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 1/23
  2. 2. Introduction Approach Example State of the art Experimentation Conclusion and outlook Plan 1 Introduction 2 Approach 3 Example 4 State of the art 5 Experimentation 6 Conclusion and outlook Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 2/23
  3. 3. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction Motivation BMC(Bounded Model Checking) and testing tools can generate one or more counterexamples A counterexample provides an execution trace The trace of the counterexample is often long and complicated to understand The identi
  4. 4. cation of erroneous portions of the code is complex for the programmer ! Need to develop localization tools to assist the developer in this task Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 3/23
  5. 5. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction Motivation BMC(Bounded Model Checking) and testing tools can generate one or more counterexamples A counterexample provides an execution trace The trace of the counterexample is often long and complicated to understand The identi
  6. 6. cation of erroneous portions of the code is complex for the programmer ! Need to develop localization tools to assist the developer in this task Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 3/23
  7. 7. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The problem Inputs A program contradicts its speci
  8. 8. cation : the violated postcondition POST A counterexample CE provided by a BMC tool Outputs A reduced set of suspicious statements allowing the programmer to understand the origin of his mistakes Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 4/23
  9. 9. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The problem Inputs A program contradicts its speci
  10. 10. cation : the violated postcondition POST A counterexample CE provided by a BMC tool Outputs A reduced set of suspicious statements allowing the programmer to understand the origin of his mistakes Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 4/23
  11. 11. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The ideas 1 The program is modeled in a CFG in DSA form 2 The program and its speci
  12. 12. cation are translated in numerical constraints 3 CE : a counterexample, PATH : an erroneous path 4 The CSP C = CE [ PATH [ POST is inconsistent Key points 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 Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 5/23
  13. 13. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The ideas 1 The program is modeled in a CFG in DSA form 2 The program and its speci
  14. 14. cation are translated in numerical constraints 3 CE : a counterexample, PATH : an erroneous path 4 The CSP C = CE [ PATH [ POST is inconsistent Key points 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 Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 5/23
  15. 15. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The ideas 1 The program is modeled in a CFG in DSA form 2 The program and its speci
  16. 16. cation are translated in numerical constraints 3 CE : a counterexample, PATH : an erroneous path 4 The CSP C = CE [ PATH [ POST is inconsistent Key points 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 Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 5/23
  17. 17. Introduction Approach Example State of the art Experimentation Conclusion and outlook Introduction The ideas 1 The program is modeled in a CFG in DSA form 2 The program and its speci
  18. 18. cation are translated in numerical constraints 3 CE : a counterexample, PATH : an erroneous path 4 The CSP C = CE [ PATH [ POST is inconsistent Key points 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 Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 5/23
  19. 19. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approach MCS: Minimal Correction Subset MCS: De
  20. 20. nition Let C an infeasible set of constraints M C is a MCS , 8 : M C Sol( X; CnM;D )6= ; @C00 M : Sol( X; CnC00;D ) = ; MCS: Example C = fc1 : i = 0; c2 : v = 5; c3 : w = 6; c4 : z = i + v + w; c5 : ((z = 0 _ i6= 0) ^ (v 0) ^ (w 0))g is inconsistent C has 4 MCS: fc1g, fc4g, fc5g,fc2; c3g Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 6/23
  21. 21. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approach MCS: Minimal Correction Subset MCS: De
  22. 22. nition Let C an infeasible set of constraints M C is a MCS , 8 : M C Sol( X; CnM;D )6= ; @C00 M : Sol( X; CnC00;D ) = ; MCS: Example C = fc1 : i = 0; c2 : v = 5; c3 : w = 6; c4 : z = i + v + w; c5 : ((z = 0 _ i6= 0) ^ (v 0) ^ (w 0))g is inconsistent C has 4 MCS: fc1g, fc4g, fc5g,fc2; c3g Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 6/23
  23. 23. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approach MCS: Minimal Correction Subset MCS: De
  24. 24. nition Let C an infeasible set of constraints M C is a MCS , 8 : M C Sol( X; CnM;D )6= ; @C00 M : Sol( X; CnC00;D ) = ; MCS: Example C = fc1 : i = 0; c2 : v = 5; c3 : w = 6; c4 : z = i + v + w; c5 : ((z = 0 _ i6= 0) ^ (v 0) ^ (w 0))g is inconsistent C has 4 MCS: fc1g, fc4g, fc5g,fc2; c3g Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 6/23
  25. 25. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approach MCS: Minimal Correction Subset MCS: De
  26. 26. nition Let C an infeasible set of constraints M C is a MCS , 8 : M C Sol( X; CnM;D )6= ; @C00 M : Sol( X; CnC00;D ) = ; MCS: Example C = fc1 : i = 0; c2 : v = 5; c3 : w = 6; c4 : z = i + v + w; c5 : ((z = 0 _ i6= 0) ^ (v 0) ^ (w 0))g is inconsistent C has 4 MCS: fc1g, fc4g, fc5g,fc2; c3g Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 6/23
  27. 27. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approche (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 chemin up to ck If P j= POST: * f:c1; ::;:ckg is a correction, * MCS of C [ f:c1; ::;:ckg are corrections A bound for the MCS calculated and the conditions deviated Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 7/23
  28. 28. Introduction Approach Example State of the art Experimentation Conclusion and outlook Approche (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 chemin up to ck If P j= POST: * f:c1; ::;:ckg is a correction, * MCS of C [ f:c1; ::;:ckg are corrections A bound for the MCS calculated and the conditions deviated Bekkouche Mohammed, Collavizza Helene, Rueher Michel | Error localization 7/23
  29. 29. Introduction Approach Example State of the art Experimentation Conclusion and outlook Example Calculate the absolute value of i-j 1 c l a s s AbsMinus f 2 / r e t u r n s j i

×