Heuristic Complexity Report

The Heuristic complexity Report determines the complexity of an application by assigning values to each type of statement available in the programming language. In the setup screen, the statements are arranged in groups to allow giving a value to all statements within the group.

Once the values are determined, the thresholds must be set to define the boundaries between simple, moderate, and complex programs. At complexity measurement time, each program complexity is determined by multiplying each statement weight by the statement occurrence number and then summing up all values for that program. The final complexity value is then compared to the thresholds to determine the degree of complexity (simple, moderate, or complex).

Heuristic complexity can be used to determine the effort of a specific software change by focusing on specific statements. For example, giving a weight of zero for all statements except SQL statements helps to measure the complexity of a change that relates only to SQL statements within your application. The weight can represent for example man/hours, providing a time estimation.

To define the Heuristic Complexity report settings for the current analysis, in Explore Projects view, go to the Mainframe Reports list in the pane to the right, then select Complexity Reports. Right-click the Heuristic Report and select Show settings. The Heuristic Report settings dialog window presents the weight and complexity (Simple, Moderate, and Complex) of each statement type. It contains two tabs: Thresholds and Weights.

The Thresholds tab presents the complexity thresholds (Simple, Moderate, and Complex) to be considered when IBM® AD Analyze calculates the Heuristic complexity for the current analysis. Modify the default values as needed. The threshold for Complex cannot be modified. A color is assigned by default to each complexity level. It is the color that is used in the report diagrams to represent a particular complexity level. To change the default color, double-click the color chip and then select the desired color. Use the Restore defaults button to return to the default selection.

The Weights tab presents the weight of each statement type. By default, all statement types are assigned the value "1". You can change the weight of a single statement or of a group of statements.

Use Restore defaults button to return to the default selection.

To generate the Heuristic Complexity report, in Explore Projects view go to the Mainframe Reports list in the pane to the right. Select Complexity Reports then double-click the desired report to display the report wizard. The Available programs area displays the resources available for report generation and allows the user to select the resources to be included in the report. Use the Name field to filter the contents of the list. Place the cursor over an icon to display a tooltip about the type of resource it displays and click it to display only the selected type of resource. To display the full name of the resource type, click the white arrow button to the left of the dialog window.

In Report generation options area, the selection indicates that the report appendix is displayed by default. Choose what additional data to include in the appendix: show input details in appendix, show weights in appendix. To show only the report summary, select the appropriate option.

Use the arrow buttons to move the resources between the Available and Selected lists then click Finish to generate the report.

The Report summary section presents two charts that show the Complexity percentage distribution and the File complexity distribution.

The Report details section shows for each program the number of statements, the Program weight, and the complexity level attributed (according to the values set in the Heuristic Report Settings dialog).