Data FlowsThe Data Flows display information about the statements related to the current value of a variable. You're able to examine all of the initializations, sets and reads of any variable, that contribute to or are impacted by a specific variable's value. This analysis of your software's data flow tracks variable dependencies across function boundaries and through parameter passing and return statements.
The initial focus of a Data Flow needs to be a top-level variable or array. This can be of any type, and can be of global, static or local scope. While members of variables (e.g. var.member) or referenced members of pointers (e.g. pointer->member) can not be the initial focus, the resulting Data Flow will include those variable paths in the dependencies it displays. For example, if you initially focus the Data Flow on a pointer variable, the resulting display will show what is impacted by pointer->member and any variables referenced by that.
If you invoke the Data Flow through the right mouse pop-up menu in a File Editor, the Data Flow displays just those statements leading to or resulting from the value of the variable in the selected line of code. Otherwise, the tool shows the full set of statements related to any of the occurrences of the variable.
Contributing vs. Impacted StatementsWhile examining data flow within the Data Flow, the most significant setting controls whether to display the fan-in from upstream statements that contribute to the value of a specific variable, or to show the downstream fan-out of all the statements that are impacted by that specific variable's value. If you're trying to understand how a variable might have reached a problematic value, the contributing statements setting is more applicable. For reviewing the possible consequences of changing a calculation, you may want to review the impacted statements.
Statement Flow Views
All of these same statements are also displayed in the Statement Flow List view. In this tabular view, the full source line for each statement, or alternatively, a description of each statement, appears in a list. The order and indenting of the list indicates the flow of the statements.
Variable Flow Views
The Variable Flow Graph shows this visually, using the same graph symbols that appear in Imagix 4D's standard graph windows.
This focus on the variable being set is maintained in the Variable Flow Table view, where the individual statements are organized by variable involved.
InitializationBecause of the information they display and their interaction with other display windows, the Data Flows are included under the Tools menu with the other display windows described in this section of the User Guide. However, before initial Data Flow information can be displayed, a large amount of underlying global data flow analysis needs to take place. Depending on the size of your project, you may see significant delays during this analysis.
The results of the global data flow analysis are stored between sessions, and are discarded the next time that the source code is analyzed. So you can avoid the delay by running the re-analysis of your source code and regeneration of the data flow analysis as a batch command, perhaps as part of a nightly build process.
In addition, this analysis requires knowledge of local variables, so the use of Data Flows requires that your source code be analyzed with the -locals option (see `Analyzer Syntax and Options').