Data Flow Testing.

Slides:



Advertisements
Similar presentations
Register Allocation Consists of two parts: Goal : minimize spills
Advertisements

DATAFLOW TESTING DONE BY A.PRIYA, 08CSEE17, II- M.s.c [C.S].
Overview Structural Testing Introduction – General Concepts
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Register Usage Keep as many values in registers as possible Register assignment Register allocation Popular techniques – Local vs. global – Graph coloring.
Chapter 9 Code optimization Section 0 overview 1.Position of code optimizer 2.Purpose of code optimizer to get better efficiency –Run faster –Take less.
Chapter 6 Path Testing Software Testing
Data Flow Analysis. Goal: make assertions about the data usage in a program Use these assertions to determine if and when optimizations are legal Local:
Data Flow Coverage. Reading assignment L. A. Clarke, A. Podgurski, D. J. Richardson and Steven J. Zeil, "A Formal Evaluation of Data Flow Path Selection.
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Analysis of programs with pointers. Simple example What are the dependences in this program? Problem: just looking at variable names will not give you.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
Control Flow Analysis. Construct representations for the structure of flow-of-control of programs Control flow graphs represent the structure of flow-of-control.
Loop invariant code removal CS 480. Our sample calculation for i := 1 to n for j := 1 to m c [i, j] := 0 for k := 1 to p c[i, j] := c[i, j] + a[i, k]
Bernstein’s Conditions. Techniques to Exploit Parallelism in Sequential Programming Hierarchy of levels of parallelism: Procedure or Methods Statements.
Systems V & V, Quality and Standards
ECE453/SE465 Prof. Alencar University of Waterloo 1 Data Flow Testing Slice-Based Testing Winter 2007 Based on the tutorials by Prof. Kontogiannis, Winter.
The Application of Graph Criteria: Source Code  It is usually defined with the control flow graph (CFG)  Node coverage is used to execute every statement.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 16, 1999.
1 Register Allocation Consists of two parts: –register allocation What will be stored in registers –Only unambiguous values –register assignment Which.
Software Testing and Quality Assurance
Data Flow Analysis Compiler Design Nov. 8, 2005.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Data Flow Testing Data flow testing(DFT) is NOT directly related to the design diagrams of data-flow-diagrams(DFD). It is a form of structural testing.
INTRODUCTION TO PROGRAMMING STRUCTURE Chapter 4 1.
Software testing techniques Testing criteria based on data flow
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
Data Flow Testing Chapter Data Flow Testing Testing All-Nodes and All-Edges in a control flow graph may miss significant test cases Testing All-Paths.
Software (Program) Analysis. Automated Static Analysis Static analyzers are software tools for source text processing They parse the program text and.
Testing phases. Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Path Testing + Coverage Chapter 9 Assigned reading from Binder.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
BASIS PATH TESTING.
Overview Structural Testing Introduction – General Concepts
1 Control Flow Analysis Topic today Representation and Analysis Paper (Sections 1, 2) For next class: Read Representation and Analysis Paper (Section 3)
CS 614: Theory and Construction of Compilers Lecture 15 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Register Usage Keep as many values in registers as possible Keep as many values in registers as possible Register assignment Register assignment Register.
1 Software Testing & Quality Assurance Lecture 13 Created by: Paulo Alencar Modified by: Frank Xu.
Control Flow Graphs : The if Statement 1 if (x < y) { y = 0; x = x + 1; } else { x = y; } x >= yx < y x = y y = 0 x = x + 1 if (x < y) { y = 0;
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
CS223: Software Engineering Lecture 26: Software Testing.
ECE 453, Prof. Kontogiannis University of Waterloo 1 Data Flow Testing Slice-Based Testing Winter 2006 Presented by Nikos Giannopoulos
Computer Science 210 Computer Organization Machine Language Instructions: Control.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
BASIS PATH TESTING.
CSCE 747 Software Testing and Quality Assurance
CS223: Software Engineering
Paul Ammann & Jeff Offutt
Think What will be the output?
Lab 8 Data-Flow Testing.
Unit-3 Path Testing, Data Flow Testing (Structural Testing) 1.DD paths 2.Test coverage metrics 3.Basis path testing 4. Guidelines and observations 5. Definition-Use.
Program Slicing Baishakhi Ray University of Virginia
Chapter 10 Data Flow Testing Slice Testing
Computer Science 210 Computer Organization
Solutions Chapter 2.
TARGET CODE GENERATION
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
White-Box Testing Techniques II
Flow of Control.
The structure of programming
Thinking procedurally
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Data Flow Testing

Data flow testing refers to forms of structural testing that focus on the points at which variables receive values and the points at which these values are used (or referenced). Variables that represent data somehow receive values, and these values are used to compute values for other variables. Early “data flow” analyses often centered on a set of faults that are now known as define/reference anomaly: a variable that is defined but never used (referenced) a variable that is used but never defined a variable that is defined twice before it is used

Define/Use Testing A program P that has a program graph G(P), and a set of program variables V. The program graph G(P) is statement fragments as nodes, and edges that represent node sequences. G(P) has a single entry node, and a single exit node. Node n ∈ G(P) is a defining node of the variable v ∈ V, written as DEF(v,n), iff the value of the variable v is defined at the statement fragment corresponding to node n. Input statements, assignment statements, loop control statements, and procedure calls are all examples of statements that are defining nodes. During execution, the contents of the memory location(s) associated with the variables are changed.

Node n ∈ G(P) is a usage node of the variable v ∈ V, written as USE(v, n), iff the value of the variable v is used at the statement fragment corresponding to node n. Output statements, assignment statements, conditional statements, loop control statements, and procedure calls are all examples of statements that are usage nodes. During execution, the contents of the memory location(s) associated with the variables remain unchanged.