SlideShare a Scribd company logo
1 of 4
Download to read offline
146
 If programming language semantics are formally defined, it is possible to
consider a program as a mathematical object.
 Using mathematical techniques, it is possible to demonstrate the
correspondence between a program and a formal specification of that
program.
 Program is proved to be correct with respect to its specification.
 Formal verification may reduce testing costs; it cannot replace testing as
a means of system validation.
 Techniques for proving program correctness and axiomatic approaches
The basis of the axiomatic approach
 Assume that there are a number of points in a program where the
software engineer can provide assertions concerning program variables
and their relationships. At each of these points, the assertions should be
invariably true. Say the points in the program are P(1), P(2),...P(n). The
associated assertions are a(l), a(2),...,a(n). Assertion a(1) must be an
assertion about the input of the program and a(n) an assertion about the
program output.
 To prove that the program statements between points P(i) and P(i+l) are
correct, it must be demonstrated that the application of the program
statements separating these points causes assertion a(i) to be
transformed to assertion a(i+l).
 Given that the initial assertion is true before program execution and the
final assertion is true after execution, verification is carried out for
adjacent program statements.
8.10. DEBUGGING
Debugging, a narrow view of software testing, is performed heavily to find
out design defects by the programmer. The limitation of human nature makes it
almost impossible to make a moderately complex program correct the first time.
Finding the problems and get them fixed, is the purpose of debugging in
programming phase.
Debugging is a methodical process of finding and reducing the number
of bugs, or defects, in a computer program or a piece of electronic hardware
thus making it behave as expected. Debugging tends to be harder when various
subsystems are tightly coupled, as changes in one may cause bugs to emerge in
another.
147
Although each debugging experience is unique, certain general principles can
be applied in debugging. This section particularly addresses debugging software,
although many of these principles can also be applied to debugging hardware.
The basic steps in debugging are:
• Recognize that a bug exists
• Isolate the source of the bug
• Identify the cause of the bug
• Determine a fix for the bug
• Apply the fix and test it
8.10.1. The Debugging Process
The debugging process begins with the execution of the test case. Results
are assessed and a lack of correspondence between expected and actual result
is encountered. In many cases, the non-corresponding data is found to be a
symptom of an underlying cause as yet hidden. The debugging process
attempts to match symptom with cause, thereby leading to error correction.
Characteristics of bugs ([Cheung 1990])
1. The symptom and the cause may be geographically remote. That is, the
symptom may appear in one part of a program, while the cause may
actually be located at a site that is far removed. Highly coupled program
structures exacerbate this situation.
2. The symptom may disappear (temporarily) when another error is
corrected.
Debugging
Suspected
causes
Identified
causes
Corrections
Execution of cases
Regression
Tests
Results
Test
caes
Additional
test
Fig. 8.5 Debugging Process
148
3. The symptom may actually be caused by non-errors (e.g., round-off
inaccuracies).
4. The symptom may be caused by human error that is not easily traced.
5. The symptom may be a result of timing problems, rather than processing
problems.
6. It may be difficult to accurately reproduce input conditions (e.g., a real-
time application in which input ordering is indeterminate).
7. The symptom may be intermittent. This is particularly common in
embedded systems that couple hardware and software.
8. The symptom may be due to causes that are distributed across a number
of tasks running on different processors.
The debugging process will always have one of two outcomes:
(1) The cause will be found, corrected, or removed, or
(2) The cause will not be found.
In general, three categories for debugging approaches are proposed:
 Brute Force Approach
 Backtracking Approach
 Cause Elimination Approach
Each of the debugging approaches can be supplemented with debugging tools
such as debugging compliers, dynamic debugging aids, automatic test case
generators, memory dumps, and cross-reference maps.
a. Brute Force Approach
The brute force category of debugging is the most common method for
isolating the cause of an error. This method is generally the least efficient and is
used when everything else fails. A philosophy such as “let the computer find the
error” is used in this approach. Memory dumps are taken, run-time traces are
invoked, and the program is loaded with “write” statements, with the hope that
from the mass of information produced, we will find a clue that can lead us to
the cause of an error.
b. Back Tracking Approach
Debugging by backtracking involves working backward in the source
code from the point where the error was observed in an attempt to identify the
exact point where the error occurred. It may be necessary to run additional test
cases in order to collect more information. This approach can be used
successfully in small programs. The disadvantage with this approach is that if
the program is too large, then the potential backward paths may become
unmanageably large.
149
c. Cause Elimination Approach
Cause elimination approach is manifested by induction or deduction. This
approach proceeds as follows:
1. List possible causes for the observed failure by organizing the data
related to the error occurrence.
2. Devise a “cause hypothesis”.
3. Prove or disprove the hypothesis using the data.
4. Implement the appropriate corrections.
5. Verify the correction. Rerun the failure case to be sure that the fix
corrects the observed symptom.
Check your Progress
i. ____________is the process used to help identify the correctness,
completeness, security and quality of developed computer software.
ii. In other words, testing is nothing but __________ or _________ that is
comparing the actual value with expected one.
iii. _____________ is done to validate the code written and is usually done by the
author of the code.
iv. ________ and __________ are sub-categories of System testing.
v. White box testing is also called as _________ and __________
Solutions
I
Ii
Iii
Iv
V
8.11. REVIEW QUESTIONS
1. What are the Testing objectives, rules in S/W testing fundamentals?
2. Explain the testing information flow.
3. What are the stages available in testing process?
4. Describe art of debugging in software testing strategies.
5. Write short notes on: a. Data flow testing b. Integration testing.

More Related Content

Similar to Debugging.pdf

Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategyijseajournal
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...mwpeexdvjgtqujwhog
 
EFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEWEFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEWJournal For Research
 
Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...butest
 
Review Paper on Recovery of Data during Software Fault
Review Paper on Recovery of Data during Software FaultReview Paper on Recovery of Data during Software Fault
Review Paper on Recovery of Data during Software FaultAM Publications
 
Using Mutation in Fault Localization
Using Mutation in Fault Localization Using Mutation in Fault Localization
Using Mutation in Fault Localization csandit
 
USING MUTATION IN FAULT LOCALIZATION
USING MUTATION IN FAULT LOCALIZATIONUSING MUTATION IN FAULT LOCALIZATION
USING MUTATION IN FAULT LOCALIZATIONcscpconf
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringAnasHassan52
 
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...A Review on Software Fault Detection and Prevention Mechanism in Software Dev...
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...iosrjce
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)diana fitri, S.Kom
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 

Similar to Debugging.pdf (20)

Software testing strategy
Software testing strategySoftware testing strategy
Software testing strategy
 
Testing &ampdebugging
Testing &ampdebuggingTesting &ampdebugging
Testing &ampdebugging
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
 
EFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEWEFFECTIVE TEST CASE DESING: A REVIEW
EFFECTIVE TEST CASE DESING: A REVIEW
 
Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...Finding latent code errors via machine learning over program ...
Finding latent code errors via machine learning over program ...
 
Review Paper on Recovery of Data during Software Fault
Review Paper on Recovery of Data during Software FaultReview Paper on Recovery of Data during Software Fault
Review Paper on Recovery of Data during Software Fault
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Using Mutation in Fault Localization
Using Mutation in Fault Localization Using Mutation in Fault Localization
Using Mutation in Fault Localization
 
USING MUTATION IN FAULT LOCALIZATION
USING MUTATION IN FAULT LOCALIZATIONUSING MUTATION IN FAULT LOCALIZATION
USING MUTATION IN FAULT LOCALIZATION
 
Blackbox
BlackboxBlackbox
Blackbox
 
Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
 
Debugging (Part 2)
Debugging (Part 2)Debugging (Part 2)
Debugging (Part 2)
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineering
 
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...A Review on Software Fault Detection and Prevention Mechanism in Software Dev...
A Review on Software Fault Detection and Prevention Mechanism in Software Dev...
 
F017652530
F017652530F017652530
F017652530
 
Software testing
Software testingSoftware testing
Software testing
 
Hai
HaiHai
Hai
 
fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)fundamentals of testing (Fundamental of testing what)
fundamentals of testing (Fundamental of testing what)
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software unit4
Software unit4Software unit4
Software unit4
 

More from kumari36

Virtualize of IO Devices .docx
Virtualize of IO Devices .docxVirtualize of IO Devices .docx
Virtualize of IO Devices .docxkumari36
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxkumari36
 
Operating System extension.docx
Operating System extension.docxOperating System extension.docx
Operating System extension.docxkumari36
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docxkumari36
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdfkumari36
 
Java Evolution-2.pdf
Java Evolution-2.pdfJava Evolution-2.pdf
Java Evolution-2.pdfkumari36
 
Inheritance in Java.pdf
Inheritance in Java.pdfInheritance in Java.pdf
Inheritance in Java.pdfkumari36
 
Constructors in Java (2).pdf
Constructors in Java (2).pdfConstructors in Java (2).pdf
Constructors in Java (2).pdfkumari36
 
Chapter4-var.pdf
Chapter4-var.pdfChapter4-var.pdf
Chapter4-var.pdfkumari36
 
softwareMaintenance.pdf
softwareMaintenance.pdfsoftwareMaintenance.pdf
softwareMaintenance.pdfkumari36
 
testing.pdf
testing.pdftesting.pdf
testing.pdfkumari36
 
QualityAssurance.pdf
QualityAssurance.pdfQualityAssurance.pdf
QualityAssurance.pdfkumari36
 
Prediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxPrediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxkumari36
 
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...kumari36
 
Presentation1.4.pptx
Presentation1.4.pptxPresentation1.4.pptx
Presentation1.4.pptxkumari36
 
Presentation1.3.pptx
Presentation1.3.pptxPresentation1.3.pptx
Presentation1.3.pptxkumari36
 
Cloud 1.2.pptx
Cloud 1.2.pptxCloud 1.2.pptx
Cloud 1.2.pptxkumari36
 
Cloud Computing Introduction
 Cloud Computing Introduction Cloud Computing Introduction
Cloud Computing Introductionkumari36
 
Impact of Data Science
Impact of Data Science Impact of Data Science
Impact of Data Science kumari36
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 

More from kumari36 (20)

Virtualize of IO Devices .docx
Virtualize of IO Devices .docxVirtualize of IO Devices .docx
Virtualize of IO Devices .docx
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docx
 
Operating System extension.docx
Operating System extension.docxOperating System extension.docx
Operating System extension.docx
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdf
 
Java Evolution-2.pdf
Java Evolution-2.pdfJava Evolution-2.pdf
Java Evolution-2.pdf
 
Inheritance in Java.pdf
Inheritance in Java.pdfInheritance in Java.pdf
Inheritance in Java.pdf
 
Constructors in Java (2).pdf
Constructors in Java (2).pdfConstructors in Java (2).pdf
Constructors in Java (2).pdf
 
Chapter4-var.pdf
Chapter4-var.pdfChapter4-var.pdf
Chapter4-var.pdf
 
softwareMaintenance.pdf
softwareMaintenance.pdfsoftwareMaintenance.pdf
softwareMaintenance.pdf
 
testing.pdf
testing.pdftesting.pdf
testing.pdf
 
QualityAssurance.pdf
QualityAssurance.pdfQualityAssurance.pdf
QualityAssurance.pdf
 
Prediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptxPrediction of heart disease using machine learning.pptx
Prediction of heart disease using machine learning.pptx
 
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...
Fast Wavelet Based Image Characterization for Highly Adaptive Image Retrieval...
 
Presentation1.4.pptx
Presentation1.4.pptxPresentation1.4.pptx
Presentation1.4.pptx
 
Presentation1.3.pptx
Presentation1.3.pptxPresentation1.3.pptx
Presentation1.3.pptx
 
Cloud 1.2.pptx
Cloud 1.2.pptxCloud 1.2.pptx
Cloud 1.2.pptx
 
Cloud Computing Introduction
 Cloud Computing Introduction Cloud Computing Introduction
Cloud Computing Introduction
 
Impact of Data Science
Impact of Data Science Impact of Data Science
Impact of Data Science
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Debugging.pdf

  • 1. 146 If programming language semantics are formally defined, it is possible to consider a program as a mathematical object. Using mathematical techniques, it is possible to demonstrate the correspondence between a program and a formal specification of that program. Program is proved to be correct with respect to its specification. Formal verification may reduce testing costs; it cannot replace testing as a means of system validation. Techniques for proving program correctness and axiomatic approaches The basis of the axiomatic approach Assume that there are a number of points in a program where the software engineer can provide assertions concerning program variables and their relationships. At each of these points, the assertions should be invariably true. Say the points in the program are P(1), P(2),...P(n). The associated assertions are a(l), a(2),...,a(n). Assertion a(1) must be an assertion about the input of the program and a(n) an assertion about the program output. To prove that the program statements between points P(i) and P(i+l) are correct, it must be demonstrated that the application of the program statements separating these points causes assertion a(i) to be transformed to assertion a(i+l). Given that the initial assertion is true before program execution and the final assertion is true after execution, verification is carried out for adjacent program statements. 8.10. DEBUGGING Debugging, a narrow view of software testing, is performed heavily to find out design defects by the programmer. The limitation of human nature makes it almost impossible to make a moderately complex program correct the first time. Finding the problems and get them fixed, is the purpose of debugging in programming phase. Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another.
  • 2. 147 Although each debugging experience is unique, certain general principles can be applied in debugging. This section particularly addresses debugging software, although many of these principles can also be applied to debugging hardware. The basic steps in debugging are: • Recognize that a bug exists • Isolate the source of the bug • Identify the cause of the bug • Determine a fix for the bug • Apply the fix and test it 8.10.1. The Debugging Process The debugging process begins with the execution of the test case. Results are assessed and a lack of correspondence between expected and actual result is encountered. In many cases, the non-corresponding data is found to be a symptom of an underlying cause as yet hidden. The debugging process attempts to match symptom with cause, thereby leading to error correction. Characteristics of bugs ([Cheung 1990]) 1. The symptom and the cause may be geographically remote. That is, the symptom may appear in one part of a program, while the cause may actually be located at a site that is far removed. Highly coupled program structures exacerbate this situation. 2. The symptom may disappear (temporarily) when another error is corrected. Debugging Suspected causes Identified causes Corrections Execution of cases Regression Tests Results Test caes Additional test Fig. 8.5 Debugging Process
  • 3. 148 3. The symptom may actually be caused by non-errors (e.g., round-off inaccuracies). 4. The symptom may be caused by human error that is not easily traced. 5. The symptom may be a result of timing problems, rather than processing problems. 6. It may be difficult to accurately reproduce input conditions (e.g., a real- time application in which input ordering is indeterminate). 7. The symptom may be intermittent. This is particularly common in embedded systems that couple hardware and software. 8. The symptom may be due to causes that are distributed across a number of tasks running on different processors. The debugging process will always have one of two outcomes: (1) The cause will be found, corrected, or removed, or (2) The cause will not be found. In general, three categories for debugging approaches are proposed: Brute Force Approach Backtracking Approach Cause Elimination Approach Each of the debugging approaches can be supplemented with debugging tools such as debugging compliers, dynamic debugging aids, automatic test case generators, memory dumps, and cross-reference maps. a. Brute Force Approach The brute force category of debugging is the most common method for isolating the cause of an error. This method is generally the least efficient and is used when everything else fails. A philosophy such as “let the computer find the error” is used in this approach. Memory dumps are taken, run-time traces are invoked, and the program is loaded with “write” statements, with the hope that from the mass of information produced, we will find a clue that can lead us to the cause of an error. b. Back Tracking Approach Debugging by backtracking involves working backward in the source code from the point where the error was observed in an attempt to identify the exact point where the error occurred. It may be necessary to run additional test cases in order to collect more information. This approach can be used successfully in small programs. The disadvantage with this approach is that if the program is too large, then the potential backward paths may become unmanageably large.
  • 4. 149 c. Cause Elimination Approach Cause elimination approach is manifested by induction or deduction. This approach proceeds as follows: 1. List possible causes for the observed failure by organizing the data related to the error occurrence. 2. Devise a “cause hypothesis”. 3. Prove or disprove the hypothesis using the data. 4. Implement the appropriate corrections. 5. Verify the correction. Rerun the failure case to be sure that the fix corrects the observed symptom. Check your Progress i. ____________is the process used to help identify the correctness, completeness, security and quality of developed computer software. ii. In other words, testing is nothing but __________ or _________ that is comparing the actual value with expected one. iii. _____________ is done to validate the code written and is usually done by the author of the code. iv. ________ and __________ are sub-categories of System testing. v. White box testing is also called as _________ and __________ Solutions I Ii Iii Iv V 8.11. REVIEW QUESTIONS 1. What are the Testing objectives, rules in S/W testing fundamentals? 2. Explain the testing information flow. 3. What are the stages available in testing process? 4. Describe art of debugging in software testing strategies. 5. Write short notes on: a. Data flow testing b. Integration testing.