Package de.uzl.its.swat.symbolic
Class Frame
java.lang.Object
de.uzl.its.swat.symbolic.Frame
A symbolic Stack Frame that stores Values in the symbolic Stack and symbolic locals
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intNumber of words that are returned on invoke method end -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets a Value into the symbolic locals at a specific index If the index is larger than the current max, a Placeholder Values are added until the index is reachedvoidAdds a two byte Value into the symbolic locals, at the next available index (not Placeholder) The two bytes are reflected by first adding a placeholder and then the actual valuevoidclear()Clears the symbolic stackValue<?,?> getLocal(int index) Gets a Value from the symbolic localsValue<?,?> getLocal2(int index) Gets a two byte Value from the symbolic localsThe symbolic version of Javas locals -- GETTER -- Gets all locals of the Frame (used for lambdas)Value<?,?> getRet()getStack()The symbolic version of Javas stackValue<?,?> peek()Peeks at the top element on the symbolic stack without popping itValue<?,?> peek2()Peeks at the top 2 elements on the symbolic stack without popping themValue<?,?> pop()Pops the top element from the symbolic stackValue<?,?> pop2()Pops the top 2 elements from the symbolic stackvoidvoidPushes one element onto the symbolic stackvoidPushes 2 elements onto the symbolic stack (used for e.g.voidSets a Value into the symbolic locals at a specific index If the index is larger than the current max, a Placeholder Values are added until the index is reachedvoidSets a two byte Value into the symbolic locals at a specific index If the index is larger than the current max, Placeholder Values are added until the index is reached The two bytes are reflected by first adding a placeholder and then the actual valuevoidSetter for the return value of the symbolic stack frametoString()Override of the default toString method for printing the Current symbolic stack frame and locals
-
Field Details
-
nReturnWords
public final int nReturnWordsNumber of words that are returned on invoke method end
-
-
Constructor Details
-
Frame
Constructor for Frame- Parameters:
nReturnWords- Number of words that are returned on invoke method end
-
-
Method Details
-
setRet
Setter for the return value of the symbolic stack frame- Parameters:
v- The return value for the invoked method
-
addLocal
Sets a Value into the symbolic locals at a specific index If the index is larger than the current max, a Placeholder Values are added until the index is reached- Parameters:
o- The Value that should be placed into the symbolic locals
-
addLocal2
Adds a two byte Value into the symbolic locals, at the next available index (not Placeholder) The two bytes are reflected by first adding a placeholder and then the actual value- Parameters:
o- The Value that should be placed into the symbolic locals
-
setLocal
Sets a Value into the symbolic locals at a specific index If the index is larger than the current max, a Placeholder Values are added until the index is reached- Parameters:
index- The index of the valueo- The Value that should be placed into the symbolic locals
-
getLocal
Gets a Value from the symbolic locals- Parameters:
index- The index to get from the symbolic locals, if the index does not exist, returns a Placeholder- Returns:
- The Value at position index in the symbolic locals
-
setLocal2
Sets a two byte Value into the symbolic locals at a specific index If the index is larger than the current max, Placeholder Values are added until the index is reached The two bytes are reflected by first adding a placeholder and then the actual value- Parameters:
index- The index of the valueo- The Value that should be placed into the symbolic locals
-
getLocal2
Gets a two byte Value from the symbolic locals- Parameters:
index- The index of the Value- Returns:
- The Value if the index exists, else a Placeholder
-
push
Pushes one element onto the symbolic stack- Parameters:
o- Value to be pushed onto the symbolic stack
-
push2
Pushes 2 elements onto the symbolic stack (used for e.g. for two byte datatype. THe second pushed value is a placeholder)- Parameters:
o- Value to be pushed onto the symbolic stack
-
pop
Pops the top element from the symbolic stack- Returns:
- the top element from the symbolic stack
-
pop2
Pops the top 2 elements from the symbolic stack- Returns:
- the top two elements from the symbolic stack
-
peek
Peeks at the top element on the symbolic stack without popping it- Returns:
- the top element from the symbolic stack
-
peek2
Peeks at the top 2 elements on the symbolic stack without popping them- Returns:
- the top two elements from the symbolic stack
-
clear
public void clear()Clears the symbolic stack -
printStack
public void printStack() -
toString
Override of the default toString method for printing the Current symbolic stack frame and locals -
getLocals
The symbolic version of Javas locals -- GETTER -- Gets all locals of the Frame (used for lambdas)- Returns:
- All locals
-
getStack
The symbolic version of Javas stack -
getRet
-
getClassName
-
getMethodName
-