Package soot.grimp

Class Grimp


  • public class Grimp
    extends Object
    The Grimp class contains all the constructors for the components of the Grimp grammar for the Grimp body.

    Immediate -> Local | Constant
    RValue -> Local | Constant | ConcreteRef | Expr
    Variable -> Local | ArrayRef | InstanceFieldRef | StaticFieldRef
    • Method Detail

      • v

        public static Grimp v()
      • newXorExpr

        public XorExpr newXorExpr​(Value op1,
                                  Value op2)
        Constructs a XorExpr(Expr, Expr) grammar chunk.
      • newUshrExpr

        public UshrExpr newUshrExpr​(Value op1,
                                    Value op2)
        Constructs a UshrExpr(Expr, Expr) grammar chunk.
      • newSubExpr

        public SubExpr newSubExpr​(Value op1,
                                  Value op2)
        Constructs a SubExpr(Expr, Expr) grammar chunk.
      • newShrExpr

        public ShrExpr newShrExpr​(Value op1,
                                  Value op2)
        Constructs a ShrExpr(Expr, Expr) grammar chunk.
      • newShlExpr

        public ShlExpr newShlExpr​(Value op1,
                                  Value op2)
        Constructs a ShlExpr(Expr, Expr) grammar chunk.
      • newRemExpr

        public RemExpr newRemExpr​(Value op1,
                                  Value op2)
        Constructs a RemExpr(Expr, Expr) grammar chunk.
      • newOrExpr

        public OrExpr newOrExpr​(Value op1,
                                Value op2)
        Constructs a OrExpr(Expr, Expr) grammar chunk.
      • newNeExpr

        public NeExpr newNeExpr​(Value op1,
                                Value op2)
        Constructs a NeExpr(Expr, Expr) grammar chunk.
      • newMulExpr

        public MulExpr newMulExpr​(Value op1,
                                  Value op2)
        Constructs a MulExpr(Expr, Expr) grammar chunk.
      • newLeExpr

        public LeExpr newLeExpr​(Value op1,
                                Value op2)
        Constructs a LeExpr(Expr, Expr) grammar chunk.
      • newGeExpr

        public GeExpr newGeExpr​(Value op1,
                                Value op2)
        Constructs a GeExpr(Expr, Expr) grammar chunk.
      • newEqExpr

        public EqExpr newEqExpr​(Value op1,
                                Value op2)
        Constructs a EqExpr(Expr, Expr) grammar chunk.
      • newDivExpr

        public DivExpr newDivExpr​(Value op1,
                                  Value op2)
        Constructs a DivExpr(Expr, Expr) grammar chunk.
      • newCmplExpr

        public CmplExpr newCmplExpr​(Value op1,
                                    Value op2)
        Constructs a CmplExpr(Expr, Expr) grammar chunk.
      • newCmpgExpr

        public CmpgExpr newCmpgExpr​(Value op1,
                                    Value op2)
        Constructs a CmpgExpr(Expr, Expr) grammar chunk.
      • newCmpExpr

        public CmpExpr newCmpExpr​(Value op1,
                                  Value op2)
        Constructs a CmpExpr(Expr, Expr) grammar chunk.
      • newGtExpr

        public GtExpr newGtExpr​(Value op1,
                                Value op2)
        Constructs a GtExpr(Expr, Expr) grammar chunk.
      • newLtExpr

        public LtExpr newLtExpr​(Value op1,
                                Value op2)
        Constructs a LtExpr(Expr, Expr) grammar chunk.
      • newAddExpr

        public AddExpr newAddExpr​(Value op1,
                                  Value op2)
        Constructs a AddExpr(Expr, Expr) grammar chunk.
      • newAndExpr

        public AndExpr newAndExpr​(Value op1,
                                  Value op2)
        Constructs a AndExpr(Expr, Expr) grammar chunk.
      • newNegExpr

        public NegExpr newNegExpr​(Value op)
        Constructs a NegExpr(Expr, Expr) grammar chunk.
      • newLengthExpr

        public LengthExpr newLengthExpr​(Value op)
        Constructs a LengthExpr(Expr) grammar chunk.
      • newCastExpr

        public CastExpr newCastExpr​(Value op1,
                                    Type t)
        Constructs a CastExpr(Expr, Type) grammar chunk.
      • newInstanceOfExpr

        public InstanceOfExpr newInstanceOfExpr​(Value op1,
                                                Type t)
        Constructs a InstanceOfExpr(Expr, Type) grammar chunk.
      • newNewArrayExpr

        public NewArrayExpr newNewArrayExpr​(Type type,
                                            Value size)
        Constructs a NewArrayExpr(Type, Expr) grammar chunk.
      • newNewMultiArrayExpr

        public NewMultiArrayExpr newNewMultiArrayExpr​(ArrayType type,
                                                      List sizes)
        Constructs a NewMultiArrayExpr(ArrayType, List of Expr) grammar chunk.
      • newStaticInvokeExpr

        public StaticInvokeExpr newStaticInvokeExpr​(SootMethodRef method,
                                                    List args)
        Constructs a StaticInvokeExpr(ArrayType, List of Expr) grammar chunk.
      • newSpecialInvokeExpr

        public SpecialInvokeExpr newSpecialInvokeExpr​(Local base,
                                                      SootMethodRef method,
                                                      List args)
        Constructs a SpecialInvokeExpr(Local base, SootMethodRef method, List of Expr) grammar chunk.
      • newVirtualInvokeExpr

        public VirtualInvokeExpr newVirtualInvokeExpr​(Local base,
                                                      SootMethodRef method,
                                                      List args)
        Constructs a VirtualInvokeExpr(Local base, SootMethodRef method, List of Expr) grammar chunk.
      • newInterfaceInvokeExpr

        public InterfaceInvokeExpr newInterfaceInvokeExpr​(Local base,
                                                          SootMethodRef method,
                                                          List args)
        Constructs a InterfaceInvokeExpr(Local base, SootMethodRef method, List of Expr) grammar chunk.
      • newThrowStmt

        public ThrowStmt newThrowStmt​(Value op)
        Constructs a ThrowStmt(Expr) grammar chunk.
      • newExitMonitorStmt

        public ExitMonitorStmt newExitMonitorStmt​(Value op)
        Constructs a ExitMonitorStmt(Expr) grammar chunk
      • newEnterMonitorStmt

        public EnterMonitorStmt newEnterMonitorStmt​(Value op)
        Constructs a EnterMonitorStmt(Expr) grammar chunk.
      • newBreakpointStmt

        public BreakpointStmt newBreakpointStmt()
        Constructs a BreakpointStmt() grammar chunk.
      • newGotoStmt

        public GotoStmt newGotoStmt​(Unit target)
        Constructs a GotoStmt(Stmt) grammar chunk.
      • newNopStmt

        public NopStmt newNopStmt()
        Constructs a NopStmt() grammar chunk.
      • newReturnVoidStmt

        public ReturnVoidStmt newReturnVoidStmt()
        Constructs a ReturnVoidStmt() grammar chunk.
      • newReturnStmt

        public ReturnStmt newReturnStmt​(Value op)
        Constructs a ReturnStmt(Expr) grammar chunk.
      • newIfStmt

        public IfStmt newIfStmt​(Value condition,
                                Unit target)
        Constructs a IfStmt(Condition, Stmt) grammar chunk.
      • newIdentityStmt

        public IdentityStmt newIdentityStmt​(Value local,
                                            Value identityRef)
        Constructs a IdentityStmt(Local, IdentityRef) grammar chunk.
      • newAssignStmt

        public AssignStmt newAssignStmt​(Value variable,
                                        Value rvalue)
        Constructs a AssignStmt(Variable, RValue) grammar chunk.
      • newInvokeStmt

        public InvokeStmt newInvokeStmt​(Value op)
        Constructs a InvokeStmt(InvokeExpr) grammar chunk.
      • newTableSwitchStmt

        public TableSwitchStmt newTableSwitchStmt​(Value key,
                                                  int lowIndex,
                                                  int highIndex,
                                                  List targets,
                                                  Unit defaultTarget)
        Constructs a TableSwitchStmt(Expr, int, int, List of Unit, Stmt) grammar chunk.
      • newLookupSwitchStmt

        public LookupSwitchStmt newLookupSwitchStmt​(Value key,
                                                    List lookupValues,
                                                    List targets,
                                                    Unit defaultTarget)
        Constructs a LookupSwitchStmt(Expr, List of Expr, List of Unit, Stmt) grammar chunk.
      • newLocal

        public Local newLocal​(String name,
                              Type t)
        Constructs a Local with the given name and type.
      • newTrap

        public Trap newTrap​(SootClass exception,
                            Unit beginStmt,
                            Unit endStmt,
                            Unit handlerStmt)
        Constructs a new Trap for the given exception on the given Stmt range with the given Stmt handler.
      • newTrap

        public Trap newTrap​(Trap trap)
      • newStaticFieldRef

        public StaticFieldRef newStaticFieldRef​(SootFieldRef f)
        Constructs a StaticFieldRef(SootFieldRef) grammar chunk.
      • newThisRef

        public ThisRef newThisRef​(RefType t)
        Constructs a ThisRef(RefType) grammar chunk.
      • newParameterRef

        public ParameterRef newParameterRef​(Type paramType,
                                            int number)
        Constructs a ParameterRef(SootMethod, int) grammar chunk.
      • newInstanceFieldRef

        public InstanceFieldRef newInstanceFieldRef​(Value base,
                                                    SootFieldRef f)
        Constructs a InstanceFieldRef(Value, SootFieldRef) grammar chunk.
      • newCaughtExceptionRef

        public CaughtExceptionRef newCaughtExceptionRef()
        Constructs a CaughtExceptionRef() grammar chunk.
      • newArrayRef

        public ArrayRef newArrayRef​(Value base,
                                    Value index)
        Constructs a ArrayRef(Local, Expr) grammar chunk.
      • newVariableBox

        public ValueBox newVariableBox​(Value value)
      • newImmediateBox

        public ValueBox newImmediateBox​(Value value)
      • newIdentityRefBox

        public ValueBox newIdentityRefBox​(Value value)
      • newConditionExprBox

        public ValueBox newConditionExprBox​(Value value)
      • newInvokeExprBox

        public ValueBox newInvokeExprBox​(Value value)
      • newStmtBox

        public UnitBox newStmtBox​(Unit unit)
      • newExpr

        public Value newExpr​(Value value)
        Carries out the mapping from other Value's to Grimp Value's
      • newBody

        public GrimpBody newBody​(SootMethod m)
        Returns an empty GrimpBody associated with method m.
      • newBody

        public GrimpBody newBody​(Body b,
                                 String phase)
        Returns a GrimpBody constructed from b.
      • cloneIfNecessary

        public static Value cloneIfNecessary​(Value val)