Methods Summary |
---|
private LocalVariables | locals()The LocalVariables from the current Frame we're operating on.
return frame.getLocals();
|
public void | setConstantPoolGen(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)Sets the ConstantPoolGen needed for symbolic execution.
this.cpg = cpg;
|
public void | setFrame(Frame f)The only method granting access to the single instance of
the ExecutionVisitor class. Before actively using this
instance, SET THE ConstantPoolGen FIRST.
this.frame = f;
|
private OperandStack | stack()The OperandStack from the current Frame we're operating on.
return frame.getStack();
|
public void | visitAALOAD(com.sun.org.apache.bcel.internal.generic.AALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop(); // pop the index int
//System.out.print(stack().peek());
Type t = stack().pop(); // Pop Array type
if (t == Type.NULL){
stack().push(Type.NULL);
} // Do nothing stackwise --- a NullPointerException is thrown at Run-Time
else{
ArrayType at = (ArrayType) t;
stack().push(at.getElementType());
}
|
public void | visitAASTORE(com.sun.org.apache.bcel.internal.generic.AASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitACONST_NULL(com.sun.org.apache.bcel.internal.generic.ACONST_NULL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.NULL);
|
public void | visitALOAD(com.sun.org.apache.bcel.internal.generic.ALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(locals().get(o.getIndex()));
|
public void | visitANEWARRAY(com.sun.org.apache.bcel.internal.generic.ANEWARRAY o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop(); //count
stack().push( new ArrayType(o.getType(cpg), 1) );
|
public void | visitARETURN(com.sun.org.apache.bcel.internal.generic.ARETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitARRAYLENGTH(com.sun.org.apache.bcel.internal.generic.ARRAYLENGTH o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitASTORE(com.sun.org.apache.bcel.internal.generic.ASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
locals().set(o.getIndex(), stack().pop());
//System.err.println("TODO-DEBUG: set LV '"+o.getIndex()+"' to '"+locals().get(o.getIndex())+"'.");
|
public void | visitATHROW(com.sun.org.apache.bcel.internal.generic.ATHROW o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
stack().clear();
if (t.equals(Type.NULL))
stack().push(Type.getType("Ljava/lang/NullPointerException;"));
else
stack().push(t);
|
public void | visitBALOAD(com.sun.org.apache.bcel.internal.generic.BALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitBASTORE(com.sun.org.apache.bcel.internal.generic.BASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitBIPUSH(com.sun.org.apache.bcel.internal.generic.BIPUSH o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.INT);
|
public void | visitCALOAD(com.sun.org.apache.bcel.internal.generic.CALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitCASTORE(com.sun.org.apache.bcel.internal.generic.CASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitCHECKCAST(com.sun.org.apache.bcel.internal.generic.CHECKCAST o)Symbolically executes the corresponding Java Virtual Machine instruction.
// It's possibly wrong to do so, but SUN's
// ByteCode verifier seems to do (only) this, too.
// TODO: One could use a sophisticated analysis here to check
// if a type cannot possibly be cated to another and by
// so doing predict the ClassCastException at run-time.
stack().pop();
stack().push(o.getType(cpg));
|
public void | visitD2F(com.sun.org.apache.bcel.internal.generic.D2F o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitD2I(com.sun.org.apache.bcel.internal.generic.D2I o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitD2L(com.sun.org.apache.bcel.internal.generic.D2L o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.LONG);
|
public void | visitDADD(com.sun.org.apache.bcel.internal.generic.DADD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDALOAD(com.sun.org.apache.bcel.internal.generic.DALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDASTORE(com.sun.org.apache.bcel.internal.generic.DASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitDCMPG(com.sun.org.apache.bcel.internal.generic.DCMPG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitDCMPL(com.sun.org.apache.bcel.internal.generic.DCMPL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitDCONST(com.sun.org.apache.bcel.internal.generic.DCONST o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.DOUBLE);
|
public void | visitDDIV(com.sun.org.apache.bcel.internal.generic.DDIV o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDLOAD(com.sun.org.apache.bcel.internal.generic.DLOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.DOUBLE);
|
public void | visitDMUL(com.sun.org.apache.bcel.internal.generic.DMUL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDNEG(com.sun.org.apache.bcel.internal.generic.DNEG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDREM(com.sun.org.apache.bcel.internal.generic.DREM o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDRETURN(com.sun.org.apache.bcel.internal.generic.DRETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitDSTORE(com.sun.org.apache.bcel.internal.generic.DSTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
locals().set(o.getIndex(), stack().pop());
locals().set(o.getIndex()+1, Type.UNKNOWN);
|
public void | visitDSUB(com.sun.org.apache.bcel.internal.generic.DSUB o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitDUP(com.sun.org.apache.bcel.internal.generic.DUP o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
stack().push(t);
stack().push(t);
|
public void | visitDUP2(com.sun.org.apache.bcel.internal.generic.DUP2 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
if (t.getSize() == 2){
stack().push(t);
stack().push(t);
}
else{ // t.getSize() is 1
Type u = stack().pop();
stack().push(u);
stack().push(t);
stack().push(u);
stack().push(t);
}
|
public void | visitDUP2_X1(com.sun.org.apache.bcel.internal.generic.DUP2_X1 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
if (t.getSize() == 2){
Type u = stack().pop();
stack().push(t);
stack().push(u);
stack().push(t);
}
else{ //t.getSize() is1
Type u = stack().pop();
Type v = stack().pop();
stack().push(u);
stack().push(t);
stack().push(v);
stack().push(u);
stack().push(t);
}
|
public void | visitDUP2_X2(com.sun.org.apache.bcel.internal.generic.DUP2_X2 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
if (t.getSize() == 2){
Type u = stack().pop();
if (u.getSize() == 2){
stack().push(t);
stack().push(u);
stack().push(t);
}else{
Type v = stack().pop();
stack().push(t);
stack().push(v);
stack().push(u);
stack().push(t);
}
}
else{ //t.getSize() is 1
Type u = stack().pop();
Type v = stack().pop();
if (v.getSize() == 2){
stack().push(u);
stack().push(t);
stack().push(v);
stack().push(u);
stack().push(t);
}else{
Type w = stack().pop();
stack().push(u);
stack().push(t);
stack().push(w);
stack().push(v);
stack().push(u);
stack().push(t);
}
}
|
public void | visitDUP_X1(com.sun.org.apache.bcel.internal.generic.DUP_X1 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type w1 = stack().pop();
Type w2 = stack().pop();
stack().push(w1);
stack().push(w2);
stack().push(w1);
|
public void | visitDUP_X2(com.sun.org.apache.bcel.internal.generic.DUP_X2 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type w1 = stack().pop();
Type w2 = stack().pop();
if (w2.getSize() == 2){
stack().push(w1);
stack().push(w2);
stack().push(w1);
}
else{
Type w3 = stack().pop();
stack().push(w1);
stack().push(w3);
stack().push(w2);
stack().push(w1);
}
|
public void | visitF2D(com.sun.org.apache.bcel.internal.generic.F2D o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitF2I(com.sun.org.apache.bcel.internal.generic.F2I o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitF2L(com.sun.org.apache.bcel.internal.generic.F2L o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.LONG);
|
public void | visitFADD(com.sun.org.apache.bcel.internal.generic.FADD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFALOAD(com.sun.org.apache.bcel.internal.generic.FALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFASTORE(com.sun.org.apache.bcel.internal.generic.FASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitFCMPG(com.sun.org.apache.bcel.internal.generic.FCMPG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitFCMPL(com.sun.org.apache.bcel.internal.generic.FCMPL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitFCONST(com.sun.org.apache.bcel.internal.generic.FCONST o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.FLOAT);
|
public void | visitFDIV(com.sun.org.apache.bcel.internal.generic.FDIV o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFLOAD(com.sun.org.apache.bcel.internal.generic.FLOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.FLOAT);
|
public void | visitFMUL(com.sun.org.apache.bcel.internal.generic.FMUL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFNEG(com.sun.org.apache.bcel.internal.generic.FNEG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFREM(com.sun.org.apache.bcel.internal.generic.FREM o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitFRETURN(com.sun.org.apache.bcel.internal.generic.FRETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitFSTORE(com.sun.org.apache.bcel.internal.generic.FSTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
locals().set(o.getIndex(), stack().pop());
|
public void | visitFSUB(com.sun.org.apache.bcel.internal.generic.FSUB o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitGETFIELD(com.sun.org.apache.bcel.internal.generic.GETFIELD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
Type t = o.getFieldType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
|
public void | visitGETSTATIC(com.sun.org.apache.bcel.internal.generic.GETSTATIC o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = o.getFieldType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
|
public void | visitGOTO(com.sun.org.apache.bcel.internal.generic.GOTO o)Symbolically executes the corresponding Java Virtual Machine instruction.
// no stack changes.
|
public void | visitGOTO_W(com.sun.org.apache.bcel.internal.generic.GOTO_W o)Symbolically executes the corresponding Java Virtual Machine instruction.
// no stack changes.
|
public void | visitI2B(com.sun.org.apache.bcel.internal.generic.I2B o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitI2C(com.sun.org.apache.bcel.internal.generic.I2C o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitI2D(com.sun.org.apache.bcel.internal.generic.I2D o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitI2F(com.sun.org.apache.bcel.internal.generic.I2F o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitI2L(com.sun.org.apache.bcel.internal.generic.I2L o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.LONG);
|
public void | visitI2S(com.sun.org.apache.bcel.internal.generic.I2S o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitIADD(com.sun.org.apache.bcel.internal.generic.IADD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIALOAD(com.sun.org.apache.bcel.internal.generic.IALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIAND(com.sun.org.apache.bcel.internal.generic.IAND o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIASTORE(com.sun.org.apache.bcel.internal.generic.IASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitICONST(com.sun.org.apache.bcel.internal.generic.ICONST o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.INT);
|
public void | visitIDIV(com.sun.org.apache.bcel.internal.generic.IDIV o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIFEQ(com.sun.org.apache.bcel.internal.generic.IFEQ o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFGE(com.sun.org.apache.bcel.internal.generic.IFGE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFGT(com.sun.org.apache.bcel.internal.generic.IFGT o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFLE(com.sun.org.apache.bcel.internal.generic.IFLE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFLT(com.sun.org.apache.bcel.internal.generic.IFLT o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFNE(com.sun.org.apache.bcel.internal.generic.IFNE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFNONNULL(com.sun.org.apache.bcel.internal.generic.IFNONNULL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIFNULL(com.sun.org.apache.bcel.internal.generic.IFNULL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitIF_ACMPEQ(com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ACMPNE(com.sun.org.apache.bcel.internal.generic.IF_ACMPNE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPEQ(com.sun.org.apache.bcel.internal.generic.IF_ICMPEQ o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPGE(com.sun.org.apache.bcel.internal.generic.IF_ICMPGE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPGT(com.sun.org.apache.bcel.internal.generic.IF_ICMPGT o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPLE(com.sun.org.apache.bcel.internal.generic.IF_ICMPLE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPLT(com.sun.org.apache.bcel.internal.generic.IF_ICMPLT o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIF_ICMPNE(com.sun.org.apache.bcel.internal.generic.IF_ICMPNE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitIINC(com.sun.org.apache.bcel.internal.generic.IINC o)Symbolically executes the corresponding Java Virtual Machine instruction.
// stack is not changed.
|
public void | visitILOAD(com.sun.org.apache.bcel.internal.generic.ILOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.INT);
|
public void | visitIMUL(com.sun.org.apache.bcel.internal.generic.IMUL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitINEG(com.sun.org.apache.bcel.internal.generic.INEG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitINSTANCEOF(com.sun.org.apache.bcel.internal.generic.INSTANCEOF o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitINVOKEINTERFACE(com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop(); //objectref
for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
stack().pop();
}
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID){
Type t = o.getReturnType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
}
|
public void | visitINVOKESPECIAL(com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL o)Symbolically executes the corresponding Java Virtual Machine instruction.
if (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME)){
UninitializedObjectType t = (UninitializedObjectType) stack().peek(o.getArgumentTypes(cpg).length);
if (t == frame._this){
frame._this = null;
}
stack().initializeObject(t);
locals().initializeObject(t);
}
stack().pop(); //objectref
for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
stack().pop();
}
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID){
Type t = o.getReturnType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
}
|
public void | visitINVOKESTATIC(com.sun.org.apache.bcel.internal.generic.INVOKESTATIC o)Symbolically executes the corresponding Java Virtual Machine instruction.
for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
stack().pop();
}
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID){
Type t = o.getReturnType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
}
|
public void | visitINVOKEVIRTUAL(com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop(); //objectref
for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
stack().pop();
}
// We are sure the invoked method will xRETURN eventually
// We simulate xRETURNs functionality here because we
// don't really "jump into" and simulate the invoked
// method.
if (o.getReturnType(cpg) != Type.VOID){
Type t = o.getReturnType(cpg);
if ( t.equals(Type.BOOLEAN) ||
t.equals(Type.CHAR) ||
t.equals(Type.BYTE) ||
t.equals(Type.SHORT) )
t = Type.INT;
stack().push(t);
}
|
public void | visitIOR(com.sun.org.apache.bcel.internal.generic.IOR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIREM(com.sun.org.apache.bcel.internal.generic.IREM o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIRETURN(com.sun.org.apache.bcel.internal.generic.IRETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitISHL(com.sun.org.apache.bcel.internal.generic.ISHL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitISHR(com.sun.org.apache.bcel.internal.generic.ISHR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitISTORE(com.sun.org.apache.bcel.internal.generic.ISTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
locals().set(o.getIndex(), stack().pop());
|
public void | visitISUB(com.sun.org.apache.bcel.internal.generic.ISUB o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIUSHR(com.sun.org.apache.bcel.internal.generic.IUSHR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitIXOR(com.sun.org.apache.bcel.internal.generic.IXOR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitJSR(com.sun.org.apache.bcel.internal.generic.JSR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(new ReturnaddressType(o.physicalSuccessor()));
//System.err.println("TODO-----------:"+o.physicalSuccessor());
|
public void | visitJSR_W(com.sun.org.apache.bcel.internal.generic.JSR_W o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(new ReturnaddressType(o.physicalSuccessor()));
|
public void | visitL2D(com.sun.org.apache.bcel.internal.generic.L2D o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.DOUBLE);
|
public void | visitL2F(com.sun.org.apache.bcel.internal.generic.L2F o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.FLOAT);
|
public void | visitL2I(com.sun.org.apache.bcel.internal.generic.L2I o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.INT);
|
public void | visitLADD(com.sun.org.apache.bcel.internal.generic.LADD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLALOAD(com.sun.org.apache.bcel.internal.generic.LALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLAND(com.sun.org.apache.bcel.internal.generic.LAND o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLASTORE(com.sun.org.apache.bcel.internal.generic.LASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitLCMP(com.sun.org.apache.bcel.internal.generic.LCMP o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitLCONST(com.sun.org.apache.bcel.internal.generic.LCONST o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.LONG);
|
public void | visitLDC(com.sun.org.apache.bcel.internal.generic.LDC o)Symbolically executes the corresponding Java Virtual Machine instruction.
Constant c = cpg.getConstant(o.getIndex());
if (c instanceof ConstantInteger){
stack().push(Type.INT);
}
if (c instanceof ConstantFloat){
stack().push(Type.FLOAT);
}
if (c instanceof ConstantString){
stack().push(Type.STRING);
}
|
public void | visitLDC2_W(com.sun.org.apache.bcel.internal.generic.LDC2_W o)Symbolically executes the corresponding Java Virtual Machine instruction.
Constant c = cpg.getConstant(o.getIndex());
if (c instanceof ConstantLong){
stack().push(Type.LONG);
}
if (c instanceof ConstantDouble){
stack().push(Type.DOUBLE);
}
|
public void | visitLDC_W(com.sun.org.apache.bcel.internal.generic.LDC_W o)Symbolically executes the corresponding Java Virtual Machine instruction.
Constant c = cpg.getConstant(o.getIndex());
if (c instanceof ConstantInteger){
stack().push(Type.INT);
}
if (c instanceof ConstantFloat){
stack().push(Type.FLOAT);
}
if (c instanceof ConstantString){
stack().push(Type.STRING);
}
|
public void | visitLDIV(com.sun.org.apache.bcel.internal.generic.LDIV o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLLOAD(com.sun.org.apache.bcel.internal.generic.LLOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(locals().get(o.getIndex()));
|
public void | visitLMUL(com.sun.org.apache.bcel.internal.generic.LMUL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLNEG(com.sun.org.apache.bcel.internal.generic.LNEG o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(Type.LONG);
|
public void | visitLOOKUPSWITCH(com.sun.org.apache.bcel.internal.generic.LOOKUPSWITCH o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop(); //key
|
public void | visitLOR(com.sun.org.apache.bcel.internal.generic.LOR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLREM(com.sun.org.apache.bcel.internal.generic.LREM o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLRETURN(com.sun.org.apache.bcel.internal.generic.LRETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitLSHL(com.sun.org.apache.bcel.internal.generic.LSHL o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLSHR(com.sun.org.apache.bcel.internal.generic.LSHR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLSTORE(com.sun.org.apache.bcel.internal.generic.LSTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
locals().set(o.getIndex(), stack().pop());
locals().set(o.getIndex()+1, Type.UNKNOWN);
|
public void | visitLSUB(com.sun.org.apache.bcel.internal.generic.LSUB o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLUSHR(com.sun.org.apache.bcel.internal.generic.LUSHR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitLXOR(com.sun.org.apache.bcel.internal.generic.LXOR o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.LONG);
|
public void | visitMONITORENTER(com.sun.org.apache.bcel.internal.generic.MONITORENTER o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitMONITOREXIT(com.sun.org.apache.bcel.internal.generic.MONITOREXIT o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitMULTIANEWARRAY(com.sun.org.apache.bcel.internal.generic.MULTIANEWARRAY o)Symbolically executes the corresponding Java Virtual Machine instruction.
for (int i=0; i<o.getDimensions(); i++){
stack().pop();
}
stack().push(o.getType(cpg));
|
public void | visitNEW(com.sun.org.apache.bcel.internal.generic.NEW o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(new UninitializedObjectType((ObjectType) (o.getType(cpg))));
|
public void | visitNEWARRAY(com.sun.org.apache.bcel.internal.generic.NEWARRAY o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().push(o.getType());
|
public void | visitNOP(com.sun.org.apache.bcel.internal.generic.NOP o)Symbolically executes the corresponding Java Virtual Machine instruction.
|
public void | visitPOP(com.sun.org.apache.bcel.internal.generic.POP o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitPOP2(com.sun.org.apache.bcel.internal.generic.POP2 o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
if (t.getSize() == 1){
stack().pop();
}
|
public void | visitPUTFIELD(com.sun.org.apache.bcel.internal.generic.PUTFIELD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
|
public void | visitPUTSTATIC(com.sun.org.apache.bcel.internal.generic.PUTSTATIC o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|
public void | visitRET(com.sun.org.apache.bcel.internal.generic.RET o)Symbolically executes the corresponding Java Virtual Machine instruction.
// do nothing, return address
// is in in the local variables.
|
public void | visitRETURN(com.sun.org.apache.bcel.internal.generic.RETURN o)Symbolically executes the corresponding Java Virtual Machine instruction.
// do nothing.
|
public void | visitSALOAD(com.sun.org.apache.bcel.internal.generic.SALOAD o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().push(Type.INT);
|
public void | visitSASTORE(com.sun.org.apache.bcel.internal.generic.SASTORE o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
stack().pop();
stack().pop();
|
public void | visitSIPUSH(com.sun.org.apache.bcel.internal.generic.SIPUSH o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().push(Type.INT);
|
public void | visitSWAP(com.sun.org.apache.bcel.internal.generic.SWAP o)Symbolically executes the corresponding Java Virtual Machine instruction.
Type t = stack().pop();
Type u = stack().pop();
stack().push(t);
stack().push(u);
|
public void | visitTABLESWITCH(com.sun.org.apache.bcel.internal.generic.TABLESWITCH o)Symbolically executes the corresponding Java Virtual Machine instruction.
stack().pop();
|