Calculation TreesThe Calculation Trees display information about the assignments 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 assignment dependencies across function boundaries and through parameter passing.
If you invoke the Calculation Tree through the right mouse pop-up menu in a File Editor, the Calculation Tree focuses on just those assignments leading to or resulting from the value of the variable in the selected line of code. Otherwise, the tool analyzes the full set of assignments related to any of the occurrences of the variable.
Contributing vs. Impacted StatementsWhile examining data flow within the Calculation Tree, the most significant setting controls whether to display the fan-in from upstream assignments that contribute to the value of a specific variable, or to show the downstream fan-out of all the variable assignments 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.
All of these same assignments are also displayed in the Assignment List view. In this tabular view, the full source line for each assignment, or alternatively, a description of each assignment, appears in a list. The order and indenting of the list indicates the flow of the assignments.
The Variable Dependencies view shows this graphically, 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 Table view, where the individual assignments are organized by assigned variable.
InitializationBecause of the information they display and their interaction with other display windows, the Calculation Trees are included under the Tools menu with the other display windows described in this section of the User Guide. However, before initial Calculation Tree 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 will see significant delays during this analysis. In addition, this analysis requires knowledge of local variables, so the use of Calculation Trees requires that your source code be analyzed with the -locals option (see `Analyzer Syntax and Options').