FileDocCategorySizeDatePackage
ExecutionVisitor.javaAPI DocJava SE 5 API36913Fri Aug 26 14:55:26 BST 2005com.sun.org.apache.bcel.internal.verifier.structurals

ExecutionVisitor

public class ExecutionVisitor extends EmptyVisitor implements Visitor
This Visitor class may be used for a type-based Java Virtual Machine simulation. It does not check for correct types on the OperandStack or in the LocalVariables; nor does it check their sizes are sufficiently big. Thus, to use this Visitor for bytecode verifying, you have to make sure externally that the type constraints of the Java Virtual Machine instructions are satisfied. An InstConstraintVisitor may be used for this. Anyway, this Visitor does not mandate it. For example, when you visitIADD(IADD o), then there are two stack slots popped and one stack slot containing a Type.INT is pushed (where you could also pop only one slot if you know there are two Type.INT on top of the stack). Monitor-specific behaviour is not simulated.

Conventions: Type.VOID will never be pushed onto the stack. Type.DOUBLE and Type.LONG that would normally take up two stack slots (like Double_HIGH and Double_LOW) are represented by a simple single Type.DOUBLE or Type.LONG object on the stack here. If a two-slot type is stored into a local variable, the next variable is given the type Type.UNKNOWN.
version
$Id: ExecutionVisitor.java,v 1.1.1.1 2001/10/29 20:00:39 jvanzyl Exp $
author
Enver Haase
see
#visitDSTORE(DSTORE o)
see
InstConstraintVisitor

Fields Summary
private Frame
frame
The executionframe we're operating on.
private ConstantPoolGen
cpg
The ConstantPoolGen we're working with.
Constructors Summary
public ExecutionVisitor()
Constructor. Constructs a new instance of this class.


	        	 
	 
Methods Summary
private LocalVariableslocals()
The LocalVariables from the current Frame we're operating on.

see
#setFrame(Frame)

		return frame.getLocals();
	
public voidsetConstantPoolGen(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)
Sets the ConstantPoolGen needed for symbolic execution.

		this.cpg = cpg;
	
public voidsetFrame(Frame f)
The only method granting access to the single instance of the ExecutionVisitor class. Before actively using this instance, SET THE ConstantPoolGen FIRST.

see
#setConstantPoolGen(ConstantPoolGen)

		this.frame = f;
	
private OperandStackstack()
The OperandStack from the current Frame we're operating on.

see
#setFrame(Frame)

		return frame.getStack();
	
public voidvisitAALOAD(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 voidvisitAASTORE(com.sun.org.apache.bcel.internal.generic.AASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitACONST_NULL(com.sun.org.apache.bcel.internal.generic.ACONST_NULL o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.NULL);
	
public voidvisitALOAD(com.sun.org.apache.bcel.internal.generic.ALOAD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(locals().get(o.getIndex()));
	
public voidvisitANEWARRAY(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 voidvisitARETURN(com.sun.org.apache.bcel.internal.generic.ARETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitARRAYLENGTH(com.sun.org.apache.bcel.internal.generic.ARRAYLENGTH o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitASTORE(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 voidvisitATHROW(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 voidvisitBALOAD(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 voidvisitBASTORE(com.sun.org.apache.bcel.internal.generic.BASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitBIPUSH(com.sun.org.apache.bcel.internal.generic.BIPUSH o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.INT);
	
public voidvisitCALOAD(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 voidvisitCASTORE(com.sun.org.apache.bcel.internal.generic.CASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitCHECKCAST(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 voidvisitD2F(com.sun.org.apache.bcel.internal.generic.D2F o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.FLOAT);
	
public voidvisitD2I(com.sun.org.apache.bcel.internal.generic.D2I o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitD2L(com.sun.org.apache.bcel.internal.generic.D2L o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.LONG);
	
public voidvisitDADD(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 voidvisitDALOAD(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 voidvisitDASTORE(com.sun.org.apache.bcel.internal.generic.DASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitDCMPG(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 voidvisitDCMPL(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 voidvisitDCONST(com.sun.org.apache.bcel.internal.generic.DCONST o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.DOUBLE);
	
public voidvisitDDIV(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 voidvisitDLOAD(com.sun.org.apache.bcel.internal.generic.DLOAD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.DOUBLE);
	
public voidvisitDMUL(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 voidvisitDNEG(com.sun.org.apache.bcel.internal.generic.DNEG o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.DOUBLE);
	
public voidvisitDREM(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 voidvisitDRETURN(com.sun.org.apache.bcel.internal.generic.DRETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitDSTORE(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 voidvisitDSUB(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 voidvisitDUP(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 voidvisitDUP2(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 voidvisitDUP2_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 voidvisitDUP2_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 voidvisitDUP_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 voidvisitDUP_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 voidvisitF2D(com.sun.org.apache.bcel.internal.generic.F2D o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.DOUBLE);
	
public voidvisitF2I(com.sun.org.apache.bcel.internal.generic.F2I o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitF2L(com.sun.org.apache.bcel.internal.generic.F2L o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.LONG);
	
public voidvisitFADD(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 voidvisitFALOAD(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 voidvisitFASTORE(com.sun.org.apache.bcel.internal.generic.FASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitFCMPG(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 voidvisitFCMPL(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 voidvisitFCONST(com.sun.org.apache.bcel.internal.generic.FCONST o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.FLOAT);
	
public voidvisitFDIV(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 voidvisitFLOAD(com.sun.org.apache.bcel.internal.generic.FLOAD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.FLOAT);
	
public voidvisitFMUL(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 voidvisitFNEG(com.sun.org.apache.bcel.internal.generic.FNEG o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.FLOAT);
	
public voidvisitFREM(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 voidvisitFRETURN(com.sun.org.apache.bcel.internal.generic.FRETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitFSTORE(com.sun.org.apache.bcel.internal.generic.FSTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		locals().set(o.getIndex(), stack().pop());
	
public voidvisitFSUB(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 voidvisitGETFIELD(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 voidvisitGETSTATIC(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 voidvisitGOTO(com.sun.org.apache.bcel.internal.generic.GOTO o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		// no stack changes.
	
public voidvisitGOTO_W(com.sun.org.apache.bcel.internal.generic.GOTO_W o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		// no stack changes.
	
public voidvisitI2B(com.sun.org.apache.bcel.internal.generic.I2B o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitI2C(com.sun.org.apache.bcel.internal.generic.I2C o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitI2D(com.sun.org.apache.bcel.internal.generic.I2D o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.DOUBLE);
	
public voidvisitI2F(com.sun.org.apache.bcel.internal.generic.I2F o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.FLOAT);
	
public voidvisitI2L(com.sun.org.apache.bcel.internal.generic.I2L o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.LONG);
	
public voidvisitI2S(com.sun.org.apache.bcel.internal.generic.I2S o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitIADD(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 voidvisitIALOAD(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 voidvisitIAND(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 voidvisitIASTORE(com.sun.org.apache.bcel.internal.generic.IASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitICONST(com.sun.org.apache.bcel.internal.generic.ICONST o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.INT);
	
public voidvisitIDIV(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 voidvisitIFEQ(com.sun.org.apache.bcel.internal.generic.IFEQ o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFGE(com.sun.org.apache.bcel.internal.generic.IFGE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFGT(com.sun.org.apache.bcel.internal.generic.IFGT o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFLE(com.sun.org.apache.bcel.internal.generic.IFLE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFLT(com.sun.org.apache.bcel.internal.generic.IFLT o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFNE(com.sun.org.apache.bcel.internal.generic.IFNE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFNONNULL(com.sun.org.apache.bcel.internal.generic.IFNONNULL o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIFNULL(com.sun.org.apache.bcel.internal.generic.IFNULL o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitIF_ACMPEQ(com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ACMPNE(com.sun.org.apache.bcel.internal.generic.IF_ACMPNE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPEQ(com.sun.org.apache.bcel.internal.generic.IF_ICMPEQ o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPGE(com.sun.org.apache.bcel.internal.generic.IF_ICMPGE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPGT(com.sun.org.apache.bcel.internal.generic.IF_ICMPGT o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPLE(com.sun.org.apache.bcel.internal.generic.IF_ICMPLE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPLT(com.sun.org.apache.bcel.internal.generic.IF_ICMPLT o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIF_ICMPNE(com.sun.org.apache.bcel.internal.generic.IF_ICMPNE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitIINC(com.sun.org.apache.bcel.internal.generic.IINC o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		// stack is not changed.
	
public voidvisitILOAD(com.sun.org.apache.bcel.internal.generic.ILOAD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.INT);
	
public voidvisitIMUL(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 voidvisitINEG(com.sun.org.apache.bcel.internal.generic.INEG o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitINSTANCEOF(com.sun.org.apache.bcel.internal.generic.INSTANCEOF o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitINVOKEINTERFACE(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 voidvisitINVOKESPECIAL(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 voidvisitINVOKESTATIC(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 voidvisitINVOKEVIRTUAL(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 voidvisitIOR(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 voidvisitIREM(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 voidvisitIRETURN(com.sun.org.apache.bcel.internal.generic.IRETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitISHL(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 voidvisitISHR(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 voidvisitISTORE(com.sun.org.apache.bcel.internal.generic.ISTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		locals().set(o.getIndex(), stack().pop());
	
public voidvisitISUB(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 voidvisitIUSHR(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 voidvisitIXOR(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 voidvisitJSR(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 voidvisitJSR_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 voidvisitL2D(com.sun.org.apache.bcel.internal.generic.L2D o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.DOUBLE);
	
public voidvisitL2F(com.sun.org.apache.bcel.internal.generic.L2F o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.FLOAT);
	
public voidvisitL2I(com.sun.org.apache.bcel.internal.generic.L2I o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.INT);
	
public voidvisitLADD(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 voidvisitLALOAD(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 voidvisitLAND(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 voidvisitLASTORE(com.sun.org.apache.bcel.internal.generic.LASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitLCMP(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 voidvisitLCONST(com.sun.org.apache.bcel.internal.generic.LCONST o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.LONG);
	
public voidvisitLDC(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 voidvisitLDC2_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 voidvisitLDC_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 voidvisitLDIV(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 voidvisitLLOAD(com.sun.org.apache.bcel.internal.generic.LLOAD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(locals().get(o.getIndex()));
	
public voidvisitLMUL(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 voidvisitLNEG(com.sun.org.apache.bcel.internal.generic.LNEG o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(Type.LONG);
	
public voidvisitLOOKUPSWITCH(com.sun.org.apache.bcel.internal.generic.LOOKUPSWITCH o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop(); //key
	
public voidvisitLOR(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 voidvisitLREM(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 voidvisitLRETURN(com.sun.org.apache.bcel.internal.generic.LRETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitLSHL(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 voidvisitLSHR(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 voidvisitLSTORE(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 voidvisitLSUB(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 voidvisitLUSHR(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 voidvisitLXOR(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 voidvisitMONITORENTER(com.sun.org.apache.bcel.internal.generic.MONITORENTER o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitMONITOREXIT(com.sun.org.apache.bcel.internal.generic.MONITOREXIT o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitMULTIANEWARRAY(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 voidvisitNEW(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 voidvisitNEWARRAY(com.sun.org.apache.bcel.internal.generic.NEWARRAY o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().push(o.getType());
	
public voidvisitNOP(com.sun.org.apache.bcel.internal.generic.NOP o)
Symbolically executes the corresponding Java Virtual Machine instruction.

	
public voidvisitPOP(com.sun.org.apache.bcel.internal.generic.POP o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitPOP2(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 voidvisitPUTFIELD(com.sun.org.apache.bcel.internal.generic.PUTFIELD o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
	
public voidvisitPUTSTATIC(com.sun.org.apache.bcel.internal.generic.PUTSTATIC o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
	
public voidvisitRET(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 voidvisitRETURN(com.sun.org.apache.bcel.internal.generic.RETURN o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		// do nothing.
	
public voidvisitSALOAD(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 voidvisitSASTORE(com.sun.org.apache.bcel.internal.generic.SASTORE o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();
		stack().pop();
		stack().pop();
	
public voidvisitSIPUSH(com.sun.org.apache.bcel.internal.generic.SIPUSH o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().push(Type.INT);
	
public voidvisitSWAP(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 voidvisitTABLESWITCH(com.sun.org.apache.bcel.internal.generic.TABLESWITCH o)
Symbolically executes the corresponding Java Virtual Machine instruction.

		stack().pop();