Dominance relation (control flow graph)

from Wikipedia, the free encyclopedia
Control flow graph
Dominator tree of the control flow graph

The dominance relation is a relation that is defined on the nodes of a control flow graph .

Let be a control flow graph and be two of its nodes.

Now, if every path in that starts in and ends in includes the node , then the node is said to dominate the node . One also writes .

For example, in the control flow graph shown above , node 2 dominates node 5, but node 3 does not dominate node 5 because there is a path that does not include node 3.

Clearly, each node dominates itself. Therefore, the dominance relation is reflexive .

Since it also follows for from and that the node dominates, the dominance relation is also transitive .

If the knot dominates the knot and , then it is also said that the knot strictly dominates . You then also write . The strict dominance relation can be represented as a tree . This tree is also Dominator Tree (Engl. Dominator tree called). The example graph above has the following dominator tree:

See also