Data Flow Model in Data Flow Testing

Data Flow Model

The data flow model is based on the programs control flow graph but not with the programs data flow graph
Here, each link is annotated with symbols (for example, d, k, u, c, p) or sequences of symbols (for example, dd, du, ddd) that denote the sequence of data operations on that link with respect to the variable of interest, Such annotations are called link weights
For every variable, the control flow graph structure is same but weights may change

Components of the model:
1. To every statement there is a node, whose name is unique
2. Every node has at least one outlink and one inlink, except for exit nodes and entry nodes
3. Exit nodes are dummy nodes placed at the outgoing arrowheads of exit statements to complete the graph. Example: END, RETURN
4. Similarly, entry nodes are dummy nodes placed at entry statements(example: BEGIN) for the same reason
5. The outlink of simple statements (statements with only outlink)are weighted by the proper sequence of data flow actions for that statement
6. Note that the sequence can consist of more than one letter. For example, the assignment statement A:= A + B in most languages is weighted by 'cd' or possibly 'ckd' for variable 'A'
7. Languages that permit multiple simultaneous assignments and/or compound statements can have anomalies within the statement
8. The sequence must correspond to the order in which the object code will be executed for that variable

Predicate nodes (example: IF-THEN-ELSE, DO WHILE, CASE)  are weighted with the p- uses(s) on every outlink, appropriate to that outlink
Every sequence of simple statements (example: a sequence of nodes with one inlink and one outlink) can be replaced by a pair of nodes that has, as weights on the link between them, the concatenation of link weights
If there are several data flow actions on a given link for given variable, then the weight of the link is denoted by the sequence of actions on that link for that variable
Conversely, a link with several data flow actions on it can be replaced by a succession of equivalent links, each of which has at most one data flow action for any variable
Example:

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