Data Flow Graphs in Data Flow Testing

A graph which contains nodes and directed links is known as data flow graph
A control graph is used to show what happens to data objects of interest at that moment
The main objective is to expose deviations between the data flows which have and the data flows which required
Data Object State and Usage:
Data objects can be created, killed and used
They can be used in two distinct ways:
In a calculation
As a part of a control flow predicate
Image Shows a program that calculates the bill of a mobile service based on its usage
The variable 'bill' has been defined, used and killed at various places in the code and the same has been represented in the data flow diagram
The following symbols denote these possibilities
Defined(d)
Defined, Created, Initialized etc..
Killed or Undefined(k)
Killed, Undefined, Released etc..
Usage(u)
Used for something(c-used in calculation, p- used in predicate)
Defined(d)
When an object appears in a data declaration, it is defined explicitly and when it appears on the left hand side of the assignment then it is defined implicitly
It is also used to mean a file that has been opened
Other examples for defined state:
A dynamically allocated object has been allocated
Something is pushed in to the stack
A record written
Killed or Undefined(k)
When an object is released or made unavailable, it is killed or undefined
When its contents are no longer known with certitude (with absolute certainty / perfectness)
Release of dynamically allocated objects back to the availability pool
Return of records
The old top of the stack after it is popped
An assignment statement can kill and redefine immediately
Example: If a had been previously defined and we do a new assignment, such as A:=17, we have killed A's previous value and redefined A
Usage (u)
When an object appears on the right hand side of an assignment statement then the variable is used for computation (c)
A file record is read or written
When an object appears directly in a predicate then it is used in a predicate(p)
But also implicitly as the control variable of a loop, in an expressing used to estimate the control flow of a case statement, as a pointer to an object that will be used to direct control flow
In some languages, usage can be for both predicate and computation simultaneously
Example: A test and clear machine language instruction

Share on Google Plus

About Data Sciences by Venu

Hi, My name is Venugopala Chary and I'm Currently working as Associate Professor in Reputed Engineerng College, Hyderabad. I have B.Tech and M.tech in regular from JNTU Hyderabad. I have 11 Years of Teaching Experience for both B.Tech and M.Tech Courses.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment