Imagix 4D User Guide

Calculation Trees

The Calculation Trees display information about the calculations leading to the current value of a variable. You're able to examine all of the assignments, of any variable, which contribute to a specific variable's value. If you invoke it through the right mouse pop-up menu in a File Editor, a Calculation Tree focuses on just those assignments leading to the value of the variable in the selected line of code. Otherwise, the tool analyzes the full set of assignments impacting any of the occurrences of the variable.

A Calculation Tree window consists of a series of views that show different aspects of the overall calculation. The Assignment Flow view graphically depicts the hierarchy of all the assignments that figure in the calculation. As you click on specific assignments in the graph, details about that particular assignment are shown in the table just below the graph.

All of these same assignments are also displayed in the Assignment List view. Here, 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 provides a somewhat higher level graph of the overall calculation. You can see the global and the local variables and parameters which are involved in the calculation, and examine the dependencies between these variables. As with the Assignment Flow view, details about a specific variable or dependency are displayed just below the graph.

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

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