SlideShare a Scribd company logo
1 of 8
Prepared By Waqar Ali
Software Engineer
Abasyn University Peshawar
Debugging By Induction
codesmaker.blogspot.com
Debugging by Induction
Many errors can be found by using a disciplined thought pro
cess without ever going near the computer.
• One such thought process is induction which can figure out
the solution to a problem
• You start with your own experience and then generalize a rule
Introduction
What?
So what is meant by debugging by induction?
• Induction is a debugging strategy
• In other words it is called reasoning or thoughtful strategy
Induction debugging start with the symptoms of the error,
possibly in the result of one or more test cases, and looking for
relationships among the symptoms, the error is often
uncovered.
Example
Let’s take an General Example
For example, because the last few times I cut my hair, it grew
back. Inductive reasoning allows me to generalize that after I
cut my hair it will always grow back.
For example, The last ten times I touched the hot stove
I burned my hand. I bet every time I touch the hot stove my han
d will be burned.
How
How to perform induction strategy?
To perform induction strategy, a number of steps are followed, which are listed below.
1. Locating relevant data: All the information about a program is collected to
identify the functions, which are executed correctly and incorrectly.
2. Organizing data: The collected data is organized according to importance.
The data can consist of possible symptoms of errors, their location in the
program, the time at which the symptoms occur during the execution of the
program and the effect of these symptoms on the program.
Form
This is a form used for organizing the data
Cont…
3. Devising hypothesis: The relationships among the symptoms
are studied and a hypothesis is devised that provides the hints
about the possible causes of error.
4. Proving hypothesis: In the final step, the hypothesis needs to
be proved. It is done by comparing the data in the hypothesis
with the original data to ensure that the hypothesis explains the
existence of hints completely. In case, the hypothesis is unable
to explain the existence of hints, it is either incomplete or
contains multiple errors in it.
Cont…
5. Fix the problem:
• You can proceed with fixing the problem once you complete th
e previous steps.
• By taking the time to fully work through each step, you can
feel confident that your fix will correct the bug.
• Remember though, that you still need to perform some type of
regression testing to ensure your bug fix didn’t create
problems in other program areas.
• As the application grows larger, so does the likelihood
that your fix will cause problems elsewhere.

More Related Content

What's hot

Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factorsNancyBeaulah_R
 
Software Testing Techniques: An Overview
Software Testing Techniques: An Overview Software Testing Techniques: An Overview
Software Testing Techniques: An Overview QA InfoTech
 
Debuggers in system software
Debuggers in system softwareDebuggers in system software
Debuggers in system softwaregayathri ravi
 
software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)REHMAT ULLAH
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing StrategiesAlpana Bhaskar
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationNishu Rastogi
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metricsIndu Sharma Bhardwaj
 
Software Quality Management
Software Quality ManagementSoftware Quality Management
Software Quality ManagementKrishna Sujeer
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation TechniquesSanthi thi
 
verification and validation
verification and validationverification and validation
verification and validationDinesh Pasi
 
Software Inspection And Defect Management
Software Inspection And Defect ManagementSoftware Inspection And Defect Management
Software Inspection And Defect ManagementAjay K
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loaderbabyparul
 
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURLine Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURNA000000
 

What's hot (20)

Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
 
Software Testing Techniques: An Overview
Software Testing Techniques: An Overview Software Testing Techniques: An Overview
Software Testing Techniques: An Overview
 
Debuggers in system software
Debuggers in system softwareDebuggers in system software
Debuggers in system software
 
software project management Artifact set(spm)
software project management Artifact set(spm)software project management Artifact set(spm)
software project management Artifact set(spm)
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Static analysis
Static analysisStatic analysis
Static analysis
 
Software Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and Specification
 
Interactive debugging system
Interactive debugging systemInteractive debugging system
Interactive debugging system
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Cause effect graphing.ppt
Cause effect graphing.pptCause effect graphing.ppt
Cause effect graphing.ppt
 
Software Quality Management
Software Quality ManagementSoftware Quality Management
Software Quality Management
 
Testing Metrics
Testing MetricsTesting Metrics
Testing Metrics
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation Techniques
 
verification and validation
verification and validationverification and validation
verification and validation
 
Chapter 2 software process models
Chapter 2   software process modelsChapter 2   software process models
Chapter 2 software process models
 
Software Inspection And Defect Management
Software Inspection And Defect ManagementSoftware Inspection And Defect Management
Software Inspection And Defect Management
 
Direct linking loader
Direct linking loaderDirect linking loader
Direct linking loader
 
Taxonomy for bugs
Taxonomy for bugsTaxonomy for bugs
Taxonomy for bugs
 
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURLine Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
 

Similar to Debugging Induction Technique

Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptxShivamBajaj36
 
Blackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test SeriesBlackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test Seriesnazeer pasha
 
Fundamentals of testing - Testing & Implementations
Fundamentals of testing - Testing & ImplementationsFundamentals of testing - Testing & Implementations
Fundamentals of testing - Testing & Implementationsyogi syafrialdi
 
Software testing-in-gurgaon
Software testing-in-gurgaonSoftware testing-in-gurgaon
Software testing-in-gurgaonAP EDUSOFT
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 
Approaches to unraveling a complex test problem
Approaches to unraveling a complex test problemApproaches to unraveling a complex test problem
Approaches to unraveling a complex test problemJohan Hoberg
 
Effective Testing fo Startups
Effective Testing fo StartupsEffective Testing fo Startups
Effective Testing fo StartupsTestnetic
 
Testing techniques
Testing techniquesTesting techniques
Testing techniquescnpltesters
 
Foundations of software testing - ISTQB Certification.pdf
Foundations of software testing - ISTQB Certification.pdfFoundations of software testing - ISTQB Certification.pdf
Foundations of software testing - ISTQB Certification.pdfSaraj Hameed Sidiqi
 
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptx
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptxSOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptx
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptxFinancial Services Innovators
 

Similar to Debugging Induction Technique (20)

bug-advocacy
bug-advocacybug-advocacy
bug-advocacy
 
Bab 1
Bab 1Bab 1
Bab 1
 
Debugging- bajju.pptx
Debugging- bajju.pptxDebugging- bajju.pptx
Debugging- bajju.pptx
 
What is testing
What is testingWhat is testing
What is testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Debugging
DebuggingDebugging
Debugging
 
Debugging (Part 2)
Debugging (Part 2)Debugging (Part 2)
Debugging (Part 2)
 
Blackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test SeriesBlackboxtesting 02 An Example Test Series
Blackboxtesting 02 An Example Test Series
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Fundamentals of testing - Testing & Implementations
Fundamentals of testing - Testing & ImplementationsFundamentals of testing - Testing & Implementations
Fundamentals of testing - Testing & Implementations
 
int.ppt
int.pptint.ppt
int.ppt
 
Software testing-in-gurgaon
Software testing-in-gurgaonSoftware testing-in-gurgaon
Software testing-in-gurgaon
 
Presentation13
Presentation13Presentation13
Presentation13
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Approaches to unraveling a complex test problem
Approaches to unraveling a complex test problemApproaches to unraveling a complex test problem
Approaches to unraveling a complex test problem
 
Effective Testing fo Startups
Effective Testing fo StartupsEffective Testing fo Startups
Effective Testing fo Startups
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
2.fundamental of testing
2.fundamental of testing2.fundamental of testing
2.fundamental of testing
 
Foundations of software testing - ISTQB Certification.pdf
Foundations of software testing - ISTQB Certification.pdfFoundations of software testing - ISTQB Certification.pdf
Foundations of software testing - ISTQB Certification.pdf
 
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptx
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptxSOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptx
SOFTWARE TESTING TRAFUNDAMENTALS OF SOFTWARE TESTING.pptx
 

More from Waqar Ali

Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - IntroductionWaqar Ali
 
Project Time Management
Project Time Management Project Time Management
Project Time Management Waqar Ali
 
Normalization
NormalizationNormalization
NormalizationWaqar Ali
 
Normalization
NormalizationNormalization
NormalizationWaqar Ali
 
The Ethical and Social Enviroment
The Ethical and Social EnviromentThe Ethical and Social Enviroment
The Ethical and Social EnviromentWaqar Ali
 
File Handling
File HandlingFile Handling
File HandlingWaqar Ali
 

More from Waqar Ali (7)

Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
Project Time Management
Project Time Management Project Time Management
Project Time Management
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Join query
Join queryJoin query
Join query
 
The Ethical and Social Enviroment
The Ethical and Social EnviromentThe Ethical and Social Enviroment
The Ethical and Social Enviroment
 
File Handling
File HandlingFile Handling
File Handling
 

Recently uploaded

Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
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
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
(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
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
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
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Recently uploaded (20)

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...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
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...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
(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...
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Debugging Induction Technique

  • 1. Prepared By Waqar Ali Software Engineer Abasyn University Peshawar Debugging By Induction codesmaker.blogspot.com
  • 2. Debugging by Induction Many errors can be found by using a disciplined thought pro cess without ever going near the computer. • One such thought process is induction which can figure out the solution to a problem • You start with your own experience and then generalize a rule Introduction
  • 3. What? So what is meant by debugging by induction? • Induction is a debugging strategy • In other words it is called reasoning or thoughtful strategy Induction debugging start with the symptoms of the error, possibly in the result of one or more test cases, and looking for relationships among the symptoms, the error is often uncovered.
  • 4. Example Let’s take an General Example For example, because the last few times I cut my hair, it grew back. Inductive reasoning allows me to generalize that after I cut my hair it will always grow back. For example, The last ten times I touched the hot stove I burned my hand. I bet every time I touch the hot stove my han d will be burned.
  • 5. How How to perform induction strategy? To perform induction strategy, a number of steps are followed, which are listed below. 1. Locating relevant data: All the information about a program is collected to identify the functions, which are executed correctly and incorrectly. 2. Organizing data: The collected data is organized according to importance. The data can consist of possible symptoms of errors, their location in the program, the time at which the symptoms occur during the execution of the program and the effect of these symptoms on the program.
  • 6. Form This is a form used for organizing the data
  • 7. Cont… 3. Devising hypothesis: The relationships among the symptoms are studied and a hypothesis is devised that provides the hints about the possible causes of error. 4. Proving hypothesis: In the final step, the hypothesis needs to be proved. It is done by comparing the data in the hypothesis with the original data to ensure that the hypothesis explains the existence of hints completely. In case, the hypothesis is unable to explain the existence of hints, it is either incomplete or contains multiple errors in it.
  • 8. Cont… 5. Fix the problem: • You can proceed with fixing the problem once you complete th e previous steps. • By taking the time to fully work through each step, you can feel confident that your fix will correct the bug. • Remember though, that you still need to perform some type of regression testing to ensure your bug fix didn’t create problems in other program areas. • As the application grows larger, so does the likelihood that your fix will cause problems elsewhere.