コード例 #1
0
        public static Set <string> ComputeAnalizableMethods(Node node, PointsToAnalysis ptwe)
        {
            AnalyzableMethodFinder amf = new AnalyzableMethodFinder(ptwe);

            amf.Visit(node);
            return(amf.analizableMethods);
        }
コード例 #2
0
        public static CallGraph ComputeAnalyzableMethods(Node node)
        {
            Set <AssemblyNode> assemblies = new Set <AssemblyNode>();

            AnalyzableMethodFinder amf = new AnalyzableMethodFinder(node);

            if (node is AssemblyNode)
            {
                AssemblyNode assemblyNode = (AssemblyNode)node;
                amf.assemblies.Add(node);
                foreach (AssemblyReference reference in assemblyNode.AssemblyReferences)
                {
                    amf.assemblies.Add(reference.Assembly);
                }
            }
            amf.Visit(node);

            return(amf.cg);
        }
コード例 #3
0
        public static CallGraph ComputeAnalyzableMethods(Node node, PointsToAnalysis ptwe)
        {
            Set <AssemblyNode> assemblies = new Set <AssemblyNode>();

            // AnalyzableMethodFinder amf = new AnalyzableMethodFinder(node,);
            AnalyzableMethodFinder amf = new AnalyzableMethodFinder(ptwe);

            if (node is AssemblyNode)
            {
                AssemblyNode assemblyNode = (AssemblyNode)node;
                amf.assemblies.Add(node);
                foreach (AssemblyReference reference in assemblyNode.AssemblyReferences)
                {
                    amf.assemblies.Add(reference.Assembly);
                }
            }
            amf.Visit(node);

            /*
             * foreach (AssemblyNode an in amf.assemblies)
             * {
             *  Console.Out.WriteLine("*ENTRE*");
             *  amf.Visit(an);
             * }
             */

            // amf.Visit(node);
            if (PointsToAnalysis.verbose)
            {
                Set <CallGraph> cgs;
                cgs = new Set <CallGraph>();
                cgs.Add(amf.cg);
                CallGraph.GenerateDotGraph(Console.Out, cgs);
            }
            return(amf.cg);
        }