Package soot

Examples of soot.SootMethod


        // Find any assignment to the field in the class and convert
        // them to Exceptions, unless they are in constructors,
        // in which case remove them.
        for (Iterator methods = theClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod method = (SootMethod) methods.next();
            JimpleBody body = (JimpleBody) method.retrieveActiveBody();
            Chain units = body.getUnits();

            for (Iterator stmts = units.snapshotIterator(); stmts.hasNext();) {
                Stmt stmt = (Stmt) stmts.next();

                // Remove all the definitions.
                for (Iterator boxes = stmt.getDefBoxes().iterator(); boxes
                        .hasNext();) {
                    ValueBox box = (ValueBox) boxes.next();
                    Value value = box.getValue();

                    if (value instanceof FieldRef) {
                        FieldRef ref = (FieldRef) value;

                        if (ref.getField() == theField) {
                            System.out.println("removing stmt = " + stmt);
                            units.remove(stmt);
                        }
                    }
                }

                // Inline all the uses.
                if (Evaluator.isValueConstantValued(newValue)) {
                    for (Iterator boxes = stmt.getUseBoxes().iterator(); boxes
                            .hasNext();) {
                        ValueBox box = (ValueBox) boxes.next();
                        Value value = box.getValue();

                        if (value instanceof FieldRef) {
                            FieldRef ref = (FieldRef) value;

                            if (ref.getField() == theField) {
                                System.out.println("inlining stmt = " + stmt);

                                box.setValue(Evaluator
                                        .getConstantValueOf(newValue));
                            }
                        }
                    }
                }
            }
        }

        if (Modifier.isStatic(theField.getModifiers())) {
            SootMethod method;

            // create a class initializer if one does not already exist.
            if (theClass.declaresMethodByName("<clinit>")) {
                method = theClass.getMethodByName("<clinit>");
            } else {
                method = new SootMethod("<clinit>", new LinkedList(), NullType
                        .v(), Modifier.PUBLIC);
                theClass.addMethod(method);
            }

            JimpleBody body = (JimpleBody) method.retrieveActiveBody();
            Chain units = body.getUnits();
            Stmt insertPoint = (Stmt) units.getLast();
            Local local = Jimple.v().newLocal("_CGTemp" + theField.getName(),
                    theField.getType());
            body.getLocals().add(local);
            units.insertBefore(Jimple.v().newAssignStmt(local, newValue),
                    insertPoint);

            FieldRef fieldRef = Jimple.v()
                    .newStaticFieldRef(theField.makeRef());
            units.insertBefore(Jimple.v().newAssignStmt(fieldRef, local),
                    insertPoint);
        } else {
            for (Iterator methods = theClass.getMethods().iterator(); methods
                    .hasNext();) {
                SootMethod method = (SootMethod) methods.next();

                // ignore things that aren't initializers.
                if (!method.getName().equals("<init>")) {
                    continue;
                }

                JimpleBody body = (JimpleBody) method.retrieveActiveBody();
                Chain units = body.getUnits();
                Stmt insertPoint = (Stmt) units.getLast();
                Local local = Jimple.v().newLocal(
                        "_CGTemp" + theField.getName(), theField.getType());
                body.getLocals().add(local);
View Full Code Here


        // Copy the methods.
        Iterator methods = oldClass.getMethods().iterator();

        while (methods.hasNext()) {
            SootMethod oldMethod = (SootMethod) methods.next();

            SootMethod newMethod = new SootMethod(oldMethod.getName(),
                    oldMethod.getParameterTypes(), oldMethod.getReturnType(),
                    oldMethod.getModifiers(), oldMethod.getExceptions());
            newClass.addMethod(newMethod);

            JimpleBody body = Jimple.v().newBody(newMethod);
            body.importBodyContentsFrom(oldMethod.retrieveActiveBody());
            newMethod.setActiveBody(body);
        }

        changeTypesOfFields(newClass, oldClass, newClass);
        changeTypesInMethods(newClass, oldClass, newClass);
        return newClass;
View Full Code Here

        System.out.println("fixing references on " + theClass);
        System.out.println("replacing " + oldClass + " with " + newClass);
        ArrayList methodList = new ArrayList(theClass.getMethods());

        for (Iterator methods = methodList.iterator(); methods.hasNext();) {
            SootMethod newMethod = (SootMethod) methods.next();

            // System.out.println("newMethod = " + newMethod.getSignature());
            Type returnType = newMethod.getReturnType();

            if (returnType instanceof RefType
                    && (((RefType) returnType).getSootClass() == oldClass)) {
                newMethod.setReturnType(RefType.v(newClass));
            }

            List paramTypes = new LinkedList();

            for (Iterator oldParamTypes = newMethod.getParameterTypes()
                    .iterator(); oldParamTypes.hasNext();) {
                Type type = (Type) oldParamTypes.next();

                if (type instanceof RefType
                        && (((RefType) type).getSootClass() == oldClass)) {
                    paramTypes.add(RefType.v(newClass));
                } else if (type instanceof RefType
                        && (((RefType) type).getSootClass().getName()
                                .startsWith(oldClass.getName()))) {
                    SootClass changeClass = _getInnerClassCopy(oldClass,
                            ((RefType) type).getSootClass(), newClass);
                    paramTypes.add(RefType.v(changeClass));
                } else {
                    paramTypes.add(type);
                }
            }

            newMethod.setParameterTypes(paramTypes);

            // we have to do this seemingly useless
            // thing, since the scene caches a pointer
            // to the method based on it's parameter types.
            theClass.removeMethod(newMethod);
            theClass.addMethod(newMethod);

            Body newBody = newMethod.retrieveActiveBody();

            for (Iterator locals = newBody.getLocals().iterator(); locals
                    .hasNext();) {
                Local local = (Local) locals.next();
                Type type = local.getType();
View Full Code Here

    public static Local createRuntimeException(Body body, Unit unit,
            String string) {
        SootClass exceptionClass = Scene.v().getSootClass(
                "java.lang.RuntimeException");
        RefType exceptionType = RefType.v(exceptionClass);
        SootMethod initMethod = exceptionClass
                .getMethod("void <init>(java.lang.String)");

        Local local = Jimple.v().newLocal("exceptionLocal", exceptionType);
        body.getLocals().add(local);
        body.getUnits().insertBefore(
                Jimple.v().newAssignStmt(local,
                        Jimple.v().newNewExpr(exceptionType)), unit);
        body.getUnits().insertBefore(
                Jimple.v()
                        .newInvokeStmt(
                                Jimple.v().newSpecialInvokeExpr(local,
                                        initMethod.makeRef(),
                                        StringConstant.v(string))), unit);
        return local;
    }
View Full Code Here

            SootUtilities.foldClass(staticClass);
            superClass = staticClass.getSuperclass();
        }

        // Push the constructor code into the <clinit> method.
        SootMethod constructorMethod = (constructorStmt.getInvokeExpr())
                .getMethod();
        SootMethod staticConstructorMethod = staticClass
                .getMethod(constructorMethod.getSubSignature());

        SootMethod clinitMethod;

        // create a class initializer if one does not already exist.
        if (staticClass.declaresMethodByName("<clinit>")) {
            clinitMethod = staticClass.getMethodByName("<clinit>");
        } else {
            clinitMethod = new SootMethod("<clinit>", new LinkedList(),
                    NullType.v(), Modifier.STATIC);
            staticClass.addMethod(clinitMethod);
        }

        System.out.println("constructor = " + constructorStmt);

        constructorMethod.retrieveActiveBody();

        JimpleBody clinitBody = (JimpleBody) clinitMethod.retrieveActiveBody();
        Chain clinitUnits = clinitBody.getUnits();
        Stmt insertPoint = (Stmt) clinitUnits.getLast();

        // insert a (static) call to the (non static)
        // constructor.
        // Later we will come back and inline this after we make all the
        // method static.
        InvokeExpr constructorExpr = constructorStmt.getInvokeExpr();
        Stmt insertStmt = Jimple.v().newInvokeStmt(
                Jimple.v().newStaticInvokeExpr(
                        staticConstructorMethod.makeRef(),
                        constructorExpr.getArgs()));
        clinitUnits.insertBefore(insertStmt, insertPoint);

        // Loop through the class and make all the non-static method static.
        // Make all reference to this into static references.
        ArrayList methodList = new ArrayList(staticClass.getMethods());

        for (Iterator methods = methodList.iterator(); methods.hasNext();) {
            SootMethod method = (SootMethod) methods.next();

            // ignore static methods.
            if (method.isStatic()) {
                continue;
            }

            System.out.println("method = " + method);

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

            Local thisLocal = body.getThisLocal();

            // If we have an init method, then remove specialinvoke calls.
            // These are calls to the superclass,
            // and no longer make sense.
            if (method.getName().equals("<init>")) {
                Iterator units = body.getUnits().snapshotIterator();

                while (units.hasNext()) {
                    Stmt s = (Stmt) units.next();

                    if (s instanceof InvokeStmt
                            && ((InvokeStmt) s).getInvokeExpr() instanceof SpecialInvokeExpr) {
                        body.getUnits().remove(s);
                        break;
                    }
                }

                // and rename the method to something that is not reserved
                // so we can call it manually.
                method.setName("_init");
            }

            // FIXME: checks for equality with thisLocal.  What if
            // thisLocal is aliased in another local?  Maybe we should
            // run the CopyPropagator somewhere here?
            // change method calls to static invocation
            for (Iterator useBoxes = body.getUseAndDefBoxes().iterator(); useBoxes
                    .hasNext();) {
                ValueBox box = (ValueBox) useBoxes.next();

                if (box.getValue() instanceof InstanceInvokeExpr) {
                    InstanceInvokeExpr expr = (InstanceInvokeExpr) box
                            .getValue();
                    Local local = (Local) expr.getBase();

                    if (local == thisLocal) {
                        System.out.println("fixing invoke = " + expr);
                        box.setValue(Jimple.v().newStaticInvokeExpr(
                                expr.getMethod().makeRef(), expr.getArgs()));
                    }
                } else if (box.getValue() instanceof InstanceFieldRef) {
                    InstanceFieldRef expr = (InstanceFieldRef) box.getValue();
                    Local local = (Local) expr.getBase();

                    if (local == thisLocal) {
                        System.out.println("fixing field = " + expr);
                        box.setValue(Jimple.v().newStaticFieldRef(
                                expr.getField().makeRef()));
                    }
                }
            }

            // Fix synchronization locks.  Anything synchronized on this
            // should instead be synchronized on the class.
            for (Iterator stmts = body.getUnits().snapshotIterator(); stmts
                    .hasNext();) {
                Stmt stmt = (Stmt) stmts.next();

                if (stmt instanceof MonitorStmt) {
                    MonitorStmt monitorStmt = (MonitorStmt) stmt;
                    Local lock = (Local) monitorStmt.getOp();

                    if (lock == thisLocal) {
                        Local classLocal = SynchronizerManager.v()
                                .addStmtsToFetchClassBefore(body, stmt);
                        monitorStmt.setOp(classLocal);
                    }
                }
            }

            // remove the this identity statement.
            Iterator units = body.getUnits().snapshotIterator();

            while (units.hasNext()) {
                Stmt s = (Stmt) units.next();

                if (s instanceof IdentityStmt
                        && ((IdentityStmt) s).getRightOp() instanceof ThisRef) {
                    body.getUnits().remove(s);
                }
            }

            // make the method static.
            method.setModifiers(method.getModifiers() | Modifier.STATIC);
        }

        // Loop through the class and make all the non-static fields static.
        // Make all reference to this into static references.
        for (Iterator fields = staticClass.getFields().iterator(); fields
View Full Code Here

        // Now create new methods in the given class for methods that
        // exist in the super class, but not in the given class.
        // Invoke the super class.
        for (Iterator methods = superClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod oldMethod = (SootMethod) methods.next();

            if (theClass.declaresMethod(oldMethod.getSubSignature())) {
                continue;
            }

            oldMethod.retrieveActiveBody();

            SootMethod newMethod = new SootMethod(oldMethod.getName(),
                    oldMethod.getParameterTypes(), oldMethod.getReturnType(),
                    oldMethod.getModifiers(), oldMethod.getExceptions());
            theClass.addMethod(newMethod);

            JimpleBody newBody = Jimple.v().newBody(newMethod);
            newMethod.setActiveBody(newBody);
            newBody.insertIdentityStmts();

            //System.out.println("method = " + newMethod);
            //System.out.println("oldMethod = " + oldMethod);
            // Call the super method
            Chain units = newBody.getUnits();

            // get a list of the locals that reference
            // the parameters of the
            // constructor.
            List parameterList = new ArrayList();
            parameterList.addAll(newBody.getLocals());

            Stmt invokeStmt = null;

            // Invoke the method...
            // handling static and void methods differently
            if (oldMethod.getReturnType() == VoidType.v()) {
                InvokeExpr invokeExpr;

                if (newMethod.isStatic()) {
                    invokeExpr = Jimple.v().newStaticInvokeExpr(
                            oldMethod.makeRef(), parameterList);
                } else {
                    Local thisLocal = newBody.getThisLocal();
                    parameterList.remove(thisLocal);
                    invokeExpr = Jimple.v().newVirtualInvokeExpr(thisLocal,
                            oldMethod.makeRef(), parameterList);
                }

                invokeStmt = Jimple.v().newInvokeStmt(invokeExpr);
                units.add(invokeStmt);

                // return void
                units.add(Jimple.v().newReturnVoidStmt());
            } else {
                InvokeExpr invokeExpr;

                // Create a new local for the return value.
                Local returnValueLocal = Jimple.v().newLocal("returnValue",
                        oldMethod.getReturnType());
                newBody.getLocals().add(returnValueLocal);

                if (newMethod.isStatic()) {
                    invokeExpr = Jimple.v().newStaticInvokeExpr(
                            oldMethod.makeRef(), parameterList);
                } else {
                    Local thisLocal = newBody.getThisLocal();
                    parameterList.remove(thisLocal);
                    invokeExpr = Jimple.v().newVirtualInvokeExpr(thisLocal,
                            oldMethod.makeRef(), parameterList);
                }

                invokeStmt = Jimple.v().newAssignStmt(returnValueLocal,
                        invokeExpr);
                units.add(invokeStmt);

                // return the value
                units.add(Jimple.v().newReturnStmt(returnValueLocal));
            }
        }

        // Loop through all the methods again, this time looking for
        // method invocations on the old superClass...  Inline these calls.
        // This code is similar to inlineCallsToMethod, but avoids iterating
        // over all the methods in the class twice, which could get
        // very expensive.
        for (Iterator methods = theClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod newMethod = (SootMethod) methods.next();
            Body newBody = newMethod.retrieveActiveBody();

            // use a snapshotIterator since we are going to be manipulating
            // the statements.
            Iterator j = newBody.getUnits().snapshotIterator();

            while (j.hasNext()) {
                Stmt stmt = (Stmt) j.next();

                System.out.println("stmt = " + stmt);
                Iterator boxes = stmt.getUseAndDefBoxes().iterator();

                while (boxes.hasNext()) {
                    ValueBox box = (ValueBox) boxes.next();
                    Value value = box.getValue();

                    if (value instanceof FieldRef) {
                        // Fix references to fields
                        FieldRef r = (FieldRef) value;
                        SootFieldRef fieldRef = r.getFieldRef();

                        if (r.getField().getDeclaringClass() != superClass
                                && fieldRef.declaringClass() == superClass) {
                            // We might also have a reference to a method
                            // which is not actually declared in the
                            // superclass, in which case, we just fix up
                            // the ref to point to the new super class
                            r.setFieldRef(Scene.v().makeFieldRef(
                                    superClass.getSuperclass(),
                                    fieldRef.name(), fieldRef.type(),
                                    fieldRef.isStatic()));
                        }
                    }
                }
                if (stmt.containsInvokeExpr()) {
                    InvokeExpr invoke = stmt.getInvokeExpr();
                    SootMethodRef invokeMethodRef = invoke.getMethodRef();
                    SootMethod invokeMethod = invoke.getMethod();

                    if (invokeMethod.getDeclaringClass() == superClass) {

                        // Force the body of the thing we are inlining to be
                        // loaded
                        try {
                            if (invokeMethod.isConcrete()) {
                                invokeMethod.retrieveActiveBody();
                            } else {
                                System.out.println("SootUtilities."
                                        + "foldClass() " + invokeMethod
                                        + " is not concrete!");

                                // javac -target 1.2 and greater
                                // ends up causing problems here when
                                // calling super on a method, but the
                                // direct parent does not have a
                                // method by that name.
                                //
                                // If I have 3 classes A, B and C,
                                // where C extends B which extends A
                                // and A and C define a method foo and
                                // C calls super.foo, then under javac
                                // -target 1.2 the constant pool ends
                                // up with a reference to
                                // [2] methodref=soot/coffi/B.foo
                                // and under javac -target 1.1, we end up with
                                // [2] methodref=soot/coffi/A.foo
                                // So, we look for the method in the superclass
                                SootClass scratchClass = invokeMethod
                                        .getDeclaringClass();

                                while (scratchClass.hasSuperclass()) {
                                    SootClass superC = scratchClass
                                            .getSuperclass();

                                    if (superC.declaresMethod(invokeMethod
                                            .getSubSignature())) {
                                        invokeMethod = superC
                                                .getMethod(invokeMethod
                                                        .getSubSignature());
                                        System.out.println("SootUtilties."
                                                + "foldClass() " + "found "
                                                + superC + " " + invokeMethod);
                                        invokeMethod.retrieveActiveBody();
                                        break;
                                    }

                                    scratchClass = superC;
                                }
View Full Code Here

                    _options);
            SootClass entityClass = Scene.v().loadClassAndSupport(className);

            for (Iterator methods = entityClass.getMethods().iterator(); methods
                    .hasNext();) {
                SootMethod method = (SootMethod) methods.next();
                eliminateNamedObjComparisons(method, _debug);
            }

            // Recurse
            if (entity instanceof CompositeActor) {
View Full Code Here

        HashMap tempCreatedMap = new HashMap();

        // Populate the method to initialize this instance.
        // We need to put something here before folding so that
        // the folder can deal with it.
        SootMethod initMethod = entityInstanceClass.getInitMethod();

        {
            JimpleBody body = Jimple.v().newBody(initMethod);
            initMethod.setActiveBody(body);

            // return void
            body.getUnits().add(Jimple.v().newReturnVoidStmt());
        }

        SootClass theClass = entityInstanceClass;
        SootClass superClass = theClass.getSuperclass();

        while ((superClass != PtolemyUtilities.objectClass)
                && (superClass != PtolemyUtilities.actorClass)
                && (superClass != PtolemyUtilities.compositeActorClass)) {
            superClass.setLibraryClass();
            try {
                SootUtilities.foldClass(theClass);
            } catch (RuntimeException exception) {
                throw new RuntimeException("Failed to fold \"" + theClass
                        + "\"", exception);
            }
            superClass = theClass.getSuperclass();
        }

        // Go through all the initialization code and remove any old
        // parameter initialization code.  This has to happen after
        // class folding so that all of the parameter initialization
        // is available, but before we add the correct initialization.
        // FIXME: This needs to look at all code that is reachable
        // from a constructor.
        _removeAttributeInitialization(theClass);

        Entity classEntity = null;

        try {
            classEntity = (Entity) ModelTransformer._findDeferredInstance(
                    entity).clone(null);

            // The cloning process results an object that defers change
            // requests.  By default, we do not want to defer change
            // requests, but more importantly, we need to execute
            // any change requests that may have been queued
            // during cloning. The following call does that.
            classEntity.setDeferringChangeRequests(false);
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        ModelTransformer.updateCreatedSet(entity.getFullName(), classEntity,
                classEntity, tempCreatedMap);

        // Create methods that will compute and set the values of the
        // parameters of this actor.
        ModelTransformer.createAttributeComputationFunctions(entity, entity,
                entityInstanceClass, constAnalysis);

        {
            // replace the previous dummy body
            // for the initialization method with a new one.
            JimpleBody body = Jimple.v().newBody(initMethod);
            initMethod.setActiveBody(body);
            body.insertIdentityStmts();

            Chain units = body.getUnits();
            Local thisLocal = body.getThisLocal();

            // create attributes for those in the class
            ModelTransformer.createAttributes(body, entity, thisLocal, entity,
                    thisLocal, entityInstanceClass, tempCreatedMap);

            // Create and initialize ports
            ModelTransformer.createPorts(body, thisLocal, entity, thisLocal,
                    entity, entityInstanceClass, tempCreatedMap);

            // Extra initialization necessary?
            Stmt insertPoint = Jimple.v().newNopStmt();
            body.getUnits().add(insertPoint);

            ModelTransformer.initializeAttributesBefore(body, insertPoint,
                    entity, thisLocal, entity, thisLocal, entityInstanceClass);

            // return void
            units.add(Jimple.v().newReturnVoidStmt());
        }

        // Remove super calls to the executable interface.
        // FIXME: This would be nice to do by inlining instead of
        // special casing.
        ModelTransformer.implementExecutableInterface(entityInstanceClass);

        {
            // Add code to the beginning of the preinitialize method that
            // initializes the attributes.
            SootMethod method = theClass.getMethodByName("preinitialize");
            JimpleBody body = (JimpleBody) method.getActiveBody();

            /* Stmt insertPoint = */body.getFirstNonIdentityStmt();

            // Do we initialize parameters in preinitialize or in the
            // constructor?
View Full Code Here

    }

    private static void _removeAttributeInitialization(SootClass theClass) {
        for (Iterator methods = theClass.getMethods().iterator(); methods
                .hasNext();) {
            SootMethod method = (SootMethod) methods.next();

            // Only do this in the constructor.  FIXME: should also
            // include things reachable from the constructor....
            if (!method.getName().equals("<init>")) {
                continue;
            }

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

            for (Iterator units = body.getUnits().snapshotIterator(); units
                    .hasNext();) {
                Stmt stmt = (Stmt) units.next();

                if (!stmt.containsInvokeExpr()) {
                    continue;
                }

                InvokeExpr r = stmt.getInvokeExpr();

                // This is steve...
                // This is steve gacking at the ugliest code
                // he's written in a while.   See steve gack.
                // gack steve, gack.
                // This is Christopher.
                // This is Christopher gacking on Steve's code
                // gack Christopher, gack.
                // See Christopher come back to this code years later
                // and gack again
                // gack Christopher, gack.
                if (r.getMethod().getName().equals("attributeChanged")
                        || r.getMethod().getName().equals("setExpression")
                        || r.getMethod().getName().equals("setToken")
                        || r.getMethod().getName().equals(
                                "setTokenConsumptionRate")
                        || r.getMethod().getName().equals(
                                "setTokenProductionRate")
                        || r.getMethod().getName().equals(
                                "setTokenInitProduction")
                        || r.getMethod().getName().equals("setVisibility")) {
                    body.getUnits().remove(stmt);
                }

                if (r.getMethod().getSubSignature().equals(
                        PtolemyUtilities.variableConstructorWithToken
                                .getSubSignature())) {
                    SootClass variableClass = r.getMethod().getDeclaringClass();
                    SootMethod constructorWithoutToken = variableClass
                            .getMethod(PtolemyUtilities.variableConstructorWithoutToken
                                    .getSubSignature());

                    // Replace the three-argument
                    // constructor with a two-argument
                    // constructor.  We do this for
                    // several reasons:
                    // 1) The assignment is
                    // redundant...  all parameters
                    // are initialized with the
                    // appropriate value.
                    // 2) The type of the token is
                    // often wrong for polymorphic
                    // actors.
                    // 3) Later on, when we inline all
                    // token constructors, there is no
                    // longer a token to pass to the
                    // constructor.  It is easier to
                    // just deal with it now...
                    // Create a new two-argument constructor.
                    InstanceInvokeExpr expr = (InstanceInvokeExpr) r;
                    stmt.getInvokeExprBox().setValue(
                            Jimple.v().newSpecialInvokeExpr(
                                    (Local) expr.getBase(),
                                    constructorWithoutToken.makeRef(),
                                    r.getArg(0), r.getArg(1)));
                }
            }
        }
    }
View Full Code Here

            LocalUses localUses) throws IllegalActionException {
        if (_debug) {
            System.out.println("inlineTypeLatticeMethods:\n\t" + method
                    + "\n\t" + unit + "\n\t" + expr);
        }
        SootMethod tokenTokenCompareMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("int compare(ptolemy.data.Token,ptolemy.data.Token)");
        SootMethod tokenTypeCompareMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("int compare(ptolemy.data.Token,ptolemy.data.type.Type)");
        SootMethod typeTokenCompareMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("int compare(ptolemy.data.type.Type,ptolemy.data.Token)");
        SootMethod typeTypeCompareMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("int compare(ptolemy.data.type.Type,ptolemy.data.type.Type)");
        SootMethod leastUpperBoundMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("ptolemy.data.type.Type leastUpperBound(ptolemy.data.type.Type,ptolemy.data.type.Type)");
        SootMethod latticeMethod = PtolemyUtilities.typeLatticeClass
                .getMethod("ptolemy.graph.CPO lattice()");

        ptolemy.data.type.Type type1;
        ptolemy.data.type.Type type2;
View Full Code Here

TOP

Related Classes of soot.SootMethod

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.