public class JvmValueAbstractState extends JvmAbstractState<ValueAbstractState>
DEFAULT_FIELD, frame, heap, programLocation, staticFields, topLocation
Constructor and Description |
---|
JvmValueAbstractState(ValueFactory valueFactory,
ExecutingInvocationUnit executingInvocationUnit,
JvmCfaNode programLocation,
JvmFrameAbstractState<ValueAbstractState> frame,
JvmHeapAbstractState<ValueAbstractState> heap,
MapAbstractState<java.lang.String,ValueAbstractState> staticFields)
Create a JVM value abstract state.
|
Modifier and Type | Method and Description |
---|---|
JvmValueAbstractState |
copy()
Creates a copy of itself.
|
boolean |
equals(java.lang.Object obj) |
ValueFactory |
getValueFactory()
Returns the
ValueFactory . |
ValueAbstractState |
getVariableOrDefault(int index,
ValueAbstractState defaultState)
Returns an abstract state at the
index th position of the variable array, the
corresponding heap value for an IdentifiedReferenceValue or defaultState if
there is no entry. |
JvmValueAbstractState |
join(JvmAbstractState<ValueAbstractState> abstractState)
Computes a join over itself and the
abstractState . |
ValueAbstractState |
newObject(Clazz clazz)
Returns an
ValueAbstractState state for a new object of the given Clazz . |
ValueAbstractState |
newObject(java.lang.String className)
Returns an
ValueAbstractState for a new object of the given className . |
<T> void |
setField(T object,
ValueAbstractState value)
Sets the default field of the
object to value . |
ValueAbstractState |
setVariable(int index,
ValueAbstractState state,
ValueAbstractState defaultState)
Sets the
index th position of the variable array to state and returns state . |
java.lang.String |
toString() |
clearOperandStack, getArrayElementOrDefault, getFieldOrDefault, getFieldOrDefault, getFrame, getHeap, getProgramLocation, getStaticFields, getStaticOrDefault, hashCode, isLessOrEqual, newArray, peek, peek, peekOrDefault, peekOrDefault, pop, popOrDefault, push, pushAll, setArrayElement, setField, setProgramLocation, setStatic
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isLess
getPrecision, getStateByName
public JvmValueAbstractState(ValueFactory valueFactory, ExecutingInvocationUnit executingInvocationUnit, JvmCfaNode programLocation, JvmFrameAbstractState<ValueAbstractState> frame, JvmHeapAbstractState<ValueAbstractState> heap, MapAbstractState<java.lang.String,ValueAbstractState> staticFields)
valueFactory
- a ValueFactory which is used to create abstract values.executingInvocationUnit
- an ExecutingInvocationUnit which is used to execute methods
reflectively.programLocation
- a CFA nodeframe
- a frame abstract stateheap
- a heap abstract statestaticFields
- a static field tablepublic ValueFactory getValueFactory()
ValueFactory
.public ValueAbstractState getVariableOrDefault(int index, ValueAbstractState defaultState)
index
th position of the variable array, the
corresponding heap value for an IdentifiedReferenceValue
or defaultState
if
there is no entry.getVariableOrDefault
in class JvmAbstractState<ValueAbstractState>
public ValueAbstractState setVariable(int index, ValueAbstractState state, ValueAbstractState defaultState)
index
th position of the variable array to state
and returns state
. If the array has to be extended, the added cells are padded with defaultState
.
If the value is an IdentifiedReferenceValue
, the corresponding heap value is also
updated.
setVariable
in class JvmAbstractState<ValueAbstractState>
public ValueAbstractState newObject(java.lang.String className)
ValueAbstractState
for a new object of the given className
.newObject
in class JvmAbstractState<ValueAbstractState>
public ValueAbstractState newObject(Clazz clazz)
ValueAbstractState
state for a new object of the given Clazz
.newObject
in class JvmAbstractState<ValueAbstractState>
public <T> void setField(T object, ValueAbstractState value)
JvmAbstractState
object
to value
.setField
in class JvmAbstractState<ValueAbstractState>
public JvmValueAbstractState join(JvmAbstractState<ValueAbstractState> abstractState)
LatticeAbstractState
abstractState
.join
in interface LatticeAbstractState<JvmAbstractState<ValueAbstractState>>
join
in class JvmAbstractState<ValueAbstractState>
public JvmValueAbstractState copy()
AbstractState
copy
in interface AbstractState
copy
in class JvmAbstractState<ValueAbstractState>
public boolean equals(java.lang.Object obj)
equals
in interface AbstractState
equals
in class JvmAbstractState<ValueAbstractState>
public java.lang.String toString()
toString
in class java.lang.Object