public final class HeapVM extends AbstractVM
conf| Constructor and Description |
|---|
HeapVM(SymbolicEnvironment env,
PathConditionCollector pc,
ConcolicInstrumentingClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
AALOAD(Object conc_array,
int conc_index) |
void |
AASTORE(Object conc_array,
int conc_index)
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc
.html#aastore
|
void |
ANEWARRAY(int conc_array_length,
String componentTypeName)
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc
.html#anewarray
|
void |
ARRAYLENGTH(Object conc_array) |
void |
BALOAD(Object conc_array,
int conc_index)
retrieve byte/boolean from array
|
void |
BASTORE(Object conc_array,
int conc_index) |
void |
CALOAD(Object conc_array,
int conc_index) |
void |
CASTORE(Object conc_array,
int conc_index) |
void |
CHECKCAST(Object conc_ref,
String typeName)
Explicit type cast:
|
void |
DALOAD(Object conc_array,
int conc_index)
Load double from array
..., arrayref, index ==> ..., value
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
|
void |
DASTORE(Object conc_array,
int conc_index) |
void |
FALOAD(Object conc_array,
int conc_index) |
void |
FASTORE(Object conc_array,
int conc_index) |
void |
GETFIELD(Object conc_receiver,
String className,
String fieldName,
String desc)
Retrieve the value of an instance field
|
void |
GETSTATIC(String owner,
String fieldName,
String desc)
GetStatic mypackage/MyClass fieldName FieldType
|
void |
IALOAD(Object conc_array,
int conc_index)
Load an int value from an array and push it on the stack
..., arrayref, index ==> ..., value
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
|
void |
IASTORE(Object conc_array,
int conc_index)
Store the top operand stack value into an array
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
|
void |
INSTANCEOF(Object conc_ref,
String typeName)
Dynamic type check:
|
void |
LALOAD(Object conc_array,
int conc_index) |
void |
LASTORE(Object conc_array,
int conc_index) |
void |
MULTIANEWARRAY(String arrayTypeDesc,
int nrDimensions)
MULTIANEWARRAY
|
void |
NEW(String className)
Allocate space on the heap and push a reference ref to it onto the stack.
|
void |
NEWARRAY(int conc_array_length,
Class<?> componentType)
Create a (one-dimensional) array of primitive componenet type, e.g., new
int[3]
Allocate space on the heap and push a reference ref to it onto the stack.
|
void |
PUTFIELD(Object conc_receiver,
String className,
String fieldName,
String desc)
Store a value in an instance field.
|
void |
PUTSTATIC(String owner,
String name,
String desc)
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
|
static Field |
resolveField(Class<?> claz,
String name)
Resolve (static or instance) field
|
void |
SALOAD(Object conc_array,
int conc_index) |
void |
SASTORE(Object conc_array,
int conc_index) |
ACONST_NULL, ALOAD_0, ALOAD_1, ALOAD_2, ALOAD_3, ALOAD, ARETURN, ASTORE_0, ASTORE_1, ASTORE_2, ASTORE_3, ASTORE, ATHROW, BB_BEGIN, BIPUSH, CALL_RESULT, CALL_RESULT, CALL_RESULT, CALL_RESULT, CALL_RESULT, CALL_RESULT, CALL_RESULT, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, CALLER_STACK_PARAM, D2F, D2I, D2L, DADD, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD_0, DLOAD_1, DLOAD_2, DLOAD_3, DLOAD, DMUL, DNEG, DREM, DRETURN, DSTORE_0, DSTORE_1, DSTORE_2, DSTORE_3, DSTORE, DSUB, DUP_X1, DUP_X2, DUP, DUP2_X1, DUP2_X2, DUP2, F2D, F2I, F2L, FADD, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD_0, FLOAD_1, FLOAD_2, FLOAD_3, FLOAD, FMUL, FNEG, FREM, FRETURN, FSTORE_0, FSTORE_1, FSTORE_2, FSTORE_3, FSTORE, FSUB, GOTO_W, GOTO, HANDLER_BEGIN, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IAND, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD_0, ILOAD_1, ILOAD_2, ILOAD_3, ILOAD, IMUL, INEG, INVOKEINTERFACE, INVOKESPECIAL, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE_0, ISTORE_1, ISTORE_2, ISTORE_3, ISTORE, ISUB, IUSHR, IXOR, JSR_W, JSR, L2D, L2F, L2I, LADD, LAND, LCMP, LCONST_0, LCONST_1, LDC_W, LDC, LDC, LDC, LDC, LDC2_W, LDC2_W, LDIV, LLOAD_0, LLOAD_1, LLOAD_2, LLOAD_3, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE_0, LSTORE_1, LSTORE_2, LSTORE_3, LSTORE, LSUB, LUSHR, LXOR, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_PARAM, METHOD_BEGIN_RECEIVER, METHOD_BEGIN, METHOD_MAXS, MONITORENTER, MONITOREXIT, NOP, POP, POP2, RET, RETURN, SIPUSH, SRC_LINE_NUMBER, SWAP, TABLESWITCH, UNUSED, WIDEpublic HeapVM(SymbolicEnvironment env, PathConditionCollector pc, ConcolicInstrumentingClassLoader classLoader)
public static Field resolveField(Class<?> claz, String name)
JVM Specification, Section 5.4.3.2: Field Resolution: http://java.sun.com/ docs/books/jvms/second_edition/html/ConstantPool.doc.html#71685 TODO: Resolve field once and for all, then cache it.
public void GETSTATIC(String owner, String fieldName, String desc)
GETSTATIC in interface IVMGETSTATIC in class AbstractVMowner - name of a class or interface.fieldName - name of the field to be read. The owner class or interface
itself my have declared this field. If owner is a class, then
this field may also be declared by a - super-class of the
owner class, or by a - interface implemented by (a super-class
of) the owner class.
http://java.sun.com/docs/books/jvms/second_edition/html/
Instructions2.doc5.html#getstaticpublic void PUTSTATIC(String owner, String name, String desc)
PUTSTATIC in interface IVMPUTSTATIC in class AbstractVMpublic void NEW(String className)
NEW in interface IVMNEW in class AbstractVMpublic void GETFIELD(Object conc_receiver, String className, String fieldName, String desc)
Before actually retrieving the value, the JVM will check if the instance is null. If the receiver instance is null, the JVM will throw a null pointer exception.
GETFIELD in interface IVMGETFIELD in class AbstractVM://java.sun.com/docs/books/jvms/second_edition/html/Instructions2
.doc5.html#getfieldpublic void PUTFIELD(Object conc_receiver, String className, String fieldName, String desc)
PUTFIELD in interface IVMPUTFIELD in class AbstractVMpublic void NEWARRAY(int conc_array_length,
Class<?> componentType)
NEWARRAY in interface IVMNEWARRAY in class AbstractVMpublic void ANEWARRAY(int conc_array_length,
String componentTypeName)
ANEWARRAY in interface IVMANEWARRAY in class AbstractVMpublic void MULTIANEWARRAY(String arrayTypeDesc, int nrDimensions)
boolean[] b1 = new boolean[1]; // NEWARRAY T_BOOLEAN Boolean[] B1 = new Boolean[1]; // ANEWARRAY java/lang/Boolean boolean[][] b2 = new boolean[1][2]; // MULTIANEWARRAY [[Z 2 Boolean[][] B2 = new Boolean[1][2]; // MULTIANEWARRAY [[Ljava/lang/Boolean; 2
MULTIANEWARRAY in interface IVMMULTIANEWARRAY in class AbstractVMpublic void ARRAYLENGTH(Object conc_array)
ARRAYLENGTH in interface IVMARRAYLENGTH in class AbstractVMpublic void IALOAD(Object conc_array, int conc_index)
IALOAD in interface IVMIALOAD in class AbstractVMpublic void LALOAD(Object conc_array, int conc_index)
LALOAD in interface IVMLALOAD in class AbstractVMpublic void FALOAD(Object conc_array, int conc_index)
FALOAD in interface IVMFALOAD in class AbstractVMpublic void DALOAD(Object conc_array, int conc_index)
DALOAD in interface IVMDALOAD in class AbstractVMpublic void AALOAD(Object conc_array, int conc_index)
AALOAD in interface IVMAALOAD in class AbstractVMpublic void BALOAD(Object conc_array, int conc_index)
BALOAD in interface IVMBALOAD in class AbstractVMpublic void CALOAD(Object conc_array, int conc_index)
CALOAD in interface IVMCALOAD in class AbstractVMpublic void SALOAD(Object conc_array, int conc_index)
SALOAD in interface IVMSALOAD in class AbstractVMpublic void IASTORE(Object conc_array, int conc_index)
IASTORE in interface IVMIASTORE in class AbstractVMpublic void LASTORE(Object conc_array, int conc_index)
LASTORE in interface IVMLASTORE in class AbstractVMpublic void FASTORE(Object conc_array, int conc_index)
FASTORE in interface IVMFASTORE in class AbstractVMpublic void DASTORE(Object conc_array, int conc_index)
DASTORE in interface IVMDASTORE in class AbstractVMpublic void AASTORE(Object conc_array, int conc_index)
AASTORE in interface IVMAASTORE in class AbstractVMpublic void BASTORE(Object conc_array, int conc_index)
BASTORE in interface IVMBASTORE in class AbstractVMpublic void CASTORE(Object conc_array, int conc_index)
CASTORE in interface IVMCASTORE in class AbstractVMpublic void SASTORE(Object conc_array, int conc_index)
SASTORE in interface IVMSASTORE in class AbstractVMpublic void CHECKCAST(Object conc_ref, String typeName)
RefTypeX x = (RefTypeX) ref;null is treated as (can be cast to) any reference type. This is consistent with the null type being a subtype of every reference type. Note the different treatment in
INSTANCEOF(java.lang.Object, java.lang.String).
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.
doc2.html#checkcastCHECKCAST in interface IVMCHECKCAST in class AbstractVMpublic void INSTANCEOF(Object conc_ref, String typeName)
(variable instanceof TypeName)null is not treated as (is not an instance of) any reference type. This requires non-standard treatment of null. Note the different treatment in
CHECKCAST(java.lang.Object, java.lang.String).
If the jvm has not loaded the class/interface named TypeName before, then we load it. TODO: Is this a problem? http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2. doc6.html#instanceof
INSTANCEOF in interface IVMINSTANCEOF in class AbstractVMCopyright © 2010–2017 EvoSuite. All rights reserved.