SlideShare a Scribd company logo
1 of 39
Download to read offline
Software Analysis and
Testing
SEC5261
Week 13
Murtaza Munawar Fazal
Delta Debugging
Simplification
Once we have reproduced a program failure, we must find out what’s
relevant:
• Does failure really depend on 10,000 lines of code?
• Does failure really require this exact schedule of events?
• Does failure really need this sequence of function calls?
Why Simplify?
• Ease of communication: a simplified test case is easier to
communicate
• Easier debugging: smaller test cases result in smaller states and
shorter executions
• Identify duplicates: simplified test cases subsume several duplicates
Real-World Scenario
In July 1999, Bugzilla listed more than 370 open bug reports for
Mozilla’s web browser
• These were not even simplified
• Mozilla engineers were overwhelmed with the work
• They created the Mozilla BugAThon: a call for volunteers to simplify
bug reports
When you’ve cut away as much HTML, CSS, and
JavaScript as you can, and cutting away any more
causes the bug to disappear, you’re done.
— Mozilla BugAThon call
How do we go from this …
<td align=left valign=top>
<SELECT NAME="op sys" MULTIPLE SIZE=7>
<OPTION VALUE="All">All<OPTION VALUE="Windows 3.1">Windows 3.1<OPTION VALUE="Windows 95">Windows 95<OPTION VALUE="Windows 98">Windows 98<OPTION
VALUE="Windows ME">Windows ME<OPTION VALUE="Windows 2000">Windows 2000<OPTION VALUE="Windows NT">Windows NT<OPTION VALUE="Mac System 7">Mac
System 7<OPTION VALUE="Mac System 7.5">Mac System 7.5<OPTION VALUE="Mac System 7.6.1">Mac System 7.6.1<OPTION VALUE="Mac System 8.0">Mac System
8.0<OPTION VALUE="Mac System 8.5">Mac System 8.5<OPTION VALUE="Mac System 8.6">Mac System 8.6<OPTION VALUE="Mac System 9.x">Mac System
9.x<OPTION VALUE="MacOS X">MacOS X<OPTION VALUE="Linux">Linux<OPTION VALUE="BSDI">BSDI<OPTION VALUE="FreeBSD">FreeBSD<OPTION
VALUE="NetBSD">NetBSD<OPTION VALUE="OpenBSD">OpenBSD<OPTION VALUE="AIX">AIX<OPTION VALUE="BeOS">BeOS<OPTION VALUE="HP-UX">HP-UX<OPTION
VALUE="IRIX">IRIX<OPTION VALUE="Neutrino">Neutrino<OPTION VALUE="OpenVMS">OpenVMS<OPTION VALUE="OS/2">OS/2<OPTION VALUE="OSF/1">OSF/1<OPTION
VALUE="Solaris">Solaris<OPTION VALUE="SunOS">SunOS<OPTION VALUE="other">other</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<OPTION VALUE="--">--<OPTION VALUE="P1">P1<OPTION VALUE="P2">P2<OPTION VALUE="P3">P3<OPTION VALUE="P4">P4<OPTION VALUE="P5">P5</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME="bug severity" MULTIPLE SIZE=7>
<OPTION VALUE="blocker">blocker<OPTION VALUE="critical">critical<OPTION VALUE="major">major<OPTION VALUE="normal">normal<OPTION
VALUE="minor">minor<OPTION VALUE="trivial">trivial<OPTION VALUE="enhancement">enhancement</SELECT>
</tr>
</table>
File Print Segmentation Fault
… to this?
<SELECT>
File Print Segmentation Fault
Your Solution
• How do you solve these problems?
• Binary Search
–Cut the test-case in half
–Iterate
• Brilliant idea: why not automate this?
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Original input
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Binary Search
• Proceed by binary search. Throw away half the input and see if the
output is still wrong.
• If not, go back to the previous state and discard the other half of the
input.
Simplified input
Complex Input
<td align=left valign=top>
<SELECT NAME="op sys" MULTIPLE SIZE=7>
<OPTION VALUE="All">All<OPTION VALUE="Windows 3.1">Windows 3.1<OPTION VALUE="Windows 95">Windows 95<OPTION VALUE="Windows 98">Windows 98<OPTION
VALUE="Windows ME">Windows ME<OPTION VALUE="Windows 2000">Windows 2000<OPTION VALUE="Windows NT">Windows NT<OPTION VALUE="Mac System 7">Mac System
7<OPTION VALUE="Mac System 7.5">Mac System 7.5<OPTION VALUE="Mac System 7.6.1">Mac System 7.6.1<OPTION VALUE="Mac System 8.0">Mac System 8.0<OPTION
VALUE="Mac System 8.5">Mac System 8.5<OPTION VALUE="Mac System 8.6">Mac System 8.6<OPTION VALUE="Mac System 9.x">Mac System 9.x<OPTION VALUE="MacOS
X">MacOS X<OPTION VALUE="Linux">Linux<OPTION VALUE="BSDI">BSDI<OPTION VALUE="FreeBSD">FreeBSD<OPTION VALUE="NetBSD">NetBSD<OPTION
VALUE="OpenBSD">OpenBSD<OPTION VALUE="AIX">AIX<OPTION VALUE="BeOS">BeOS<OPTION VALUE="HP-UX">HP-UX<OPTION VALUE="IRIX">IRIX<OPTION
VALUE="Neutrino">Neutrino<OPTION VALUE="OpenVMS">OpenVMS<OPTION VALUE="OS/2">OS/2<OPTION VALUE="OSF/1">OSF/1<OPTION VALUE="Solaris">Solaris<OPTION
VALUE="SunOS">SunOS<OPTION VALUE="other">other</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<OPTION VALUE="--">--<OPTION VALUE="P1">P1<OPTION VALUE="P2">P2<OPTION VALUE="P3">P3<OPTION VALUE="P4">P4<OPTION VALUE="P5">P5</SELECT>
</td>
<td align=left valign=top>
<SELECT NAME="bug severity" MULTIPLE SIZE=7>
<OPTION VALUE="blocker">blocker<OPTION VALUE="critical">critical<OPTION VALUE="major">major<OPTION VALUE="normal">normal<OPTION
VALUE="minor">minor<OPTION VALUE="trivial">trivial<OPTION VALUE="enhancement">enhancement</SELECT>
</tr>
</table>
File Print Segmentation Fault
Simplified Input
<SELECT NAME="priority" MULTIPLE SIZE=7>
Simplified from 896 lines to one single line
in only 57 tests!
Binary Search
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Binary Search
<SELECT NAME="priority" MULTIPLE SIZE=7>
Binary Search
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Binary Search
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
What do we do if both halves pass?
Two Conflicting Solutions
• Few and large changes:
• More and smaller changes:
Δ1
Δ2
Δ2
Δ1
Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8
Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8
… (many more)
Impact of Input Granularity
Input granularity: Finer Coarser
Chance of finding a
failing input subset
Progress of the
search
A. Slower B. Higher C. Faster D. Lower
Impact of Input Granularity
Input granularity: Finer Coarser
Chance of finding a
failing input subset
B. Higher D. Lower
Progress of the
search
A. Slower C. Faster
A. Slower B. Higher C. Faster D. Lower
General Delta-Debugging Algorithm
• Few and large changes: start first with these two
• More and smaller changes: apply if both above pass
Δ1
Δ2
Δ2
Δ1
Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8
Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8
… (many more)
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Continuing Delta Debugging
Inputs and Failures
• Let R be the set of possible inputs
• rP ∈ R corresponds to an input that passes
• rF ∈ R corresponds to an input that fails
Example: Delta Debugging
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
<SELECT NAME="priority" MULTIPLE SIZE=7>
Changes
• Let R denote the set of all possible inputs
• We can go from one input r1 to another input r2 by a series of
changes
• A change 𝛅 is a mapping R ⟶ R which takes one input and changes
it to another input
Changes
Example: 𝛅’ = insert ME="priori at input position 10
r1 = <SELECT NAty" MULTIPLE SIZE=7>
𝛅’(r1) = <SELECT NAME="priority" MULTIPLE SIZE=7>
Decomposing Changes
• A change 𝛅 can be decomposed to a number of elementary changes
𝛅1, 𝛅2, …, 𝛅n where 𝛅 = 𝛅1 o 𝛅2 o … o 𝛅n and (𝛅i o 𝛅j)(r) =
𝛅j(𝛅i(r))
• For example, deleting a part of the input file can be decomposed to
deleting characters one by one from the file
• In other words: by composing the deletion of single characters, we
can get a change that deletes part of the input file
Decomposing Changes
Example: 𝛅’ = insert ME="priori at input position 10
can be decomposed as 𝛅’ = 𝛅1 o 𝛅2 o … o 𝛅10
where 𝛅1 = insert M at position 10
𝛅2 = insert E at position 11
. . .

More Related Content

Similar to SEC5 delta debugging

Presentation top tips for getting optimal sql execution
Presentation    top tips for getting optimal sql executionPresentation    top tips for getting optimal sql execution
Presentation top tips for getting optimal sql executionxKinAnx
 
Ml6 decision trees
Ml6 decision treesMl6 decision trees
Ml6 decision treesankit_ppt
 
Using Apache Solr
Using Apache SolrUsing Apache Solr
Using Apache Solrpittaya
 
The Features of Highly Effective Forms [An Event Apart Nashville 2016]
The Features of Highly Effective Forms [An Event Apart Nashville 2016]The Features of Highly Effective Forms [An Event Apart Nashville 2016]
The Features of Highly Effective Forms [An Event Apart Nashville 2016]Aaron Gustafson
 
Testing in Laravel
Testing in LaravelTesting in Laravel
Testing in LaravelAhmed Yahia
 
JavaOne 2016 -Emerging Web App Architectures using Java and node.js
JavaOne 2016 -Emerging Web App Architectures using Java and node.jsJavaOne 2016 -Emerging Web App Architectures using Java and node.js
JavaOne 2016 -Emerging Web App Architectures using Java and node.jsSteve Wallin
 
Token Testing Slides
Token  Testing SlidesToken  Testing Slides
Token Testing Slidesericholscher
 
Let's write secure drupal code!
Let's write secure drupal code!Let's write secure drupal code!
Let's write secure drupal code!Balázs Tatár
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxshandicollingwood
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
PowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangePowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangeMichel de Rooij
 
A3 sec -_regular_expressions
A3 sec -_regular_expressionsA3 sec -_regular_expressions
A3 sec -_regular_expressionsa3sec
 
Data Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnData Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnAsim Jalis
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbookguestae36d0
 
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...Daniel Katz
 

Similar to SEC5 delta debugging (20)

Presentation top tips for getting optimal sql execution
Presentation    top tips for getting optimal sql executionPresentation    top tips for getting optimal sql execution
Presentation top tips for getting optimal sql execution
 
Ml6 decision trees
Ml6 decision treesMl6 decision trees
Ml6 decision trees
 
Using Apache Solr
Using Apache SolrUsing Apache Solr
Using Apache Solr
 
The Features of Highly Effective Forms [An Event Apart Nashville 2016]
The Features of Highly Effective Forms [An Event Apart Nashville 2016]The Features of Highly Effective Forms [An Event Apart Nashville 2016]
The Features of Highly Effective Forms [An Event Apart Nashville 2016]
 
Property Based Tesing
Property Based TesingProperty Based Tesing
Property Based Tesing
 
Testing in Laravel
Testing in LaravelTesting in Laravel
Testing in Laravel
 
JavaOne 2016 -Emerging Web App Architectures using Java and node.js
JavaOne 2016 -Emerging Web App Architectures using Java and node.jsJavaOne 2016 -Emerging Web App Architectures using Java and node.js
JavaOne 2016 -Emerging Web App Architectures using Java and node.js
 
Pro PostgreSQL
Pro PostgreSQLPro PostgreSQL
Pro PostgreSQL
 
Quality tools
Quality toolsQuality tools
Quality tools
 
Token Testing Slides
Token  Testing SlidesToken  Testing Slides
Token Testing Slides
 
Let's write secure drupal code!
Let's write secure drupal code!Let's write secure drupal code!
Let's write secure drupal code!
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
 
Fekra c++ Course #2
Fekra c++ Course #2Fekra c++ Course #2
Fekra c++ Course #2
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
PowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangePowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for Exchange
 
A3 sec -_regular_expressions
A3 sec -_regular_expressionsA3 sec -_regular_expressions
A3 sec -_regular_expressions
 
Data Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnData Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learn
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbook
 
Dutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: DistilledDutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: Distilled
 
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...
Quantitative Methods for Lawyers - Class #14 - R Boot Camp - Part 1 - Profess...
 

More from NishaVatwani

Quality Laggards.pdf
Quality Laggards.pdfQuality Laggards.pdf
Quality Laggards.pdfNishaVatwani
 
Software Defects.pdf
Software Defects.pdfSoftware Defects.pdf
Software Defects.pdfNishaVatwani
 
SEC5261_SAT_Week07_Spring22.pdf
SEC5261_SAT_Week07_Spring22.pdfSEC5261_SAT_Week07_Spring22.pdf
SEC5261_SAT_Week07_Spring22.pdfNishaVatwani
 
SEC5261_SAT_Week08_Spring22.pdf
SEC5261_SAT_Week08_Spring22.pdfSEC5261_SAT_Week08_Spring22.pdf
SEC5261_SAT_Week08_Spring22.pdfNishaVatwani
 
Software analysis and testing
Software analysis and testing Software analysis and testing
Software analysis and testing NishaVatwani
 
m08mish152006ppwc07-100622022709-phpapp01 (1).pptx
m08mish152006ppwc07-100622022709-phpapp01 (1).pptxm08mish152006ppwc07-100622022709-phpapp01 (1).pptx
m08mish152006ppwc07-100622022709-phpapp01 (1).pptxNishaVatwani
 

More from NishaVatwani (6)

Quality Laggards.pdf
Quality Laggards.pdfQuality Laggards.pdf
Quality Laggards.pdf
 
Software Defects.pdf
Software Defects.pdfSoftware Defects.pdf
Software Defects.pdf
 
SEC5261_SAT_Week07_Spring22.pdf
SEC5261_SAT_Week07_Spring22.pdfSEC5261_SAT_Week07_Spring22.pdf
SEC5261_SAT_Week07_Spring22.pdf
 
SEC5261_SAT_Week08_Spring22.pdf
SEC5261_SAT_Week08_Spring22.pdfSEC5261_SAT_Week08_Spring22.pdf
SEC5261_SAT_Week08_Spring22.pdf
 
Software analysis and testing
Software analysis and testing Software analysis and testing
Software analysis and testing
 
m08mish152006ppwc07-100622022709-phpapp01 (1).pptx
m08mish152006ppwc07-100622022709-phpapp01 (1).pptxm08mish152006ppwc07-100622022709-phpapp01 (1).pptx
m08mish152006ppwc07-100622022709-phpapp01 (1).pptx
 

Recently uploaded

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

SEC5 delta debugging

  • 3. Simplification Once we have reproduced a program failure, we must find out what’s relevant: • Does failure really depend on 10,000 lines of code? • Does failure really require this exact schedule of events? • Does failure really need this sequence of function calls?
  • 4. Why Simplify? • Ease of communication: a simplified test case is easier to communicate • Easier debugging: smaller test cases result in smaller states and shorter executions • Identify duplicates: simplified test cases subsume several duplicates
  • 5. Real-World Scenario In July 1999, Bugzilla listed more than 370 open bug reports for Mozilla’s web browser • These were not even simplified • Mozilla engineers were overwhelmed with the work • They created the Mozilla BugAThon: a call for volunteers to simplify bug reports When you’ve cut away as much HTML, CSS, and JavaScript as you can, and cutting away any more causes the bug to disappear, you’re done. — Mozilla BugAThon call
  • 6. How do we go from this … <td align=left valign=top> <SELECT NAME="op sys" MULTIPLE SIZE=7> <OPTION VALUE="All">All<OPTION VALUE="Windows 3.1">Windows 3.1<OPTION VALUE="Windows 95">Windows 95<OPTION VALUE="Windows 98">Windows 98<OPTION VALUE="Windows ME">Windows ME<OPTION VALUE="Windows 2000">Windows 2000<OPTION VALUE="Windows NT">Windows NT<OPTION VALUE="Mac System 7">Mac System 7<OPTION VALUE="Mac System 7.5">Mac System 7.5<OPTION VALUE="Mac System 7.6.1">Mac System 7.6.1<OPTION VALUE="Mac System 8.0">Mac System 8.0<OPTION VALUE="Mac System 8.5">Mac System 8.5<OPTION VALUE="Mac System 8.6">Mac System 8.6<OPTION VALUE="Mac System 9.x">Mac System 9.x<OPTION VALUE="MacOS X">MacOS X<OPTION VALUE="Linux">Linux<OPTION VALUE="BSDI">BSDI<OPTION VALUE="FreeBSD">FreeBSD<OPTION VALUE="NetBSD">NetBSD<OPTION VALUE="OpenBSD">OpenBSD<OPTION VALUE="AIX">AIX<OPTION VALUE="BeOS">BeOS<OPTION VALUE="HP-UX">HP-UX<OPTION VALUE="IRIX">IRIX<OPTION VALUE="Neutrino">Neutrino<OPTION VALUE="OpenVMS">OpenVMS<OPTION VALUE="OS/2">OS/2<OPTION VALUE="OSF/1">OSF/1<OPTION VALUE="Solaris">Solaris<OPTION VALUE="SunOS">SunOS<OPTION VALUE="other">other</SELECT> </td> <td align=left valign=top> <SELECT NAME="priority" MULTIPLE SIZE=7> <OPTION VALUE="--">--<OPTION VALUE="P1">P1<OPTION VALUE="P2">P2<OPTION VALUE="P3">P3<OPTION VALUE="P4">P4<OPTION VALUE="P5">P5</SELECT> </td> <td align=left valign=top> <SELECT NAME="bug severity" MULTIPLE SIZE=7> <OPTION VALUE="blocker">blocker<OPTION VALUE="critical">critical<OPTION VALUE="major">major<OPTION VALUE="normal">normal<OPTION VALUE="minor">minor<OPTION VALUE="trivial">trivial<OPTION VALUE="enhancement">enhancement</SELECT> </tr> </table> File Print Segmentation Fault
  • 7. … to this? <SELECT> File Print Segmentation Fault
  • 8. Your Solution • How do you solve these problems? • Binary Search –Cut the test-case in half –Iterate • Brilliant idea: why not automate this?
  • 9. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input. Original input
  • 10. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 11. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 12. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 13. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 14. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 15. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 16. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input.
  • 17. Binary Search • Proceed by binary search. Throw away half the input and see if the output is still wrong. • If not, go back to the previous state and discard the other half of the input. Simplified input
  • 18. Complex Input <td align=left valign=top> <SELECT NAME="op sys" MULTIPLE SIZE=7> <OPTION VALUE="All">All<OPTION VALUE="Windows 3.1">Windows 3.1<OPTION VALUE="Windows 95">Windows 95<OPTION VALUE="Windows 98">Windows 98<OPTION VALUE="Windows ME">Windows ME<OPTION VALUE="Windows 2000">Windows 2000<OPTION VALUE="Windows NT">Windows NT<OPTION VALUE="Mac System 7">Mac System 7<OPTION VALUE="Mac System 7.5">Mac System 7.5<OPTION VALUE="Mac System 7.6.1">Mac System 7.6.1<OPTION VALUE="Mac System 8.0">Mac System 8.0<OPTION VALUE="Mac System 8.5">Mac System 8.5<OPTION VALUE="Mac System 8.6">Mac System 8.6<OPTION VALUE="Mac System 9.x">Mac System 9.x<OPTION VALUE="MacOS X">MacOS X<OPTION VALUE="Linux">Linux<OPTION VALUE="BSDI">BSDI<OPTION VALUE="FreeBSD">FreeBSD<OPTION VALUE="NetBSD">NetBSD<OPTION VALUE="OpenBSD">OpenBSD<OPTION VALUE="AIX">AIX<OPTION VALUE="BeOS">BeOS<OPTION VALUE="HP-UX">HP-UX<OPTION VALUE="IRIX">IRIX<OPTION VALUE="Neutrino">Neutrino<OPTION VALUE="OpenVMS">OpenVMS<OPTION VALUE="OS/2">OS/2<OPTION VALUE="OSF/1">OSF/1<OPTION VALUE="Solaris">Solaris<OPTION VALUE="SunOS">SunOS<OPTION VALUE="other">other</SELECT> </td> <td align=left valign=top> <SELECT NAME="priority" MULTIPLE SIZE=7> <OPTION VALUE="--">--<OPTION VALUE="P1">P1<OPTION VALUE="P2">P2<OPTION VALUE="P3">P3<OPTION VALUE="P4">P4<OPTION VALUE="P5">P5</SELECT> </td> <td align=left valign=top> <SELECT NAME="bug severity" MULTIPLE SIZE=7> <OPTION VALUE="blocker">blocker<OPTION VALUE="critical">critical<OPTION VALUE="major">major<OPTION VALUE="normal">normal<OPTION VALUE="minor">minor<OPTION VALUE="trivial">trivial<OPTION VALUE="enhancement">enhancement</SELECT> </tr> </table> File Print Segmentation Fault
  • 19. Simplified Input <SELECT NAME="priority" MULTIPLE SIZE=7> Simplified from 896 lines to one single line in only 57 tests!
  • 20. Binary Search <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 22. Binary Search <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 23. Binary Search <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> What do we do if both halves pass?
  • 24. Two Conflicting Solutions • Few and large changes: • More and smaller changes: Δ1 Δ2 Δ2 Δ1 Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8 Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8 … (many more)
  • 25. Impact of Input Granularity Input granularity: Finer Coarser Chance of finding a failing input subset Progress of the search A. Slower B. Higher C. Faster D. Lower
  • 26. Impact of Input Granularity Input granularity: Finer Coarser Chance of finding a failing input subset B. Higher D. Lower Progress of the search A. Slower C. Faster A. Slower B. Higher C. Faster D. Lower
  • 27. General Delta-Debugging Algorithm • Few and large changes: start first with these two • More and smaller changes: apply if both above pass Δ1 Δ2 Δ2 Δ1 Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8 Δ1 Δ2 Δ3 Δ4 Δ5 Δ6 Δ7 Δ8 … (many more)
  • 28. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 29. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 30. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 31. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 32. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 34. Inputs and Failures • Let R be the set of possible inputs • rP ∈ R corresponds to an input that passes • rF ∈ R corresponds to an input that fails
  • 35. Example: Delta Debugging <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7> <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 36. Changes • Let R denote the set of all possible inputs • We can go from one input r1 to another input r2 by a series of changes • A change 𝛅 is a mapping R ⟶ R which takes one input and changes it to another input
  • 37. Changes Example: 𝛅’ = insert ME="priori at input position 10 r1 = <SELECT NAty" MULTIPLE SIZE=7> 𝛅’(r1) = <SELECT NAME="priority" MULTIPLE SIZE=7>
  • 38. Decomposing Changes • A change 𝛅 can be decomposed to a number of elementary changes 𝛅1, 𝛅2, …, 𝛅n where 𝛅 = 𝛅1 o 𝛅2 o … o 𝛅n and (𝛅i o 𝛅j)(r) = 𝛅j(𝛅i(r)) • For example, deleting a part of the input file can be decomposed to deleting characters one by one from the file • In other words: by composing the deletion of single characters, we can get a change that deletes part of the input file
  • 39. Decomposing Changes Example: 𝛅’ = insert ME="priori at input position 10 can be decomposed as 𝛅’ = 𝛅1 o 𝛅2 o … o 𝛅10 where 𝛅1 = insert M at position 10 𝛅2 = insert E at position 11 . . .