Control flow graph

A control flow graph is a special directed graph with an excellent root node.

It thus consists of a set of nodes, a set of directed edges, and the root node. The notation is.

In addition, there must be a path in the control flow graph of each to every other node.

The graph shown above is not a control flow graph, since there is no path from to.

This graph is a control flow graph as it is to any other node of a path. There are, for example, the following path from to.

In addition, it is sometimes also characterized an exit node in a graph. This exit node may then have no outgoing edges, so do not be a source of a directed edge.

Control flow graph are used in computer science to represent the control flow of computer programs. They are used, among others, for program optimization. The root node can be thought of as the starting point of the computer program, the exit node as its end point. If a node of a plurality of edges leading away (the node that is the source of several directed edges ), this corresponds to a branch. Loops are found as cycles in the control flow graph again. For example, indicates the cycle shown in the above graph that the underlying computer program a loop is included.

485399
de