McCabe's Cyclomatic Complexity Hypothesis: Difficulty of understanding a program is largely determined by complexity of control flow graph Cyclomatic number V of a connected graph G is the number of linearly independent paths in the graph or number of regions in a planar graph R1 R2 R3 5R4 Claimed to be a measure of testing difficulty and reliability of modules McCabe recommends maximum v(G)of 10
McCabe’s Cyclomatic Complexity Hypothesis: Difficulty of understanding a program is largely determined by complexity of control flow graph. Cyclomatic number V of a connected graph G is the number of linearly independent paths in the graph or number of regions in a planar graph. R1 R2 R5 R4 R3 Claimed to be a measure of testing diffiiculty and reliability of modules. McCabe recommends maximum V(G) of 10. ✿
Static Analysis of Code( Problems) Doesnt change as program changes High correlation with program size No real intuitive reason for many of metrics Ignores many factors: e. g, computing environment, application area, particular algorithms implemented characteristics of users, ability of programmers Very easy to get around. Programmers may introduce more obscure complexity in order to minimize properties measured by particular complexity metric
Static Analysis of Code (Problems) Doesn’t change as program changes. High correlation with program size. No real intuitive reason for many of metrics. Ignores many factors: e.g., computing environment, application area, particular algorithms implemented, characteristics of users, ability of programmers,. Very easy to get around. Programmers may introduce more obscure complexity in order to minimize properties measured by particular complexity metric. ❀