--- layout: plugin title: Scope & Data-flow browsing description: Allows the user to navigate the dataflow of the program, from definition to use or from use to definition. key: browsing ---
This plug-in computes information about dependencies on a user-specified l-value D at a user-specified program point L. It provides the following three features, which are presented in greater details below.
ShowDefs selects the statements that contribute to define the value of D at L, and print a message if a part of D might be undefined. Notice that undefined only means here that it has not been defined on some path from the beginning of the function.
DataScope selects sets of statements around a user-specified program point L where a user-specified l-value D is guaranteed to have the same value than at L.
s
belongs to this
selection, then for all executions of the function, the value of D is not modified between the execution
of s and the next time L
is reached.s
belongs to this
selection, then for all executions of the function, the value of D is not modified between the
last time L
is reached and the time s is reached.Zones computes, for each point Li of the function, the data Di needed to know the value of D at L. After this computation, the result Di will be printed in the information window each time a statement Li is selected. Of course, the only interesting program points Li are the one that are reached before L&
The statements that contribute to the computation are highlighted so that you should get the same result Di for successive statements that are not highlighted.
Those features are available through the graphical user interface once the value analysis has been done. They can be called from the menu Dependencies in the pop-up menu that appears when clicking the right button on a statement :
Results are presented by coloring the statements in the graphical interface as explained above. In addition, when something has been selected through these dependency features, a message in the information window serves as a reminder of where it comes from.
Note that all the variables that appear in the user-provided l-value are taken into account, so that selecting
T[0]
and T[i]
might lead to different results, even if the analysis is performed at a
point where i=0
.
Note that the Scope plug-in only takes into account the executions that have been considered by the Value analysis plug-in. In particular, the alarms emitted by the value analysis may correspond to executions that the value analysis ceased to consider. The alarms emitted by the value analysis should therefore be examined carefully by the user.