On the use of the cyclomatic number to measure program complexity

  • Authors:
  • James L. Elshoff;Michael Marcotty

  • Affiliations:
  • General Motors Research Laboratories, Warren, Michigan;General Motors Research Laboratories, Warren, Michigan

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1978

Quantified Score

Hi-index 0.02

Visualization

Abstract

The October 1977 issue of SIGPLAN Notices carries an article that compares functionally equivalent programs that differ in their internal structure. The basis for comparing the programs is a measure called cyclomatic complexity whose value is the cyclomatic number of the graph that corresponds to the flow of control of the program. One program is of particular interest since all of the well-structured versions of the program that are discussed have a higher cyclomatic complexity than the unstructured version. In this paper another well-structured version of the program is presented for which the cyclomatic complexity is reduced to that of the original unstructured version. In the process, some of the shortcomings of the cyclomatic number as a complexity measure are revealed.