Cyclomatic complexity
Cyclomatic complexity. Cyclomatic complexity of a program is a structural (or topological) measure of programs' complexity for measuring software quality. Cyclomatic complexity measuring allows you to evaluate the quality of the program code and detect high-complexity procedures. High-complexity procedures are subject to errors and detecting them is highly required to perform code review. Program cyclomatic complexity was the first topological complexity measure which was used in practice and became basis for many modifications. Measuring of cyclomatic complexity relates to static code analysis methods.
If you need to develop ad-hoc methods of calculating cyclomatic complexion or other metrics, you may try the open library VivaCore to analyze C/C++ code. Our company OOO "Program Verification Systems" can also develop ad-hoc solutions or their parts related to processing of the source code (see the section "Services. Creation of analyzers").
References
- Wikipedia. Cyclomatic complexity
- T.J. McCabe, "A complexity measure," IEEE Transactions on Software Engineering, vol. SE-2, no. 4, pp. 308-320, December, 1976.
- SourceMonitor Tool