Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cyclomatic complexity
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Measure of the structural complexity of a software program}} '''Cyclomatic complexity''' is a [[software metric]] used to indicate the [[Programming complexity|complexity of a program]]. It is a quantitative measure of the number of linearly independent [[path (graph theory)|path]]s through a program's [[source code]]. It was developed by [[Thomas J. McCabe, Sr.]] in 1976. Cyclomatic complexity is computed using the [[control-flow graph]] of the program. The nodes of the [[directed graph|graph]] correspond to indivisible groups of commands of a program, and a [[directed edge]] connects two nodes if the second command might be executed immediately after the first command. Cyclomatic complexity may also be applied to individual [[function (computer science)|function]]s, [[modular programming|modules]], [[method (computer science)|method]]s, or [[class (computer science)|class]]es within a program. One [[software testing|testing]] strategy, called [[basis path testing]] by McCabe who first proposed it, is to test each linearly independent path through the program. In this case, the number of test cases will equal the cyclomatic complexity of the program.<ref>{{cite web| url=http://users.csc.calpoly.edu/~jdalbey/206/Lectures/BasisPathTutorial/index.html| title=Basis Path Testing| author=A J Sobey}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)