ABSTRACT

Most discussions of software complexity focus on two main models—cyclomatic (or decisional) complexity, and textual complexity as measured by the Halstead metrics. Both approaches are commonly used at the unit level; however, both can also be used at the integration and system levels. This chapter takes a closer look at software complexity at all three levels—unit, integration, and system. At the unit level, the basic cyclomatic complexity model (also known as McCabe complexity) is extended in two ways. Integration-level complexity applies cyclomatic complexity to a directed graph in which units are nodes and edges represent either object-oriented messages or procedural calls. After discussing the complexities due to object-oriented practice, system-level complexity is expressed in terms of an incidence matrix that relates the is and does views of a software system.