SlideShare une entreprise Scribd logo
1  sur  37
Muffler: An Approach Using Mutation
to Facilitate Fault Localization
                                                        Tao He
                                              elfinhe@gmail.com
                                 Software Engineering Laboratory
           Department of Computer Science, Sun Yat-Sen University

          Department of Computer Science and Engineering, HKUST

                                                  November 2011
                        Sun Yat-Sen University, Guangzhou, China



                                                             1/34
Key hypothesis
   Mutating the faulty statement tends to maintain the outcome of passed
    test cases.
        Only one statement is faulty.
   By contrast, mutating a correct statement tends to toggle the outcome of
    passed test cases (from passed to failed).
        Two statements are faulty.
   Intuition
        Two faulty statements can trigger more failures than one faulty statement.




                                                                                      2/34
Intuition

   In branches




                  F   M



                          M: Mutant point
                          F: Fault point




                                      3/34
Intuition

   In branches
                      M




                  F



                          M: Mutant point
                          F: Fault point




                                      4/34
Intuition

   In branches




                  F +M



                         M: Mutant point
                         F: Fault point




                                     5/34
Intuition

   In series
                M




                F



                    M: Mutant point
                    F: Fault point




                                6/34
Intuition

   In series




                F   +M



                         M: Mutant point
                         F: Fault point




                                     7/34
A motivating example
   Siemens – tcas v27




                         8/34
A motivating example
        Siemens – tcas v27
        Golden version – line 118
             enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) &&
              (Cur_Vertical_Sep > MAXALTDIFF);
        Fault version – line 118
             enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) ;
             // missing ‘(Cur_Vertical_Sep > MAXALTDIFF)’



enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) &&
                (Cur_Vertical_Sep > MAXALTDIFF);



 enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) ;

                                                                               9/34
A motivating example

      Suspiciousness by Ochiai




Best rank                     Worst rank




                                           10/34
A motivating example
                Result changes by Muffler




Vioplot from tcas v27                        Vioplot from tcas v27
Y-axis: # of changes from passed to failed   Y-axis: proportion of changes from passed to failed
Red line: fault line’s change                Red line: fault line’s change              11/34
A motivating example

   Formula
       Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s)




                Improve fault’s worst rank

                                                                        12/34
Formula
  Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s)



        Primary Key              Secondary Key       Additional Key
        (imprecise when          (invalid when       (inclined
        multiple faults          coincidental        to handle
        occurs)                  correctness%        coincidental
                                 is high)            correctness)




                                                                      13/34
Formula
  Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s)


                         Coincidental
              PtoF (f)
                         correctness:
                         i.e. P(f)


                                              Passed

                            PtoF (c)




               After mutating each executable statement

                                               Failed
                                                        Total Tests


               PtoF (c) is empirically greater than PtoF(f)
                                                                      14/34
Model of our approach - Muffler

   Simple and clear target of each input and step
   List all possible research questions
       We first focus on the key issue, and leave the
        others as future work.




                                                         15/34
Model of our approach – Muffler




                                  16/34
Input variables

   Program
   Test suite
   Mutant operators
   (No more)




                       17/34
Program
   Program
       Number of faults
       Failure-triggering ability by covering this
        statement (Is it easy to cause coincidental
        correctness?)
          Fault type
          Statement type of fault

          Fault position

          Program structure

          Program size

          Etc.

                                                      18/34
Test suite
   Number of total test cases
   Number of passed/failed test cases
   Number of passed test cases cover each
    statement to be mutated
       test cases that may alter testing results
   Number of statements covered by each failed
    test case
       Help us select suspicious statements.
   Can we locate faults without test oracle?

                                                    19/34
Mutant operators

   Types of mutation operators
   Applicable condition for each operator
   The probability of failure-triggering by
    covering mutant point
       The ability for mutant to kill test cases




                                                    20/34
Steps

   I list steps for separation of concerns
       This can help us locate where our hypothesis is.




                                                       21/34
Step I: execute test cases

   Get testing results
   Get coverage
       Of failed test cases
            For the selection of suspicious statements
       Of passed test cases
            For the selection of test cases to re-run mutants




                                                                 22/34
Step II: select statements to mutate
   Input
       Coverage of failed test cases
   Output
       Statements to be mutated
            Covered by least-coverage failed test case
   Discussion
       Multi-fault scenarios
            Our approach depend more on passed test cases
       Practical situation (E.g., in gcc bug reports, most
        faults are reported with one failure)
       Precision of failure clustering is …             23/34
Step III: mutate selected statements
   Input
        Program
        Statements to be mutated
        Mutant operators
   Output
        Mutants by mutating each suspicious statement
   Discussion
        How many mutants to take from each suspicious statement?
        What if there is no applicable mutant operator for this statement? (I.e.,
         no mutant is generated.)
        What if all mutants of a statement do not change the passed testing
         results to failed? (I.e., mutation impact is 0.0.) Two possible reasons:
               Equivalent mutants
               Coincidental correctness
                                                                             24/34
Step IV: select passed test cases
   Select passed test cases that cover the mutant point
   Select passed test cases that cover less statements
   Reduce the number of passed test cases by discarding
    similar test cases




                                                       25/34
Step V: run mutants against passed test
cases that cover the mutated statement
   Input
       Mutants for each suspicious statement
       Selected passed test cases on original program
   Output
       Number of failed test cases from running on each mutant




                                                                  26/34
Step VI: weight statements

   By dynamic impact
   By clustering mutant statements by analyzing
    program structure




                                              27/34
Step VII: compute mutation impact
and rank the suspicious
   Discussion
       Why not use failed test cases?
       How to design the formula of mutation impact?
       What if the number of passed test cases that cover the mutant
        point is 0?




                                                                   28/34
Robust with potential issues in CBFL?

   Coincidental Correctness
   Multi-fault
   Coverage equivalence




                                   29/34
Coincidental Correctness

   When coincidental correctness frequently
    occurs, our approach can work.
   When coincidental correctness rarely occurs,
    our approach is as good as CBFL.
       This is why we use ‘– PassedToFailed(s)’, rather
        than ‘– PassedToFailed(s)/Passed(s)’




                                                      30/34
Multi-fault

   CBFL techniques mainly rely on the coverage
    of passed test cases and failed test cases
    caused by the same fault. (More on the failed
    test cases)
   When applying to multi-fault scenarios, the
    different coverage between failed test cases
    caused by different fault will affect the
    effectiveness.
   Our approach more depend on passed tests.
                                              31/34
Equivalent coverage

   Inside a basic block, different statements
    have different def-use pair impact on
    statements outside the basic block.




                                                 32/34
Q&A




      33/34
Thank you!
Contact me via elfinhe@gmail.com




                                   34/34
35/34
Guideline of our approach

   Simple and clear target of each step
   List all possible research questions
       We first focus on the key issue, and leave the
        others as future work.




                                                         36/34
37/34

Contenu connexe

Tendances

8 statement-level control structure
8 statement-level control structure8 statement-level control structure
8 statement-level control structurejigeno
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsShinpei Hayashi
 
Selection Statements in C Programming
Selection Statements in C ProgrammingSelection Statements in C Programming
Selection Statements in C ProgrammingKamal Acharya
 
Cse lecture-7-c loop
Cse lecture-7-c loopCse lecture-7-c loop
Cse lecture-7-c loopFarshidKhan
 
The Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsThe Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsTech
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Shinpei Hayashi
 
C programming decision making
C programming decision makingC programming decision making
C programming decision makingSENA
 
Lecture13 control statementswitch.ppt
Lecture13 control statementswitch.pptLecture13 control statementswitch.ppt
Lecture13 control statementswitch.ppteShikshak
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming LanguageAhmad Idrees
 
Control Structures
Control StructuresControl Structures
Control StructuresGhaffar Khan
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c languageshhanks
 
Selection statements
Selection statementsSelection statements
Selection statementsHarsh Dabas
 
Control structures i
Control structures i Control structures i
Control structures i Ahmad Idrees
 

Tendances (20)

8 statement-level control structure
8 statement-level control structure8 statement-level control structure
8 statement-level control structure
 
iFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature ImplementationsiFL: An Interactive Environment for Understanding Feature Implementations
iFL: An Interactive Environment for Understanding Feature Implementations
 
Control statments in c
Control statments in cControl statments in c
Control statments in c
 
Selection Statements in C Programming
Selection Statements in C ProgrammingSelection Statements in C Programming
Selection Statements in C Programming
 
Cse lecture-7-c loop
Cse lecture-7-c loopCse lecture-7-c loop
Cse lecture-7-c loop
 
The Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsThe Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming Concepts
 
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
Recording Finer-Grained Software Evolution with IDE: An Annotation-Based Appr...
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
C programming decision making
C programming decision makingC programming decision making
C programming decision making
 
Lecture13 control statementswitch.ppt
Lecture13 control statementswitch.pptLecture13 control statementswitch.ppt
Lecture13 control statementswitch.ppt
 
Controls & Loops in C
Controls & Loops in C Controls & Loops in C
Controls & Loops in C
 
Control structures in C++ Programming Language
Control structures in C++ Programming LanguageControl structures in C++ Programming Language
Control structures in C++ Programming Language
 
Control Structures
Control StructuresControl Structures
Control Structures
 
Unit 5. Control Statement
Unit 5. Control StatementUnit 5. Control Statement
Unit 5. Control Statement
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c language
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
Selection statements
Selection statementsSelection statements
Selection statements
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Control structures i
Control structures i Control structures i
Control structures i
 

Similaire à Muffler a tool using mutation to facilitate fault localization 2.0

Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Tao He
 
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...Iosif Itkin
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveEngineering Software Lab
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective Engineering Software Lab
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingLionel Briand
 
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Wolfgang Grieskamp
 
Mutation testing
Mutation testingMutation testing
Mutation testingTao He
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming languageVasavi College of Engg
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Gerald Muecke
 
Correctness attraction __kth_2017
Correctness attraction __kth_2017Correctness attraction __kth_2017
Correctness attraction __kth_2017Benjamin Danglot
 
A software fault localization technique based on program mutations
A software fault localization technique based on program mutationsA software fault localization technique based on program mutations
A software fault localization technique based on program mutationsTao He
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Gerald Muecke
 
Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.pptjayverma27
 
Mutation Testing and MuJava
Mutation Testing and MuJavaMutation Testing and MuJava
Mutation Testing and MuJavaKrunal Parmar
 
exception%20handlingcpp.pptx
exception%20handlingcpp.pptxexception%20handlingcpp.pptx
exception%20handlingcpp.pptxansariparveen06
 
Using Diversity for Automated Boundary Value Testing
Using Diversity for Automated Boundary Value TestingUsing Diversity for Automated Boundary Value Testing
Using Diversity for Automated Boundary Value TestingFelix Dobslaw
 

Similaire à Muffler a tool using mutation to facilitate fault localization 2.0 (20)

Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3
 
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
Introduction into Fault-tolerant Distributed Algorithms and their Modeling (P...
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspective
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
 
Workshop unit test
Workshop   unit testWorkshop   unit test
Workshop unit test
 
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
 
Mutation testing
Mutation testingMutation testing
Mutation testing
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
 
Mutation testing
Mutation testingMutation testing
Mutation testing
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016
 
Correctness attraction __kth_2017
Correctness attraction __kth_2017Correctness attraction __kth_2017
Correctness attraction __kth_2017
 
Testing
TestingTesting
Testing
 
A software fault localization technique based on program mutations
A software fault localization technique based on program mutationsA software fault localization technique based on program mutations
A software fault localization technique based on program mutations
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017
 
Process Synchronization -1.ppt
Process Synchronization -1.pptProcess Synchronization -1.ppt
Process Synchronization -1.ppt
 
Mutation Testing and MuJava
Mutation Testing and MuJavaMutation Testing and MuJava
Mutation Testing and MuJava
 
exception%20handlingcpp.pptx
exception%20handlingcpp.pptxexception%20handlingcpp.pptx
exception%20handlingcpp.pptx
 
Using Diversity for Automated Boundary Value Testing
Using Diversity for Automated Boundary Value TestingUsing Diversity for Automated Boundary Value Testing
Using Diversity for Automated Boundary Value Testing
 
C Programming Unit-2
C Programming Unit-2C Programming Unit-2
C Programming Unit-2
 

Plus de Tao He

Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Tao He
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvmTao He
 
Testing survey
Testing surveyTesting survey
Testing surveyTao He
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directionsTao He
 
Smart debugger
Smart debuggerSmart debugger
Smart debuggerTao He
 
C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4Tao He
 
Django
DjangoDjango
DjangoTao He
 
基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述Tao He
 
Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Tao He
 
Testing group’s work on fault localization
Testing group’s work on fault localizationTesting group’s work on fault localization
Testing group’s work on fault localizationTao He
 
Semantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamSemantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamTao He
 
Problems
ProblemsProblems
ProblemsTao He
 
A survey of software testing
A survey of software testingA survey of software testing
A survey of software testingTao He
 
Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Tao He
 
Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Tao He
 

Plus de Tao He (15)

Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvm
 
Testing survey
Testing surveyTesting survey
Testing survey
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directions
 
Smart debugger
Smart debuggerSmart debugger
Smart debugger
 
C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4
 
Django
DjangoDjango
Django
 
基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述
 
Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Java覆盖信息收集工具比较
Java覆盖信息收集工具比较
 
Testing group’s work on fault localization
Testing group’s work on fault localizationTesting group’s work on fault localization
Testing group’s work on fault localization
 
Semantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamSemantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti Spam
 
Problems
ProblemsProblems
Problems
 
A survey of software testing
A survey of software testingA survey of software testing
A survey of software testing
 
Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...
 
Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
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
 
🐬 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
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Dernier (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Muffler a tool using mutation to facilitate fault localization 2.0

  • 1. Muffler: An Approach Using Mutation to Facilitate Fault Localization Tao He elfinhe@gmail.com Software Engineering Laboratory Department of Computer Science, Sun Yat-Sen University Department of Computer Science and Engineering, HKUST November 2011 Sun Yat-Sen University, Guangzhou, China 1/34
  • 2. Key hypothesis  Mutating the faulty statement tends to maintain the outcome of passed test cases.  Only one statement is faulty.  By contrast, mutating a correct statement tends to toggle the outcome of passed test cases (from passed to failed).  Two statements are faulty.  Intuition  Two faulty statements can trigger more failures than one faulty statement. 2/34
  • 3. Intuition  In branches F M M: Mutant point F: Fault point 3/34
  • 4. Intuition  In branches M F M: Mutant point F: Fault point 4/34
  • 5. Intuition  In branches F +M M: Mutant point F: Fault point 5/34
  • 6. Intuition  In series M F M: Mutant point F: Fault point 6/34
  • 7. Intuition  In series F +M M: Mutant point F: Fault point 7/34
  • 8. A motivating example  Siemens – tcas v27 8/34
  • 9. A motivating example  Siemens – tcas v27  Golden version – line 118  enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) && (Cur_Vertical_Sep > MAXALTDIFF);  Fault version – line 118  enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) ;  // missing ‘(Cur_Vertical_Sep > MAXALTDIFF)’ enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) && (Cur_Vertical_Sep > MAXALTDIFF); enabled = High_Confidence && (Own_Tracked_Alt_Rate <= OLEV) ; 9/34
  • 10. A motivating example  Suspiciousness by Ochiai Best rank Worst rank 10/34
  • 11. A motivating example  Result changes by Muffler Vioplot from tcas v27 Vioplot from tcas v27 Y-axis: # of changes from passed to failed Y-axis: proportion of changes from passed to failed Red line: fault line’s change Red line: fault line’s change 11/34
  • 12. A motivating example  Formula  Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s) Improve fault’s worst rank 12/34
  • 13. Formula Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s) Primary Key Secondary Key Additional Key (imprecise when (invalid when (inclined multiple faults coincidental to handle occurs) correctness% coincidental is high) correctness) 13/34
  • 14. Formula Susp(s) = Failed(s) * TotalPassed - Passed(s) – PassedToFailed(s) Coincidental PtoF (f) correctness: i.e. P(f) Passed PtoF (c) After mutating each executable statement Failed Total Tests PtoF (c) is empirically greater than PtoF(f) 14/34
  • 15. Model of our approach - Muffler  Simple and clear target of each input and step  List all possible research questions  We first focus on the key issue, and leave the others as future work. 15/34
  • 16. Model of our approach – Muffler 16/34
  • 17. Input variables  Program  Test suite  Mutant operators  (No more) 17/34
  • 18. Program  Program  Number of faults  Failure-triggering ability by covering this statement (Is it easy to cause coincidental correctness?)  Fault type  Statement type of fault  Fault position  Program structure  Program size  Etc. 18/34
  • 19. Test suite  Number of total test cases  Number of passed/failed test cases  Number of passed test cases cover each statement to be mutated  test cases that may alter testing results  Number of statements covered by each failed test case  Help us select suspicious statements.  Can we locate faults without test oracle? 19/34
  • 20. Mutant operators  Types of mutation operators  Applicable condition for each operator  The probability of failure-triggering by covering mutant point  The ability for mutant to kill test cases 20/34
  • 21. Steps  I list steps for separation of concerns  This can help us locate where our hypothesis is. 21/34
  • 22. Step I: execute test cases  Get testing results  Get coverage  Of failed test cases  For the selection of suspicious statements  Of passed test cases  For the selection of test cases to re-run mutants 22/34
  • 23. Step II: select statements to mutate  Input  Coverage of failed test cases  Output  Statements to be mutated  Covered by least-coverage failed test case  Discussion  Multi-fault scenarios  Our approach depend more on passed test cases  Practical situation (E.g., in gcc bug reports, most faults are reported with one failure)  Precision of failure clustering is … 23/34
  • 24. Step III: mutate selected statements  Input  Program  Statements to be mutated  Mutant operators  Output  Mutants by mutating each suspicious statement  Discussion  How many mutants to take from each suspicious statement?  What if there is no applicable mutant operator for this statement? (I.e., no mutant is generated.)  What if all mutants of a statement do not change the passed testing results to failed? (I.e., mutation impact is 0.0.) Two possible reasons:  Equivalent mutants  Coincidental correctness 24/34
  • 25. Step IV: select passed test cases  Select passed test cases that cover the mutant point  Select passed test cases that cover less statements  Reduce the number of passed test cases by discarding similar test cases 25/34
  • 26. Step V: run mutants against passed test cases that cover the mutated statement  Input  Mutants for each suspicious statement  Selected passed test cases on original program  Output  Number of failed test cases from running on each mutant 26/34
  • 27. Step VI: weight statements  By dynamic impact  By clustering mutant statements by analyzing program structure 27/34
  • 28. Step VII: compute mutation impact and rank the suspicious  Discussion  Why not use failed test cases?  How to design the formula of mutation impact?  What if the number of passed test cases that cover the mutant point is 0? 28/34
  • 29. Robust with potential issues in CBFL?  Coincidental Correctness  Multi-fault  Coverage equivalence 29/34
  • 30. Coincidental Correctness  When coincidental correctness frequently occurs, our approach can work.  When coincidental correctness rarely occurs, our approach is as good as CBFL.  This is why we use ‘– PassedToFailed(s)’, rather than ‘– PassedToFailed(s)/Passed(s)’ 30/34
  • 31. Multi-fault  CBFL techniques mainly rely on the coverage of passed test cases and failed test cases caused by the same fault. (More on the failed test cases)  When applying to multi-fault scenarios, the different coverage between failed test cases caused by different fault will affect the effectiveness.  Our approach more depend on passed tests. 31/34
  • 32. Equivalent coverage  Inside a basic block, different statements have different def-use pair impact on statements outside the basic block. 32/34
  • 33. Q&A 33/34
  • 34. Thank you! Contact me via elfinhe@gmail.com 34/34
  • 35. 35/34
  • 36. Guideline of our approach  Simple and clear target of each step  List all possible research questions  We first focus on the key issue, and leave the others as future work. 36/34
  • 37. 37/34