What is cyclomatic complexity?

Questions by raghuramsuravarapu   answers by raghuramsuravarapu

Showing Answers 1 - 17 of 17 Answers

Namrata D

  • Jun 23rd, 2006
 

The cyclomatic complexity is a software metric that provides a

quantitative measure of the logical complexity of a program.

  Was this answer useful?  Yes

KaranSorout

  • Jul 21st, 2006
 

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.

The cyclomatic complexity of a software module is calculated from a connected graph of the module (that shows the topology of control flow within the program):

  Was this answer useful?  Yes

KaranSorout

  • Jul 21st, 2006
 

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.

The cyclomatic complexity of a software module is calculated from a connected graph of the module (that shows the topology of control flow within the program):

If feel otherwise... Please let me know at karan.sorout@gmail.com

  Was this answer useful?  Yes

Manishasharawat

  • Jul 26th, 2006
 

 

 

The cyclomatic complexity is a software metric that provides a

quantitative measure of the logical complexity of a program.

  Was this answer useful?  Yes

Manishasharawat

  • Jul 26th, 2006
 

The cyclomatic complexity is a software metric that provides a

quantitative measure of the logical complexity of a program.

  Was this answer useful?  Yes

Alok Dadarya

  • Oct 4th, 2006
 

Broad measure of soundness and confidance for a software program.

cc= E-N+p

  Was this answer useful?  Yes

Guest

  • Feb 27th, 2007
 

Cyclomatic Complexity is no of decision +1

  Was this answer useful?  Yes

aruna

  • Apr 17th, 2007
 

It has formula e-n+2
e refers to num of edges
n refers to nodes.
it is matic used to know howmany times the prog has to be excuted to excute all statements.

  Was this answer useful?  Yes

D.Thilagavathi

  • Aug 31st, 2007
 

The cyclomatic complexity of a software module is calculated from a connected graph of the module (that shows the topology of control flow within the program):

Cyclomatic complexity (CC) = E - N + p

where E = the number of edges of the graph

N = the number of nodes of the graph

p = the number of connected components.

  Was this answer useful?  Yes

Manoj

  • Oct 11th, 2007
 

I am currently implementing a program analysis tool that does static and dynamic analysis. I am using the Cyclomatic complexity metric to determine the complexity of a program. The formula I am using is CC = Number of decision + program entry point.

I just wanted to know is there any sort of grading I have to do for the different conditional statements? (if-else,while,for)

e.g  If-statment will have a grading of 1 or a while-statement is more complext so it will have a grading of 2.

many thanks

  Was this answer useful?  Yes

qamem84

  • Feb 20th, 2008
 

‘CYLLOMETRIC COMPLEXITY’ is a software metric that provides a quantitative measure of the logical complexity of a program. Here, the value computed for cyclometric complexity defines the No. of independent paths is the basis set of program and provides as with the upped bound for the No. of tests that be conducted to ensure that all statements have been exercise at least once.

  Was this answer useful?  Yes

C.C. is defined for each module to be:

e-n+2

e,n: the number of edges and nodes in the control flow graph,respectively.

*C.C is also know as:

v(G)


v: cyclomatic number. G: indicates that the complexity is a function of the graph.

  Was this answer useful?  Yes

Cyclomatic Complexity is a measure of the logical complexity of an Algorithm and Looping Paths for Eg: Validating the Debit, Credit Card--the Developer is validate the Check Some Algorithm  either developing code or doing unit testing---

       It will come under White box or Glass box testing

  Was this answer useful?  Yes

rameshn3

  • Jun 10th, 2008
 

Cyclomatic Complexity is software metric that provides a quantitative measure of the logical complexity of a program. Cyclomatic complexity defines the number for independent paths in the basis set of a program and provides us with an upper bound for the number of tests that must be conducted to ensure that all statements have been executed atleast once.
It can be calculated in the following two ways.


Cyclomatic complexity, V(G), for a flow graph, G is defined as V (G) = E-N+2Where E, is the number of flow graph edges, N is the number of flow graph nodes.3. Cyclomatic complexity, V (G) for a flow graph, G is also defined as: V (G) = P+1Where P is the number of predicate nodes contained in the flow graph G.

  Was this answer useful?  Yes

Cyclomatic complexcity is a methodology to measure the complexity at a certain area of code.In other words it an another way to reach at defect clustering.
Cyclomatic complexity is to measure the number of independent paths in a programs source code.
The formula it follow: M = E- N + 2P
where
M = cyclomatic complexity
E = number of edges of the graph
N = number of nodes of the graph
P = the number of connected components.
**The easier one is like:n(umber of Decision statements in the program being tested plus one.)
It provides the degree of testing/review required in a certain area of code.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions