Source: wikibot/control-flow-graph

= Control-flow graph
{wiki=Control-flow_graph}

A control-flow graph (CFG) is a representation used in computer science and software engineering to model the flow of control within a program or a function. It is particularly useful in the fields of compiler design, static analysis, and program optimization. \#\#\# Key Characteristics of a Control-flow Graph: 1. **Nodes**: Each node in a CFG represents a basic block of code, which is a straight-line sequence of instructions with no control transfers (like jumps or branches) except at the start and end.