Package soot.toolkits.scalar

Examples of soot.toolkits.scalar.SimpleLocalDefs


            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);

            for (Iterator units = body.getUnits().snapshotIterator(); units
                    .hasNext();) {
                Stmt unit = (Stmt) units.next();
View Full Code Here


            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);

            for (Iterator units = body.getUnits().snapshotIterator(); units
                    .hasNext();) {
                Stmt unit = (Stmt) units.next();
View Full Code Here

            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);

            for (Iterator units = body.getUnits().snapshotIterator(); units
                    .hasNext();) {
                Stmt unit = (Stmt) units.next();
View Full Code Here

    public SimpleLocalDefs getSimpleLocalDefs(Body body) {
        if (simpleLocalDefCache == null)
            simpleLocalDefCache = new HashMap<Body, SimpleLocalDefs>();
        if (!simpleLocalDefCache.containsKey(body)) {
            SimpleLocalDefs simpleLocalDefs = new SimpleLocalDefs(
                    new ExceptionalUnitGraph(body));
            simpleLocalDefCache.put(body, simpleLocalDefs);
        }
        return simpleLocalDefCache.get(body);
    }
View Full Code Here

     * @return the values the value can be assigned
     */
    public List<Value> getReachingValues(Value value, Stmt st, Body body) {
        List<Value> values = new ArrayList<Value>();
        if (value instanceof Local) {
            SimpleLocalDefs simpleLocalDefs = getSimpleLocalDefs(body);
            // find the actual type of the locals
            Local local = (Local) value;
            List<Unit> defsOfAt = simpleLocalDefs.getDefsOfAt(local, st);
            for (Unit unit : defsOfAt) {
                if (unit instanceof JAssignStmt) {
                    JAssignStmt assign = (JAssignStmt) unit;
                    values.add(assign.getRightOp());
                } else if (unit instanceof JIdentityStmt) {
View Full Code Here

        final boolean isNext = originatesFromNextCall(right, body, st);
        return !isNext;
    }

    private boolean originatesFromNextCall(JCastExpr right, Body body, Stmt st) {
        SimpleLocalDefs simpleLocalDefs = new SimpleLocalDefs(
                new ExceptionalUnitGraph(body));
        List<Unit> defsOfAt = simpleLocalDefs.getDefsOfAt(
                (Local) right.getOp(), st);
        // check all definitions, all must be invocations of next()
        for (Unit unit : defsOfAt) {
            if (unit instanceof AssignStmt) {
                AssignStmt assign = (AssignStmt) unit;
View Full Code Here

        return targetedWebApps;
    }

    public Set<Type> getReachingWebAppClassDescriptors(Value value, Stmt st,
            Body body) {
        SimpleLocalDefs simpleLocalDefs = resolver.getSimpleLocalDefs(body);
        return getReachingWebAppClassDescriptors(value, st, simpleLocalDefs,
                body.getMethod());
    }
View Full Code Here

TOP

Related Classes of soot.toolkits.scalar.SimpleLocalDefs

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.