Пример #1
0
        public virtual void Run()
        {
            foreach (var b in graph.GetVertices())
            {
                Out[b] = Top;
            }

            var nodes = new HashSet <CFGNode>(graph.GetVertices());

            nodes.Remove(graph.GetRoot());

            var cont = true;

            while (cont)
            {
                cont = false;
                foreach (var node in nodes)
                {
                    In[node] = MeetOp(node.ParentsNodes);
                    var prevOut = Out[node];
                    var newOut  = Out[node] = TransferFunc(node);
                    if (ContCond(prevOut, newOut))
                    {
                        cont = true;
                    }
                }
            }
        }
Пример #2
0
 public CFGraph Launch()
 {
     Rename(cfGraph.GetRoot());
     return(cfGraph);
 }