Package soot.toolkits.graph

Examples of soot.toolkits.graph.CompleteUnitGraph


                    continue;
                }

                JimpleBody body = (JimpleBody) method.retrieveActiveBody();

                CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);
                SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
                SimpleLocalUses localUses = new SimpleLocalUses(unitGraph,
                        localDefs);

                //  TokenTypeAnalysis typeAnalysis =
View Full Code Here


                    .hasNext();) {
                SootMethod method = (SootMethod) methods.next();

                JimpleBody body = (JimpleBody) method.retrieveActiveBody();

                CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);
                SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
                SimpleLocalUses localUses = new SimpleLocalUses(unitGraph,
                        localDefs);

                //  TokenTypeAnalysis typeAnalysis =
View Full Code Here

            while (doneSomething) {
                doneSomething = false;

                // System.out.println("Inlining tokens iteration " + count++);
                CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);

                // This will help us figure out where locals are defined.
                _localDefs = new SimpleLocalDefs(unitGraph);

                // Analyze and tokens that are constructed in this
View Full Code Here

                        throw new RuntimeException("unknown return type = "
                                + returnType);
                    }

                    // Reanalyze the locals... since this may have changed.
                    CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);
                    _localDefs = new SimpleLocalDefs(unitGraph);
                }
            }
        }
View Full Code Here

     *  fields.
     */
    public static void _removeSideEffectFreeMethodCalls(SootMethod method,
            CallGraph callGraph, SideEffectAnalysis analysis) {
        Body body = method.retrieveActiveBody();
        CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);

        // this will help us figure out where locals are defined.
        /*SimpleLocalDefs localDefs = */new SimpleLocalDefs(unitGraph);
        SimpleLiveLocals liveLocals = new SimpleLiveLocals(unitGraph);

View Full Code Here

        // Now loop through all the reachable uses of the new definition
        // and replace references to the local with references to the
        // static class.
        // FIXME this only traces through locals.  What if we set the
        // value to a field?
        CompleteUnitGraph unitGraph = new CompleteUnitGraph(containerBody);

        // this will help us figure out where locals are defined.
        SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
        SimpleLocalUses localUses = new SimpleLocalUses(unitGraph, localDefs);
        List useList = localUses.getUsesOf(newStmt);
View Full Code Here

        }

        // Resolve thisRef for this class.
        NamedObj referredObject = ModelTransformer.getObjectForClass(theClass);

        CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);

        // this will help us figure out where locals are defined.
        SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
        SimpleLocalUses localUses = new SimpleLocalUses(unitGraph, localDefs);
        NamedObjAnalysis namedObjAnalysis = new NamedObjAnalysis(method,
View Full Code Here

        if (debug) {
            System.out.println("Removing object comparisons in " + method);
        }

        JimpleBody body = (JimpleBody) method.retrieveActiveBody();
        CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);

        // this will help us figure out where locals are defined.
        SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
        SimpleLocalUses localUses = new SimpleLocalUses(unitGraph, localDefs);
View Full Code Here

     *  creation may have side effects that will not be seen.  We use
     *  this when we have knowledge of the given class that side
     *  effects are not possible, or that the object is immutable.
     */
    private static void _removeDeadObjectCreation(Body body, Set classSet) {
        CompleteUnitGraph unitGraph = new CompleteUnitGraph(body);

        // this will help us figure out where locals are defined.
        SimpleLocalDefs localDefs = new SimpleLocalDefs(unitGraph);
        SimpleLiveLocals liveLocals = new SimpleLiveLocals(unitGraph);

View Full Code Here

            Set unsafeLocalSet, boolean debug) {
        System.out.println("eliminating token casts and instanceofs in "
                + body.getMethod());
        // Analyze the types of variables which refer to tokens.
        TokenTypeAnalysis tokenTypes = new TokenTypeAnalysis(body.getMethod(),
                new CompleteUnitGraph(body));

        for (Iterator units = body.getUnits().iterator(); units.hasNext();) {
            Unit unit = (Unit) units.next();

            for (Iterator boxes = unit.getUseBoxes().iterator(); boxes
View Full Code Here

TOP

Related Classes of soot.toolkits.graph.CompleteUnitGraph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.