A control flow graph maps how execution can move through a function. Nodes mark execution points such as the function start, conditions, loops, loop ends, and returns; directed edges mark possible paths. section 9.1.3
The graph helps measure cyclomatic complexity, which indicates how many independent paths a function contains. Count edges and nodes, then calculate M = E - N + 2. section 9.1.3
A function with branching and a loop
For has_long_words, the graph includes an input-type condition, a loop over words, a length condition inside the loop, and return paths. With 10 edges and 8 nodes, its complexity is 4. section 9.1.3
