Data Flows

The 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 Statements

While 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

The Data Flow window consists of a series of views that show different aspects of the overall data flow for the variable. The Statement Flow views provide full detail, showing the complete hierarchy of upstream or downstream statements involving the variable. The Statement Flow Graph view depicts this visually.

Within the Statement Flow Graph, each rectangle represents a specific statement, and contains the source code for that statement. Lines show the hierarchy of that statement within the overall data flow. The lines have direction, which is indicated by the arrowheads.

As you select a statement in the graph by clicking on it, information about that particular statement is shown in the Dataflow Details tab in the Symbol panel. Included is a description of the statement, as well as details about its location. And of course, double clicking on the statement will open a file editor to that line of source code.

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 views provide a somewhat higher level display of the overall data flow. You can examine the global and the local variables and parameters which are involved in the calculation, and study the dependencies between these variables.

The Variable Flow Graph shows this visually, using the same graph symbols that appear in Imagix 4D's standard graph windows.

As with the Statement Flow Graph, clicking on a specific symbol results in details about it being displayed in the Dataflow Details tab in the Symbol panel. Here, the tab lists all of the lines where the particular variable is involved in a statement.

This focus on the variable being set is maintained in the Variable Flow Table view, where the individual statements are organized by variable involved.


Because 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').