Lecture 2-Data Flow Flashcards

1
Q

What is path coverage?

A

-It’s the key to determine “critical paths”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is data flow analysis?

A

-Focuses on the assignment of values to variables and their uses where data is defined and used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 2 occurrences of variables analyzed in data flow analysis?

A

1.Definition occurrence: value is bound to variable
2.Use occurrence: value of variable is referred

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Differentiate variable definition, use, kill

A

Variable definition:
d(v,n)–> value is assigned to v at node n
Variable use :
-c-use(v,n)–> v used in a computation at node n
-p-use (v,m,n) –> v used in predicate from node m to n
Variable kill:
k(v,n)–> v deallocated at node n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two types of use occurrence?

A

-Computational use(c-use): compute a value for defining other variables or output value
-Predicate use(p-use): variable used to decide whether predicate is true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When do we use c-use?

A

Classified as c-use if part of :
-Assignment statement
-Output statement
-Parameter within a function call
-Subscript expressions

*C stands for computational

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When do we use p-use?

A

Classified as p-use if part of :
-condition in a branch statement (like if, while…)

*p stands for predicate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does a data flow graph(DFG) do?

A

It captures the flow of definitions and uses across basic blocks in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

DFG vs CFG

A

Adequacy criteria based on DFG more powerful than based on CFG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the three different types of paths in a DFG?

A

Complete path : Initial node is start node, final node is exit node.
Simple path: all nodes except possibly first and last are distinct.
Loop free path: all nodes are distinct.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What can we base ourselves to reduce the number of def-uses to be covered?

A

The coverage of one def-use might imply the coverage of another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are 3 define/reference anomalies?

A

-A variable that is defined but never used (referenced)
-A variable that is used before it is defined
-A variable that is defined twice before it is used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly