Introduction to the Complexity Profile Graph

The overall goal of the GRASP project is to improve the comprehensibility of software. Thus, it is important to be able to identify complex areas of source code. The Complexity Profile Graph (CPG), a new graphical representation based on a composite of statement level complexity metrics provides the user with the capability to quickly recognise complex areas of source code. The CPG is significant in that it shows the complexity of a program unit as a profile of statement level complexity metrics rather than as a single, global metric. For example, in the linguistic approach used in Halstead's software science, the numbers of distinct and total operators and operands are used compute the length and volume of a program without regard for program structure or location within the program. The graph theoretic approach used in computing McCabe's cyclomatic complexity yields a metric based on the number of decisions (edges and nodes in the graph). These traditional metrics are each single numbers used to describe an entire program unit. While there are other metrics that combine the characteristics of software science and cyclomatic complexity, none addresses the overall characteristics of a program unit as a visual complexity profile in the way that the CPG does.


Next Page

Return to GRASP Documentation Page