Part 2: W09-1 Testing Structure Flashcards
1
Q
What are the type of data-flow anomalies?
A
- Defined and then redefined.
- Undefined and then referenced.
- Defined and not referenced.
2
Q
What can be used to explore data-flow anomalies?
A
Control Flow Graph (CFG)
3
Q
How can data-flow anomalies be discovered using CFG?
A
Go through CFG and at each node label which variables are defined and which variables are used (predicate and computation use)
Then use above information to look at Du-paths and Dc-paths
4
Q
What is a Du-path?
A
- Path in Data Flow Graph
- Definition-use subpath with respect to some variable
- can have multiple defiinitions
5
Q
What is a Dc-path?
A
- Path in Data Flow Graph
- Definition-clear subpath with respect to some variable
- can only have one definition node