Пример #1
0
    public static IList <CfgLoop> GetLoops(ControlFlowGraph graph)
    {
        var components = graph.GetStronglyConnectedComponents();
        var loops      =
            from component in components.Where(x => x.Count > 1)
            from loop in graph.GetAllSimpleLoops(component)
            select GetLoopInformation(graph, loop);

        return(loops.ToList());
    }