Cyclomatic complexity
is the most widely used member of a class of static software metrics. Cyclomatic
complexity may be considered a broad measure of soundness and
confidence for a program. Introduced by Thomas McCabe in 1976, it measures
the number of linearly-independent paths through a program module. This measure
provides a single ordinal number that can be compared to the complexity of other
programs.
Cyclomatic complexity is often referred to simply as program
complexity, or as McCabe's complexity. It is often used in concert with other
software metrics. As one of the more widely-accepted software metrics, it is
intended to be independent of language and language format.
Cyclomatic complexity has
also been extended to encompass the design and structural complexity of a
system.