Cyclomatic Complexity with connection and short circuit conditions

I study Cyclomatic Complexity at my level of software quality assurance at the University, and it’s hard for me to understand how it works when you have complex conditions in a predicate statement or node. I saw several definitions of Cyclomatic Complexity, the main of which used mine in my class

V(G) = # of predicate nodes (with outdegree = 2) + 1

So, for such a graph of programs, we would have the cyclic complexity of two:

V(G) = 2

Program graph with cyclomatic complexity of two

I also saw Cyclomatic definitions of complexity given as

V(G) = # edges - # nodes + 2

. . , , , . , , Cyclomatic 3, if V (G) = 2?,

, , Cyclomatic, , , , . , , , , . , , , ? Program graph expanded to show short circuiting behavior

+5
1

C (++, Java, #) "& &" , . Cyclomatic Complexity 3.

. http://hissa.nist.gov/HHRFdata/Artifacts/ITLdoc/235/chapter4.htm

" , , , , ".

4-4 , , .

. IF ((A > B) AND (C > D)) IF ((A > B) OR (C > D))

+2

All Articles