<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Control dependency - Page 4 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Control_dependency&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Control_dependency&amp;p=5">3.Next</a>
</p>
<p>in the reverse graph of the <a href="page.php?w=control-flow_graph">control-flow graph</a> (CFG). Thus, one way of constructing them, would be to construct the post-dominance frontier of the CFG, and then reversing it to obtain a control dependence graph.</p>

<p>The following is a pseudo-code for constructing the post-dominance frontier:</p>

<p> <b>for each</b> X in a bottom-up traversal of the post-dominator tree <b>do</b>:     PostDominanceFrontier(X) <- ?     <b>for each Y ? Predecessors(X) <b>do</b>:         <b>if</b> immediatePostDominator(Y) != X:             <b>then</b> PostDominanceFrontier(X) <- PostDominanceFrontier(X) ? {Y}     <b>done     <b>for each</b> Z ? Children(X) <b>do</b>:         <b>for each</b> Y ? PostDominanceFrontier(Z) <b>do</b>:             <b>if</b> immediatePostDominator(Y) != X:                 <b>then</b> PostDominanceFrontier(X) <- PostDominanceFrontier(X) ? {Y}         <b>done     <b>done</b> <b>done</b></-></-></-></p><p>
<a accesskey="1" href="page.php?w=Control_dependency&amp;p=3">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Control_dependency&amp;p=5">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
