SlideShare a Scribd company logo
1 of 14
Unit 2
Unit level Testing
Contents
• Overview of white box testing
• Control flow testing
• Process of generating test input data : Example
• Various coverage criterias
• Dataflow testing
• Data flow anomalies
• Data flow graph
• Data flow terminologies
Overview of white box testing
• The testers require knowledge of how the software is implemented, the tester is concentrating
on how the software does it. For example, a structural technique may be concerned with
exercising loops in the software.
• WHITE BOX TESTING is testing of a software solution's internal structure, design, and
coding. In this type of testing, the code is visible to the tester.
• It focuses primarily on verifying the flow of inputs and outputs through the application,
improving design and usability, strengthening security.
• Performs to check/verify
• Internal security holes
• Broken or poorly structured paths in the coding processes
• The flow of specific inputs through the code
• Expected output
• The functionality of conditional loops
• Testing of each statement, object, and function on an individual basis
Example
Printme (int a, int b)
{
int result = a+ b;
If (result> 0)
Print ("Positive", result)
Else
Print ("Negative", result)
}
“The goal of White Box testing is to verify
all the decision branches, loops, statements
in the code.”
Advantages of White Box Testing
• Code optimization by finding hidden
errors.
• White box tests cases can be easily
automated.
• Testing is more thorough as all code
paths are usually covered.
• Testing can start early in SDLC even if
GUI is not available.
Disadvantages of White Box Testing
• White box testing can be quite complex and expensive.
• The white box testing by developers is not detailed can lead to
production errors.
• White box testing requires professional resources, with a
detailed understanding of programming and implementation.
• White-box testing is time-consuming, bigger programming
applications take the time to test fully.
Control Flow testing: Process of Generating Test
Input Data
Statement Coverage
• This technique requires every possible
statement in the code to be tested at least
once during the testing process.
• Statement coverage =( number of statement
executed/total number of statements )
1.Printme (int a, int b){
2. int result = a+ b;
3. If (result> 0)
4. Print ("Positive", result)
5. Else
6. Print ("Negative", result)
7.}
Scenario 1:
A= 5 B= 6;
The statements marked in red colour are those which are
executed as per the scenario
Number of executed statements = 5,
Total number of statements = 7
Statement Coverage: 5/7 = 71%
What is covered by Statement Coverage?
 Unused Statements
 Dead Code
 Unused Branches
 Missing Statements
Branch Coverage vs Decision coverage
• This technique requires every possible branch in
the code to be tested at least once during the
testing process.
• Branch coverage=(number of branches
executed/total number of branches)
What is covered by Branch Coverage?
 Allows you to validate-all the branches in the code
 Helps you to ensure that no branched lead to any abnormality
of the program's operation
 Branch coverage method removes issues which happen
because of statement coverage testing
 Allows you to find those areas which are not tested by other
testing methods
 It allows you to find a quantitative measure of code coverage
 Branch coverage ignores branches inside the Boolean
expressions
TestValueofX(int x)
{
if (x>9)
print x;
print (x+6);
}
Test
Case
Value of
X
Output Branch
Coverage
1 8 14 67%
2 10 10 ,16 100%
• Reports true or false outcomes of each Boolean expression. In
this coverage, expressions can sometimes get complicated.
Therefore, it is very hard to achieve 100% coverage.
Test case 1
• Number of executed decision = 1,
• Total number of decisions = 2
Test case 2
• Number of executed decision = 1,
• Total number of decisions = 2
TestValueofX(int x)
{
if (x>9)
print x;
else
print (x+6);
}
Test
Case
Value of
X
Output Decision
Coverage
1 8 14 50%
2 10 10 50%
Branch Coverage vs Decision coverage
Data Flow Testing
Data Flow Anomalies
• Defined and Then Defined Again
• Example: int x=10;
int x=12; // In same source code
• Undefined but Referenced
• Example: x=10; // In source code is undefined
• Defined but Not Referenced
• Example: int x; // In source code , x is defined but not referenced.
Data Flow Graph Example
Data Flow Graph Example
Data Flow Terminologies and C-use(ti) variable
all-c-uses criterion with respect to variable ti
Paths should be 1-2-3-4-5-6-3-7-8-10, 1-2-3-4-5-6-3-7-9-10, 1-2-3-4-6-3-7-8-10, and 1-2-3-4-6-3-7-9-10.
!!..Thank You..!!

More Related Content

Similar to Unit 2: White Box Testing Techniques and Data Flow Testing Explained

Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueANKUR-BA
 
Test case techniques
Test case techniquesTest case techniques
Test case techniquesPina Parmar
 
Lecture (Software Testing).pptx
Lecture (Software Testing).pptxLecture (Software Testing).pptx
Lecture (Software Testing).pptxskknowledge
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designMaitree Patel
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesKhuong Nguyen
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesAhmad sohail Kakar
 
BLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptxBLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptxMohammadShahjalalKha
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Mr. Jhon
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
SE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxSE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxPraneethBhai1
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)ShudipPal
 
Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)1Arun_Pandey
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbjeyasrig
 

Similar to Unit 2: White Box Testing Techniques and Data Flow Testing Explained (20)

Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
 
Lecture (Software Testing).pptx
Lecture (Software Testing).pptxLecture (Software Testing).pptx
Lecture (Software Testing).pptx
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
 
testing
testingtesting
testing
 
Block 1 ms-034 unit-1
Block 1 ms-034 unit-1Block 1 ms-034 unit-1
Block 1 ms-034 unit-1
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniques
 
Seii unit6 software-testing-techniques
Seii unit6 software-testing-techniquesSeii unit6 software-testing-techniques
Seii unit6 software-testing-techniques
 
BLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptxBLACK BOX & WHITE BOX TESTING.pptx
BLACK BOX & WHITE BOX TESTING.pptx
 
WHITE BOX TESTING ashu.pptx
WHITE BOX TESTING ashu.pptxWHITE BOX TESTING ashu.pptx
WHITE BOX TESTING ashu.pptx
 
Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01Newsoftware testing-techniques-141114004511-conversion-gate01
Newsoftware testing-techniques-141114004511-conversion-gate01
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
SE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptxSE UNIT 5 part 2 (1).pptx
SE UNIT 5 part 2 (1).pptx
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
Se unit 4
Se unit 4Se unit 4
Se unit 4
 
Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
Testing
TestingTesting
Testing
 

Recently uploaded

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
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
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
(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
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
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
 
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
 
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 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
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
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...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
(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...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
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...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
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
 
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
 
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 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
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

Unit 2: White Box Testing Techniques and Data Flow Testing Explained

  • 2. Contents • Overview of white box testing • Control flow testing • Process of generating test input data : Example • Various coverage criterias • Dataflow testing • Data flow anomalies • Data flow graph • Data flow terminologies
  • 3. Overview of white box testing • The testers require knowledge of how the software is implemented, the tester is concentrating on how the software does it. For example, a structural technique may be concerned with exercising loops in the software. • WHITE BOX TESTING is testing of a software solution's internal structure, design, and coding. In this type of testing, the code is visible to the tester. • It focuses primarily on verifying the flow of inputs and outputs through the application, improving design and usability, strengthening security. • Performs to check/verify • Internal security holes • Broken or poorly structured paths in the coding processes • The flow of specific inputs through the code • Expected output • The functionality of conditional loops • Testing of each statement, object, and function on an individual basis
  • 4. Example Printme (int a, int b) { int result = a+ b; If (result> 0) Print ("Positive", result) Else Print ("Negative", result) } “The goal of White Box testing is to verify all the decision branches, loops, statements in the code.” Advantages of White Box Testing • Code optimization by finding hidden errors. • White box tests cases can be easily automated. • Testing is more thorough as all code paths are usually covered. • Testing can start early in SDLC even if GUI is not available. Disadvantages of White Box Testing • White box testing can be quite complex and expensive. • The white box testing by developers is not detailed can lead to production errors. • White box testing requires professional resources, with a detailed understanding of programming and implementation. • White-box testing is time-consuming, bigger programming applications take the time to test fully.
  • 5. Control Flow testing: Process of Generating Test Input Data
  • 6. Statement Coverage • This technique requires every possible statement in the code to be tested at least once during the testing process. • Statement coverage =( number of statement executed/total number of statements ) 1.Printme (int a, int b){ 2. int result = a+ b; 3. If (result> 0) 4. Print ("Positive", result) 5. Else 6. Print ("Negative", result) 7.} Scenario 1: A= 5 B= 6; The statements marked in red colour are those which are executed as per the scenario Number of executed statements = 5, Total number of statements = 7 Statement Coverage: 5/7 = 71% What is covered by Statement Coverage?  Unused Statements  Dead Code  Unused Branches  Missing Statements
  • 7. Branch Coverage vs Decision coverage • This technique requires every possible branch in the code to be tested at least once during the testing process. • Branch coverage=(number of branches executed/total number of branches) What is covered by Branch Coverage?  Allows you to validate-all the branches in the code  Helps you to ensure that no branched lead to any abnormality of the program's operation  Branch coverage method removes issues which happen because of statement coverage testing  Allows you to find those areas which are not tested by other testing methods  It allows you to find a quantitative measure of code coverage  Branch coverage ignores branches inside the Boolean expressions TestValueofX(int x) { if (x>9) print x; print (x+6); } Test Case Value of X Output Branch Coverage 1 8 14 67% 2 10 10 ,16 100%
  • 8. • Reports true or false outcomes of each Boolean expression. In this coverage, expressions can sometimes get complicated. Therefore, it is very hard to achieve 100% coverage. Test case 1 • Number of executed decision = 1, • Total number of decisions = 2 Test case 2 • Number of executed decision = 1, • Total number of decisions = 2 TestValueofX(int x) { if (x>9) print x; else print (x+6); } Test Case Value of X Output Decision Coverage 1 8 14 50% 2 10 10 50% Branch Coverage vs Decision coverage
  • 10. Data Flow Anomalies • Defined and Then Defined Again • Example: int x=10; int x=12; // In same source code • Undefined but Referenced • Example: x=10; // In source code is undefined • Defined but Not Referenced • Example: int x; // In source code , x is defined but not referenced.
  • 11. Data Flow Graph Example
  • 12. Data Flow Graph Example
  • 13. Data Flow Terminologies and C-use(ti) variable all-c-uses criterion with respect to variable ti Paths should be 1-2-3-4-5-6-3-7-8-10, 1-2-3-4-5-6-3-7-9-10, 1-2-3-4-6-3-7-8-10, and 1-2-3-4-6-3-7-9-10.