示例#1
0
        public void FindNoLoopInInterval()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            m.Return();

            StructureNode node = new StructureNode(m.Procedure.ControlGraph.Blocks[1], 3);
            node.Order = 0;
            Interval interval = new Interval(1, node);

            var nodesInInterval = interval.FindIntervalNodes(0);
            SccLoopFinder finder = new SccLoopFinder(interval, nodesInInterval);
            var loopNodes = finder.FindLoop();
            Assert.AreEqual(0, loopNodes.Count);
        }
示例#2
0
 private SccLoopFinder CreateSccLoopFinder(ProcedureStructure proc, Interval intNode, int graphLevel)
 {
     var nodesInInterval = intNode.FindIntervalNodes(graphLevel);
     return new SccLoopFinder(intNode, nodesInInterval);
 }