Package de.uzl.its.swat.symbolic
Class SymbolicInstructionVisitor
java.lang.Object
de.uzl.its.swat.symbolic.SymbolicInstructionVisitor
- All Implemented Interfaces:
IVisitor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkArrayBounds
(Value<?, ?> ref, IntValue idx, int iid) int
determineIid
(int iid) getStack()
void
setNext
(Instruction next) void
visitAALOAD
(AALOAD inst) Loads a reference from an array and stores the reference on the symbolic stack ToDo (Nils): Reference arrays are not symbolically tracked currently See: ...void
visitAASTORE
(AASTORE inst) Stores a reference value into an arrayvoid
visitACONST_NULL
(ACONST_NULL inst) Pushes NULL onto the symbolic stackvoid
visitALOAD
(ALOAD inst) Fetches a reference from the symbolic locals and puts it onto the symbolic stackvoid
visitANEWARRAY
(ANEWARRAY inst) Creates a new array of references and puts the array onto the symbolic stack.void
visitARETURN
(ARETURN inst) Takes the top value (has to be a reference) from the symbolic stack and sets it as the symbolic return valuevoid
visitARRAYLENGTH
(ARRAYLENGTH inst) Determines the size of an array and puts it onto the symbolic stack INFO: While the length is tracked symbolically it is currently unclear to what effect that is useful See: Issuevoid
visitASTORE
(ASTORE inst) Stores the top reference from the symbolic stack into the symbolic locals.void
visitATHROW
(ATHROW inst) Throws an error or exception in the symbolic frame.void
visitBALOAD
(BALOAD inst) Retrieves a boolean or byte from an array and puts it onto the symbolic stackvoid
visitBASTORE
(BASTORE inst) Stores a boolean or byte into an arrayvoid
visitBIPUSH
(BIPUSH inst) Pushes a byte onto the symbolic stack as an integervoid
visitCALOAD
(CALOAD inst) Retrieves a char from an array and puts it onto the symbolic stackvoid
visitCASTORE
(CASTORE inst) Stores a char into an arrayvoid
visitCHECKCAST
(CHECKCAST inst) No symbolic tracking needed here.void
Casts a double value to a float and puts the result onto the symbolic stackvoid
Casts a double to an integer and puts the int onto the symbolic stackvoid
Casts a double to a long and puts the long onto the symbolic stackvoid
Adds two doubles and pushes the result onto the symbolic stackvoid
visitDALOAD
(DALOAD inst) Retrieves a double from an array and puts it onto the symbolic stackvoid
visitDASTORE
(DASTORE inst) Stores a double into an arrayvoid
visitDCMPG
(DCMPG inst) Compares two doubles and encodes the result as an integer that is put onto the symbolic stackvoid
visitDCMPL
(DCMPL inst) Compares two doubles and encodes the result as an integer that is put onto the symbolic stackvoid
visitDCONST_0
(DCONST_0 inst) Loads the constant 0.0 onto the symbolic stackvoid
visitDCONST_1
(DCONST_1 inst) Loads the constant 1.0 onto the symbolic stackvoid
Divides two doubles and pushes the result onto the symbolic stackvoid
visitDLOAD
(DLOAD inst) Loads a double from the symbolic locals onto the symbolic stack.void
Multiplies two doubles and pushes the result onto the symbolic stackvoid
Negates a double and pushes the result onto the symbolic stackvoid
void
visitDRETURN
(DRETURN inst) Sets the return value of the current symbolic frame to the double value on top of the symbolic stackvoid
visitDSTORE
(DSTORE inst) Stores the top value from the symbolic stack (double) into a slot in the symbolic localsvoid
Subtracts two doubles and pushes the result onto the symbolic stackvoid
Duplicates the top value on the symbolic stack (only one word -> 8 bytes) | 1 | --> | 1 | | 1 |void
visitDUP_X1
(DUP_X1 inst) Duplicate the top word and insert it beneath a second word | 1 | | 1 | | 2 | --> | 2 | | 1 |void
visitDUP_X2
(DUP_X2 inst) Duplicate the top word and insert it beneath the third word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 1 |void
Duplicates the top value on the symbolic stack (two words -> 16 bytes) | 1 | | 1 | | 2 | --> | 2 | | 1 | | 2 |void
visitDUP2_X1
(DUP2_X1 inst) Duplicate two words and insert them beneath a third word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 1 | | 2 |void
visitDUP2_X2
(DUP2_X2 inst) Duplicate two words and insert them beneath a fourth word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 4 | | 4 | | 1 | | 2 |void
Casts a float to a double and puts the result onto the symbolic stackvoid
Casts a float to an integer and puts the result onto the symbolic stackvoid
void
Adds two floats and adds the result onto the symbolic stackvoid
visitFALOAD
(FALOAD inst) Loads a float from an array and puts it onto the symbolic stackvoid
visitFASTORE
(FASTORE inst) Stores a float into an arrayvoid
visitFCMPG
(FCMPG inst) Compares two floats and encodes the result as an integer that is put onto the symbolic stackvoid
visitFCMPL
(FCMPL inst) Compares two floats and encodes the result as an integer that is put onto the symbolic stackvoid
visitFCONST_0
(FCONST_0 inst) Loads the constant 0.0f as a float onto the symbolic stackvoid
visitFCONST_1
(FCONST_1 inst) Loads the constant 1.0f as a float onto the symbolic stackvoid
visitFCONST_2
(FCONST_2 inst) Loads the constant 2.0f as a float onto the symbolic stackvoid
Divides two floats and puts the result onto the symbolic stackvoid
visitFLOAD
(FLOAD inst) Loads a float from the symbolic locals onto the symbolic stackvoid
Multiplies two floats and puts the result onto the symbolic stackvoid
Negates a float and puts the result onto the symbolic stackvoid
Calculates the remaider of the divion of two flaots and puts the result onto the symbolic stack WARNING: This is currently only the concrete valuevoid
visitFRETURN
(FRETURN inst) Sets the return value of the current symbolic frame to the float value on top of the symbolic stackvoid
visitFSTORE
(FSTORE inst) Puts the float on top of the symbolic stack into one of the symbolic locals of the current framevoid
Subtracts two floats and puts the resulting FloatValuer onto the symbolic stack.void
visitGETFIELD
(GETFIELD inst) Fetches a field from an object instance and puts it onto the symbolic stackvoid
visitGETSTATIC
(GETSTATIC inst) Fetches a static field from an object and puts it onto the symbolic stackvoid
Artificial instruction used to fetch concrete boolean valuesvoid
Artificial instruction used to fetch concrete valuesvoid
Artificial instruction used to fetch concrete valuesvoid
Artificial instruction used to fetch concrete valuesvoid
Artificial instruction used to fetch concrete valuesvoid
Artificial instruction used to fetch concrete valuesvoid
Artificial instruction used to fetch concrete valuesvoid
visitGETVALUE_Object
(GETVALUE_Object<?> inst) void
Artificial instruction used to fetch concrete valuesvoid
void
No symbolic tracking needed for the uncoditional jump.void
Converts an integer to a byte and puts the result onto the symbolic stackvoid
Converts an integer to a char and puts the result onto the symbolic stack ToDo (Nils): Symbolic information regarding the integer is currently lost here! See: Issue 60void
Converts an integer to a double and puts the result onto the symbolic stackvoid
Converts an integer to a float and puts the result onto the symbolic stackvoid
Converts an integer to a long and puts the result onto the symbolic stackvoid
Converts an integer to a short and puts the result onto the symbolic stackvoid
Adds two integers and pushes the result onto the symbolic stackvoid
visitIALOAD
(IALOAD inst) Loads an integer from an array and puts it onto the symbolic stackvoid
Calculates the bitwise and of two integers in binary representation and puts the result onto the symbolic stackvoid
visitIASTORE
(IASTORE inst) Stores an integer into an arrayvoid
visitICONST_0
(ICONST_0 inst) Load the int value 0 onto the symbolic stackvoid
visitICONST_1
(ICONST_1 inst) Load the int value 1 onto the symbolic stackvoid
visitICONST_2
(ICONST_2 inst) Load the int value 2 onto the symbolic stackvoid
visitICONST_3
(ICONST_3 inst) Load the int value 3 onto the symbolic stackvoid
visitICONST_4
(ICONST_4 inst) Load the int value 4 onto the symbolic stackvoid
visitICONST_5
(ICONST_5 inst) Load the int value 5 onto the symbolic stackvoid
visitICONST_M1
(ICONST_M1 inst) Load the int value -1 onto the symbolic stackvoid
Divides two integers and puts the result onto the symbolic stack.void
visitIF_ACMPEQ
(IF_ACMPEQ inst) Checks if two object references are equal and saves the resulting symbolic formula as a path constraintvoid
visitIF_ACMPNE
(IF_ACMPNE inst) Checks if two object references are not equal and saves the resulting symbolic formula as a path constraintvoid
visitIF_ICMPEQ
(IF_ICMPEQ inst) Checks if the two integers are equalvoid
visitIF_ICMPGE
(IF_ICMPGE inst) Checks if the integer is greater or equal to the second integervoid
visitIF_ICMPGT
(IF_ICMPGT inst) Checks if the integer is greater than the second integervoid
visitIF_ICMPLE
(IF_ICMPLE inst) Checks if the integer is less than or equal to the second integervoid
visitIF_ICMPLT
(IF_ICMPLT inst) Checks if the integer is greater than the second integervoid
visitIF_ICMPNE
(IF_ICMPNE inst) Checks if the wo integers are not equalvoid
Branches if the top value on the stack is equal to 0void
Branches if the top value on the stack is greater or equal to 0void
Branches if the top value on the stack is greater then 0void
Branches if the top value on the stack is less or equal to 0void
Branches if the top value on the stack is less then 0void
Checks if the current Value is not equal to 0void
visitIFNONNULL
(IFNONNULL inst) Checks if an object is not null and saves the resulting symbolic formula as a path constraintvoid
visitIFNULL
(IFNULL inst) Checks if an object is null and saves the resulting symbolic formula as a path constraintvoid
Increments an integer that is in the locals.void
visitILOAD
(ILOAD inst) Loads an integer from the locals onto the stack After this instruction a GETVALUE_int instruction follows to fetch the concrete value if the sybolic locals did not contain the valuevoid
Multiplies two integers and adds the result onto the symbolic stackvoid
Negates an integer and puts the resulting value onto the symbolic stackvoid
visitINSTANCEOF
(INSTANCEOF inst) Removes the object reference from the symbolic stack and pushes true onto the symbolic stack.void
Invokes a dynamic methodvoid
Invokes an interface method on an object reference from the symbolic stackvoid
Removes a frame from the stack frame and puts the removed frame's return value onto the old (current) frame's stackvoid
void
Invokes an instance method on an object reference from the symbolic stackvoid
Invokes a static methodvoid
Invokes a virtual method on an object reference from the symbolic stackvoid
Calculates the bitwise OR of two integers and puts the result onto the symbolic stackvoid
Calculates the modulo of two integers and puts the result onto the symbolic stackvoid
visitIRETURN
(IRETURN inst) Sets the return value of the current symbolic frame to the int value on top of the symbolic stackvoid
Shifts an integer bitwise to the left and puts the result onto the symbolic stackvoid
Shifts an integer bitwise arithmetically to the right and puts the result onto the symbolic stackvoid
visitISTORE
(ISTORE inst) Puts an integer from the symbolic stack into the symbolic localsvoid
Subtracts two ints and puts the result onto the symbolic stackvoid
visitIUSHR
(IUSHR inst) Shifts an integer bitwise logically to the right and puts the result onto the symbolic stackvoid
Calculates the bitwise exclusive OR of two integers and puts the result onto the symbolic stackvoid
Jump subroutine.void
void
void
void
Adds two longs and adds the result onto the symbolic stackvoid
visitLALOAD
(LALOAD inst) Loads a long from an array and puts it onto the symbolic stackvoid
Calculates the bitwise and of two longs in binary representation and puts the resulting long onto the stackvoid
visitLASTORE
(LASTORE inst) Stores a long into an arrayvoid
Compares two longs and adds the result encoded as an integer onto the symbolic stackvoid
visitLCONST_0
(LCONST_0 inst) Puts the constant 0L as a long onto the symbolic stackvoid
visitLCONST_1
(LCONST_1 inst) Puts the constant 1L as a long onto the symbolic stackvoid
visitLDC_double
(LDC_double inst) Puts a constant double onto the symbolic stackvoid
visitLDC_float
(LDC_float inst) Puts a constant float onto the symbolic stackvoid
visitLDC_int
(LDC_int inst) Loads a constant int onto the symbolic stackvoid
visitLDC_long
(LDC_long inst) Loads a constant long onto the symbolic stackvoid
visitLDC_Object
(LDC_Object inst) Puts an object onto the symbolic stackvoid
visitLDC_String
(LDC_String inst) Puts a constant string onto the symbolic stackvoid
Divides two longs and puts the result onto the symbolic stackvoid
visitLLOAD
(LLOAD inst) Loads a long from the symbolic locals and adds it to the symbolic stackvoid
Multiplies two longs and puts the result onto the symbolic stackvoid
Negates a long and puts the result onto the symbolic stackvoid
Builds a path-constraint based on where the execution continues.void
visitLOOP_BEGIN
(LOOP_BEGIN inst) void
visitLOOP_END
(LOOP_END inst) void
Calculates the bitwise or of two longs and puts the result onto the symbolic stackvoid
Calculates the modulo of two longs and puts the result onto the symbolic stackvoid
visitLRETURN
(LRETURN inst) Sets the return value of the current symbolic frame to the long value on top of the symbolic stackvoid
Calculates the bitwise left shift of a long and puts the result onto the symbolic stackvoid
Calculates the bitwise right shift of a long and puts the result onto the symbolic stackvoid
visitLSTORE
(LSTORE inst) Stores the top value from the symbolic stack (long) into a slot in the symbolic localsvoid
Subtracts two longs and puts the result onto the symbolic stackvoid
visitLUSHR
(LUSHR inst) Calculates the bitwise logical right shift of a long and puts the result onto the symbolic stackvoid
Calculates the bitwise exclusive or of two longs and puts the result onto the symbolic stackvoid
void
No symbolic behaviour defined.void
visitMONITOREXIT
(MONITOREXIT inst) No symbolic behaviour defined.void
Creates a multidimensional array of references.void
void
visitNEWARRAY
(NEWARRAY inst) void
Nothing to do here ;Dvoid
Pops the top value from the symbolic stack.void
Pops the top two values from the symbolic stack.void
visitPUTFIELD
(PUTFIELD inst) Puts a value into the field of an object reference The handling has changed in the JVM: - SE11 (new) - SE7 (Old)void
visitPUTSTATIC
(PUTSTATIC inst) Puts a value into a static field of a classvoid
Unconditional jump no handling neededvoid
visitRETURN
(RETURN inst) Returns void from method, no handling needed (here)void
visitSALOAD
(SALOAD inst) Retrieves a short from an array and puts it onto the symbolic stackvoid
visitSASTORE
(SASTORE inst) Stores a short into an arrayvoid
visitSIPUSH
(SIPUSH inst) Pushes a short onto the symbolic stack as an integervoid
visitSPECIAL
(SPECIAL inst) void
Swaps the top two words on the symbolic stackvoid
visitTABLESWITCH
(TABLESWITCH inst) Builds a path-constraint based on where the execution continues.
-
Constructor Details
-
SymbolicInstructionVisitor
-
-
Method Details
-
checkArrayBounds
-
visitAALOAD
Loads a reference from an array and stores the reference on the symbolic stack ToDo (Nils): Reference arrays are not symbolically tracked currently See: ...- Specified by:
visitAALOAD
in interfaceIVisitor
- Parameters:
inst
- The AALOAD instruction
-
visitAASTORE
Stores a reference value into an array- Specified by:
visitAASTORE
in interfaceIVisitor
- Parameters:
inst
- The ASTORE instruction
-
visitACONST_NULL
Pushes NULL onto the symbolic stack- Specified by:
visitACONST_NULL
in interfaceIVisitor
- Parameters:
inst
- The ACONST_NULL instruction
-
visitALOAD
Fetches a reference from the symbolic locals and puts it onto the symbolic stack- Specified by:
visitALOAD
in interfaceIVisitor
- Parameters:
inst
- One on the ALOAD (ALOAD, ALOAD_0 - ALOAD_3) instructions
-
visitANEWARRAY
Creates a new array of references and puts the array onto the symbolic stack.- Specified by:
visitANEWARRAY
in interfaceIVisitor
- Parameters:
inst
- The ANEWARRAY instruction.
-
visitARETURN
Takes the top value (has to be a reference) from the symbolic stack and sets it as the symbolic return value- Specified by:
visitARETURN
in interfaceIVisitor
- Parameters:
inst
- The ARETURN instruction
-
visitARRAYLENGTH
Determines the size of an array and puts it onto the symbolic stack INFO: While the length is tracked symbolically it is currently unclear to what effect that is useful See: Issue- Specified by:
visitARRAYLENGTH
in interfaceIVisitor
- Parameters:
inst
- The ARRAYLENGTH instruction
-
visitASTORE
Stores the top reference from the symbolic stack into the symbolic locals. The index of the locals position is indicated by the instruction and not taken from the stack- Specified by:
visitASTORE
in interfaceIVisitor
- Parameters:
inst
- One of the ASTORE (ASTORE, ASTORE_0 - ASTORE_3) instructions. inst.var is the locals index
-
visitATHROW
Throws an error or exception in the symbolic frame. The symbolic stack is cleared and only a reference to the exception remains on the symbolic stack. ToDo (Nils): Could some information be saved here to record that an exception has occurred? See: ...- Specified by:
visitATHROW
in interfaceIVisitor
- Parameters:
inst
- The ATHROW instruction
-
visitBALOAD
Retrieves a boolean or byte from an array and puts it onto the symbolic stack- Specified by:
visitBALOAD
in interfaceIVisitor
- Parameters:
inst
- The BALOAD instruction.
-
visitBASTORE
Stores a boolean or byte into an array- Specified by:
visitBASTORE
in interfaceIVisitor
- Parameters:
inst
- The BASTORE instruction.
-
visitBIPUSH
Pushes a byte onto the symbolic stack as an integer- Specified by:
visitBIPUSH
in interfaceIVisitor
- Parameters:
inst
- The BIPUSH instruction
-
visitCALOAD
Retrieves a char from an array and puts it onto the symbolic stack- Specified by:
visitCALOAD
in interfaceIVisitor
- Parameters:
inst
- The CALOAD instruction.
-
visitCASTORE
Stores a char into an array- Specified by:
visitCASTORE
in interfaceIVisitor
- Parameters:
inst
- The CASTORE instruction.
-
visitCHECKCAST
No symbolic tracking needed here. Exceptions in case the object cannot be cast need to be caught.- Specified by:
visitCHECKCAST
in interfaceIVisitor
- Parameters:
inst
- The CHECKCAST instruction
-
visitD2F
Casts a double value to a float and puts the result onto the symbolic stack -
visitD2I
Casts a double to an integer and puts the int onto the symbolic stack -
visitD2L
Casts a double to a long and puts the long onto the symbolic stack -
visitDADD
Adds two doubles and pushes the result onto the symbolic stack -
visitDALOAD
Retrieves a double from an array and puts it onto the symbolic stack- Specified by:
visitDALOAD
in interfaceIVisitor
- Parameters:
inst
- The DALOAD instruction.
-
visitDASTORE
Stores a double into an array- Specified by:
visitDASTORE
in interfaceIVisitor
- Parameters:
inst
- The DASTORE instruction.
-
visitDCMPG
Compares two doubles and encodes the result as an integer that is put onto the symbolic stack- Specified by:
visitDCMPG
in interfaceIVisitor
- Parameters:
inst
- The DCMPG instruction
-
visitDCMPL
Compares two doubles and encodes the result as an integer that is put onto the symbolic stack- Specified by:
visitDCMPL
in interfaceIVisitor
- Parameters:
inst
- The DCMPL instruction
-
visitDCONST_0
Loads the constant 0.0 onto the symbolic stack- Specified by:
visitDCONST_0
in interfaceIVisitor
- Parameters:
inst
- The DCONST_0 instruction
-
visitDCONST_1
Loads the constant 1.0 onto the symbolic stack- Specified by:
visitDCONST_1
in interfaceIVisitor
- Parameters:
inst
- The DCONST_1 instruction
-
visitDDIV
Divides two doubles and pushes the result onto the symbolic stack -
visitDLOAD
Loads a double from the symbolic locals onto the symbolic stack.- Specified by:
visitDLOAD
in interfaceIVisitor
- Parameters:
inst
- One of the DLOAD instructions (DLOAD, DLOAD_0 - DLOAD_3)
-
visitDMUL
Multiplies two doubles and pushes the result onto the symbolic stack -
visitDNEG
Negates a double and pushes the result onto the symbolic stack -
visitDREM
-
visitDRETURN
Sets the return value of the current symbolic frame to the double value on top of the symbolic stack- Specified by:
visitDRETURN
in interfaceIVisitor
- Parameters:
inst
- The DRETURN instruction
-
visitDSTORE
Stores the top value from the symbolic stack (double) into a slot in the symbolic locals- Specified by:
visitDSTORE
in interfaceIVisitor
- Parameters:
inst
- One of the DSTORE instructions (DSTORE, DSTORE_0 - DSTORE_3)
-
visitDSUB
Subtracts two doubles and pushes the result onto the symbolic stack -
visitDUP
Duplicates the top value on the symbolic stack (only one word -> 8 bytes) | 1 | --> | 1 | | 1 | -
visitDUP2
Duplicates the top value on the symbolic stack (two words -> 16 bytes) | 1 | | 1 | | 2 | --> | 2 | | 1 | | 2 | -
visitDUP2_X1
Duplicate two words and insert them beneath a third word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 1 | | 2 |- Specified by:
visitDUP2_X1
in interfaceIVisitor
- Parameters:
inst
- The DUP2_X1 instruction
-
visitDUP2_X2
Duplicate two words and insert them beneath a fourth word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 4 | | 4 | | 1 | | 2 |- Specified by:
visitDUP2_X2
in interfaceIVisitor
- Parameters:
inst
- The DUP2_X2 instruction
-
visitDUP_X1
Duplicate the top word and insert it beneath a second word | 1 | | 1 | | 2 | --> | 2 | | 1 |- Specified by:
visitDUP_X1
in interfaceIVisitor
- Parameters:
inst
- The DUP2_X1 instruction
-
visitDUP_X2
Duplicate the top word and insert it beneath the third word | 1 | | 1 | | 2 | --> | 2 | | 3 | | 3 | | 1 |- Specified by:
visitDUP_X2
in interfaceIVisitor
- Parameters:
inst
- The DUP2_X1 instruction
-
visitF2D
Casts a float to a double and puts the result onto the symbolic stack -
visitF2I
Casts a float to an integer and puts the result onto the symbolic stack -
visitF2L
-
visitFADD
Adds two floats and adds the result onto the symbolic stack -
visitFALOAD
Loads a float from an array and puts it onto the symbolic stack- Specified by:
visitFALOAD
in interfaceIVisitor
- Parameters:
inst
- The FALOAD instruction
-
visitFASTORE
Stores a float into an array- Specified by:
visitFASTORE
in interfaceIVisitor
- Parameters:
inst
- The FASTORE instruction
-
visitFCMPG
Compares two floats and encodes the result as an integer that is put onto the symbolic stack- Specified by:
visitFCMPG
in interfaceIVisitor
- Parameters:
inst
- The FCMPG instruction
-
visitFCMPL
Compares two floats and encodes the result as an integer that is put onto the symbolic stack- Specified by:
visitFCMPL
in interfaceIVisitor
- Parameters:
inst
- The FCMPL instruction
-
visitFCONST_0
Loads the constant 0.0f as a float onto the symbolic stack- Specified by:
visitFCONST_0
in interfaceIVisitor
- Parameters:
inst
- The FCONST_0 instruction
-
visitFCONST_1
Loads the constant 1.0f as a float onto the symbolic stack- Specified by:
visitFCONST_1
in interfaceIVisitor
- Parameters:
inst
- The FCONST_1 instruction
-
visitFCONST_2
Loads the constant 2.0f as a float onto the symbolic stack- Specified by:
visitFCONST_2
in interfaceIVisitor
- Parameters:
inst
- The FCONST_2 instruction
-
visitFDIV
Divides two floats and puts the result onto the symbolic stack -
visitFLOAD
Loads a float from the symbolic locals onto the symbolic stack- Specified by:
visitFLOAD
in interfaceIVisitor
- Parameters:
inst
- One of the FLOAD instructions (FLOAD, FLOAD_0 - FLOAD_3)
-
visitFMUL
Multiplies two floats and puts the result onto the symbolic stack -
visitFNEG
Negates a float and puts the result onto the symbolic stack -
visitFREM
Calculates the remaider of the divion of two flaots and puts the result onto the symbolic stack WARNING: This is currently only the concrete value -
visitFRETURN
Sets the return value of the current symbolic frame to the float value on top of the symbolic stack- Specified by:
visitFRETURN
in interfaceIVisitor
- Parameters:
inst
- The FRETURN instruction
-
visitFSTORE
Puts the float on top of the symbolic stack into one of the symbolic locals of the current frame- Specified by:
visitFSTORE
in interfaceIVisitor
- Parameters:
inst
- One of the FSTORE instructions (FSTORE, FSTORE_0 - FSTORE_3)
-
visitFSUB
Subtracts two floats and puts the resulting FloatValuer onto the symbolic stack. -
visitGETFIELD
Fetches a field from an object instance and puts it onto the symbolic stack- Specified by:
visitGETFIELD
in interfaceIVisitor
- Parameters:
inst
- The GETFIELD instruction
-
visitGETSTATIC
Fetches a static field from an object and puts it onto the symbolic stack- Specified by:
visitGETSTATIC
in interfaceIVisitor
- Parameters:
inst
- The GETSTATIC instruction
-
visitGETVALUE_Object
- Specified by:
visitGETVALUE_Object
in interfaceIVisitor
-
visitGETVALUE_boolean
Artificial instruction used to fetch concrete boolean values- Specified by:
visitGETVALUE_boolean
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_boolean instruction
-
visitGETVALUE_byte
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_byte
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_byte instruction
-
visitGETVALUE_char
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_char
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_char instruction
-
visitGETVALUE_double
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_double
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_double instruction
-
visitGETVALUE_float
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_float
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_float instruction
-
visitGETVALUE_int
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_int
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_int instruction
-
visitGETVALUE_long
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_long
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_long instruction
-
visitGETVALUE_short
Artificial instruction used to fetch concrete values- Specified by:
visitGETVALUE_short
in interfaceIVisitor
- Parameters:
inst
- The (artificial) GETVALUE_short instruction
-
visitGETVALUE_void
- Specified by:
visitGETVALUE_void
in interfaceIVisitor
-
visitGOTO
No symbolic tracking needed for the uncoditional jump. -
visitI2B
Converts an integer to a byte and puts the result onto the symbolic stack -
visitI2C
Converts an integer to a char and puts the result onto the symbolic stack ToDo (Nils): Symbolic information regarding the integer is currently lost here! See: Issue 60 -
visitI2D
Converts an integer to a double and puts the result onto the symbolic stack -
visitI2F
Converts an integer to a float and puts the result onto the symbolic stack -
visitI2L
Converts an integer to a long and puts the result onto the symbolic stack -
visitI2S
Converts an integer to a short and puts the result onto the symbolic stack -
visitIADD
Adds two integers and pushes the result onto the symbolic stack -
visitIALOAD
Loads an integer from an array and puts it onto the symbolic stack- Specified by:
visitIALOAD
in interfaceIVisitor
- Parameters:
inst
- The IALOAD instruction
-
visitIAND
Calculates the bitwise and of two integers in binary representation and puts the result onto the symbolic stack -
visitIASTORE
Stores an integer into an array- Specified by:
visitIASTORE
in interfaceIVisitor
- Parameters:
inst
- The IASTORE instruction
-
visitICONST_0
Load the int value 0 onto the symbolic stack- Specified by:
visitICONST_0
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_1
Load the int value 1 onto the symbolic stack- Specified by:
visitICONST_1
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_2
Load the int value 2 onto the symbolic stack- Specified by:
visitICONST_2
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_3
Load the int value 3 onto the symbolic stack- Specified by:
visitICONST_3
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_4
Load the int value 4 onto the symbolic stack- Specified by:
visitICONST_4
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_5
Load the int value 5 onto the symbolic stack- Specified by:
visitICONST_5
in interfaceIVisitor
- Parameters:
inst
- Current instruction
-
visitICONST_M1
Load the int value -1 onto the symbolic stack- Specified by:
visitICONST_M1
in interfaceIVisitor
- Parameters:
inst
- Current ICONST_M1 instruction
-
visitIDIV
Divides two integers and puts the result onto the symbolic stack. -
visitIFEQ
Branches if the top value on the stack is equal to 0 -
visitIFGE
Branches if the top value on the stack is greater or equal to 0 -
visitIFGT
Branches if the top value on the stack is greater then 0 -
visitIFLE
Branches if the top value on the stack is less or equal to 0 -
visitIFLT
Branches if the top value on the stack is less then 0 -
visitIFNE
Checks if the current Value is not equal to 0 -
visitIFNONNULL
Checks if an object is not null and saves the resulting symbolic formula as a path constraint- Specified by:
visitIFNONNULL
in interfaceIVisitor
- Parameters:
inst
- The IFNONNULL instruction.
-
visitIFNULL
Checks if an object is null and saves the resulting symbolic formula as a path constraint- Specified by:
visitIFNULL
in interfaceIVisitor
- Parameters:
inst
- The IFNULL instruction.
-
visitIF_ACMPEQ
Checks if two object references are equal and saves the resulting symbolic formula as a path constraint- Specified by:
visitIF_ACMPEQ
in interfaceIVisitor
- Parameters:
inst
- The IF_ACMPEQ instruction.
-
visitIF_ACMPNE
Checks if two object references are not equal and saves the resulting symbolic formula as a path constraint- Specified by:
visitIF_ACMPNE
in interfaceIVisitor
- Parameters:
inst
- The IF_ACMPNE instruction.
-
visitIF_ICMPEQ
Checks if the two integers are equal- Specified by:
visitIF_ICMPEQ
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPEQ instruction
-
determineIid
public int determineIid(int iid) -
visitIF_ICMPGE
Checks if the integer is greater or equal to the second integer- Specified by:
visitIF_ICMPGE
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPGE instruction
-
visitIF_ICMPGT
Checks if the integer is greater than the second integer- Specified by:
visitIF_ICMPGT
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPGT instruction
-
visitIF_ICMPLE
Checks if the integer is less than or equal to the second integer- Specified by:
visitIF_ICMPLE
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPLE instruction
-
visitIF_ICMPLT
Checks if the integer is greater than the second integer- Specified by:
visitIF_ICMPLT
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPLT instruction
-
visitIF_ICMPNE
Checks if the wo integers are not equal- Specified by:
visitIF_ICMPNE
in interfaceIVisitor
- Parameters:
inst
- The IF_ICMPNE instruction
-
visitIINC
Increments an integer that is in the locals. No change to the symbolic stack -
visitILOAD
Loads an integer from the locals onto the stack After this instruction a GETVALUE_int instruction follows to fetch the concrete value if the sybolic locals did not contain the value- Specified by:
visitILOAD
in interfaceIVisitor
- Parameters:
inst
- The ILOAD instruction (including ILOAD_0 - ILOAD_3)
-
visitIMUL
Multiplies two integers and adds the result onto the symbolic stack -
visitINEG
Negates an integer and puts the resulting value onto the symbolic stack -
visitINSTANCEOF
Removes the object reference from the symbolic stack and pushes true onto the symbolic stack. ToDo (Nils): Find a way to push the correct value onto the stack here See: Issue 61- Specified by:
visitINSTANCEOF
in interfaceIVisitor
- Parameters:
inst
- The INSTANCEOF instruction.
-
visitINVOKEINTERFACE
Invokes an interface method on an object reference from the symbolic stack- Specified by:
visitINVOKEINTERFACE
in interfaceIVisitor
- Parameters:
inst
- The INVOKEINTERFACE instruction
-
visitINVOKESPECIAL
Invokes an instance method on an object reference from the symbolic stack- Specified by:
visitINVOKESPECIAL
in interfaceIVisitor
- Parameters:
inst
- The INVOKESPECIAL instruction
-
visitINVOKESTATIC
Invokes a static method- Specified by:
visitINVOKESTATIC
in interfaceIVisitor
- Parameters:
inst
- The INVOKESTATIC instruction
-
visitINVOKEVIRTUAL
Invokes a virtual method on an object reference from the symbolic stack- Specified by:
visitINVOKEVIRTUAL
in interfaceIVisitor
- Parameters:
inst
- The INVOKEVIRTUAL instruction
-
visitINVOKEDYNAMIC
Invokes a dynamic method- Specified by:
visitINVOKEDYNAMIC
in interfaceIVisitor
- Parameters:
inst
- The INVOKEDYNAMIC instruction
-
visitIOR
Calculates the bitwise OR of two integers and puts the result onto the symbolic stack -
visitIREM
Calculates the modulo of two integers and puts the result onto the symbolic stack -
visitIRETURN
Sets the return value of the current symbolic frame to the int value on top of the symbolic stack- Specified by:
visitIRETURN
in interfaceIVisitor
- Parameters:
inst
- The IRETURN instruction
-
visitISHL
Shifts an integer bitwise to the left and puts the result onto the symbolic stack -
visitISHR
Shifts an integer bitwise arithmetically to the right and puts the result onto the symbolic stack -
visitISTORE
Puts an integer from the symbolic stack into the symbolic locals- Specified by:
visitISTORE
in interfaceIVisitor
- Parameters:
inst
- The ISTORE instruction
-
visitISUB
Subtracts two ints and puts the result onto the symbolic stack -
visitIUSHR
Shifts an integer bitwise logically to the right and puts the result onto the symbolic stack- Specified by:
visitIUSHR
in interfaceIVisitor
- Parameters:
inst
- The IUSHR instruction
-
visitIXOR
Calculates the bitwise exclusive OR of two integers and puts the result onto the symbolic stack -
visitJSR
Jump subroutine. No symbolic handling needed. ToDo (Nils): The instruction pushes the return address onto the symbolic stack Should a placeholder be put here? See: Issue 62 -
visitL2D
-
visitL2F
-
visitL2I
-
visitLADD
Adds two longs and adds the result onto the symbolic stack -
visitLALOAD
Loads a long from an array and puts it onto the symbolic stack- Specified by:
visitLALOAD
in interfaceIVisitor
- Parameters:
inst
- The LALOAD instruction
-
visitLAND
Calculates the bitwise and of two longs in binary representation and puts the resulting long onto the stack -
visitLASTORE
Stores a long into an array- Specified by:
visitLASTORE
in interfaceIVisitor
- Parameters:
inst
- The LASTORE instruction
-
visitLCMP
Compares two longs and adds the result encoded as an integer onto the symbolic stack -
visitLCONST_0
Puts the constant 0L as a long onto the symbolic stack- Specified by:
visitLCONST_0
in interfaceIVisitor
- Parameters:
inst
- The LCONST_0 instruction
-
visitLCONST_1
Puts the constant 1L as a long onto the symbolic stack- Specified by:
visitLCONST_1
in interfaceIVisitor
- Parameters:
inst
- The LCONST_1 instruction
-
visitLDC_String
Puts a constant string onto the symbolic stack- Specified by:
visitLDC_String
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_String instruction
-
visitLDC_Object
Puts an object onto the symbolic stack- Specified by:
visitLDC_Object
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_Object instruction
-
visitLDC_double
Puts a constant double onto the symbolic stack- Specified by:
visitLDC_double
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_double instruction
-
visitLDC_float
Puts a constant float onto the symbolic stack- Specified by:
visitLDC_float
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_float instruction
-
visitLDC_int
Loads a constant int onto the symbolic stack- Specified by:
visitLDC_int
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_int instruction
-
visitLDC_long
Loads a constant long onto the symbolic stack- Specified by:
visitLDC_long
in interfaceIVisitor
- Parameters:
inst
- The (artificial) LDC_long instruction
-
visitLDIV
Divides two longs and puts the result onto the symbolic stack -
visitLLOAD
Loads a long from the symbolic locals and adds it to the symbolic stack- Specified by:
visitLLOAD
in interfaceIVisitor
- Parameters:
inst
- One of the LLOAD isntructions (LLOAD, LLOAD_0 - LLOAD_3)
-
visitLMUL
Multiplies two longs and puts the result onto the symbolic stack -
visitLNEG
Negates a long and puts the result onto the symbolic stack -
visitLOR
Calculates the bitwise or of two longs and puts the result onto the symbolic stack -
visitLREM
Calculates the modulo of two longs and puts the result onto the symbolic stack -
visitLRETURN
Sets the return value of the current symbolic frame to the long value on top of the symbolic stack- Specified by:
visitLRETURN
in interfaceIVisitor
- Parameters:
inst
- The LRETURN instruction
-
visitLSHL
Calculates the bitwise left shift of a long and puts the result onto the symbolic stack -
visitLSHR
Calculates the bitwise right shift of a long and puts the result onto the symbolic stack -
visitLSTORE
Stores the top value from the symbolic stack (long) into a slot in the symbolic locals- Specified by:
visitLSTORE
in interfaceIVisitor
- Parameters:
inst
- One of the LSTORE instructions (LSTORE, LSTORE_0 - LSTORE_3)
-
visitLSUB
Subtracts two longs and puts the result onto the symbolic stack -
visitLUSHR
Calculates the bitwise logical right shift of a long and puts the result onto the symbolic stack- Specified by:
visitLUSHR
in interfaceIVisitor
- Parameters:
inst
- The LUSHR instruction
-
visitLXOR
Calculates the bitwise exclusive or of two longs and puts the result onto the symbolic stack -
visitMONITORENTER
No symbolic behaviour defined.- Specified by:
visitMONITORENTER
in interfaceIVisitor
- Parameters:
inst
- The MONITORENTER instruction.
-
visitMONITOREXIT
No symbolic behaviour defined.- Specified by:
visitMONITOREXIT
in interfaceIVisitor
- Parameters:
inst
- The MONITOREXIT instruction.
-
visitNEW
-
visitNEWARRAY
- Specified by:
visitNEWARRAY
in interfaceIVisitor
-
visitNOP
Nothing to do here ;D -
visitPOP
Pops the top value from the symbolic stack. -
visitPOP2
Pops the top two values from the symbolic stack. -
visitPUTFIELD
Puts a value into the field of an object reference The handling has changed in the JVM: - SE11 (new) - SE7 (Old)- Specified by:
visitPUTFIELD
in interfaceIVisitor
- Parameters:
inst
- The PUTFIELD instruction
-
visitPUTSTATIC
Puts a value into a static field of a class- Specified by:
visitPUTSTATIC
in interfaceIVisitor
- Parameters:
inst
- The PUTSTATIC instruction
-
visitRET
Unconditional jump no handling needed -
visitRETURN
Returns void from method, no handling needed (here)- Specified by:
visitRETURN
in interfaceIVisitor
- Parameters:
inst
- The RETURN instruction
-
visitSALOAD
Retrieves a short from an array and puts it onto the symbolic stack- Specified by:
visitSALOAD
in interfaceIVisitor
- Parameters:
inst
- The SALOAD instruction.
-
visitSASTORE
Stores a short into an array- Specified by:
visitSASTORE
in interfaceIVisitor
- Parameters:
inst
- The SASTORE instruction.
-
visitSIPUSH
Pushes a short onto the symbolic stack as an integer- Specified by:
visitSIPUSH
in interfaceIVisitor
- Parameters:
inst
- The SIPUSH instruction
-
visitSWAP
Swaps the top two words on the symbolic stack -
visitINVOKEMETHOD_EXCEPTION
- Specified by:
visitINVOKEMETHOD_EXCEPTION
in interfaceIVisitor
-
visitINVOKEMETHOD_END
Removes a frame from the stack frame and puts the removed frame's return value onto the old (current) frame's stack- Specified by:
visitINVOKEMETHOD_END
in interfaceIVisitor
- Parameters:
inst
- INVOKEMETHOD_END
-
visitMAKE_SYMBOLIC
- Specified by:
visitMAKE_SYMBOLIC
in interfaceIVisitor
-
visitLOOP_BEGIN
- Specified by:
visitLOOP_BEGIN
in interfaceIVisitor
-
visitLOOP_END
- Specified by:
visitLOOP_END
in interfaceIVisitor
-
visitSPECIAL
- Specified by:
visitSPECIAL
in interfaceIVisitor
-
setNext
-
visitMULTIANEWARRAY
Creates a multidimensional array of references. Currently, no symbolic handling here because arrays are not of primitive type? See: Issue 63- Specified by:
visitMULTIANEWARRAY
in interfaceIVisitor
- Parameters:
inst
- The MULTIANEWARRAY instruction
-
visitLOOKUPSWITCH
Builds a path-constraint based on where the execution continues. ToDo (Nils): Constraint correctness not verified!- Specified by:
visitLOOKUPSWITCH
in interfaceIVisitor
- Parameters:
inst
- The LOOKUPSWITCH instruction.
-
visitTABLESWITCH
Builds a path-constraint based on where the execution continues. ToDo (Nils): Constraint correctness not verified!- Specified by:
visitTABLESWITCH
in interfaceIVisitor
- Parameters:
inst
- The TABLESWITCH instruction.
-
getStack
-
getSymbolicStateHandler
-
getCurrentFrame
-