public class JvmTreeHeapFollowerAbstractState<StateT extends LatticeAbstractState<StateT>> extends JvmTreeHeapAbstractState<StateT>
JvmTreeHeapPrincipalAbstractState instead for finding out which field/variable references an object.| Modifier and Type | Field and Description |
|---|---|
protected JvmReferenceAbstractState |
principal |
defaultValue, heapMapAbstractStateFactory, heapNodeMapAbstractStateFactory, referenceToObject| Constructor and Description |
|---|
JvmTreeHeapFollowerAbstractState(JvmReferenceAbstractState principal,
StateT defaultValue,
MapAbstractState<Reference,HeapNode<StateT>> referenceToNode,
MapAbstractStateFactory<Reference,HeapNode<StateT>> heapMapAbstractStateFactory,
MapAbstractStateFactory<java.lang.String,StateT> heapNodeMapAbstractStateFactory)
Create a follower heap abstract state.
|
| Modifier and Type | Method and Description |
|---|---|
JvmTreeHeapFollowerAbstractState<StateT> |
copy()
Creates a copy of itself.
|
<T> StateT |
getArrayElementOrDefault(T array,
StateT index,
StateT defaultValue)
Returns an
array element at the specified index or the defaultValue, if the element is unset. |
<T> StateT |
getFieldOrDefault(T object,
java.lang.String fqn,
StateT defaultValue)
Returns a field
fqn from a reference object. |
SetAbstractState<Reference> |
getReferenceAbstractState(JvmMemoryLocation principalMemoryLocation) |
JvmTreeHeapFollowerAbstractState<StateT> |
join(JvmHeapAbstractState<StateT> abstractState)
Computes a join over itself and the
abstractState. |
StateT |
newArray(java.lang.String type,
java.util.List<StateT> dimensions,
JvmCfaNode creationCite)
Creates a new array of a given class with the given dimension sizes at a specific program point and returns a reference to it.
|
StateT |
newObject(java.lang.String className,
JvmCfaNode creationCite)
Creates a new object of a given class at a specific program point and returns a reference to it.
|
void |
reduce(java.util.Set<java.lang.Object> references)
Removes all the nodes not present in the principal model.
|
<T> void |
setArrayElement(T array,
StateT index,
StateT value)
Sets the
array element value at the specified index. |
<T> void |
setField(T object,
java.lang.String fqn,
StateT value)
Sets a
value to a field fqn of a referenced object. |
void |
setPrincipalState(JvmReferenceAbstractState principal)
Sets the
principal abstract state containing references. |
assignField, equals, expand, getArrayElementOrDefault, getField, getHeapNode, hashCode, isLessOrEqual, mergeField, setArrayElement, setFieldclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitnewObjectisLessgetPrecision, getStateByNameprotected JvmReferenceAbstractState principal
public JvmTreeHeapFollowerAbstractState(JvmReferenceAbstractState principal, StateT defaultValue, MapAbstractState<Reference,HeapNode<StateT>> referenceToNode, MapAbstractStateFactory<Reference,HeapNode<StateT>> heapMapAbstractStateFactory, MapAbstractStateFactory<java.lang.String,StateT> heapNodeMapAbstractStateFactory)
principal - the principal heap abstract state containing reference abstract statesdefaultValue - the default value representing unknown valuesreferenceToNode - the mapping from references to heap nodesheapMapAbstractStateFactory - a map abstract state factory used for constructing the mapping from references to objectsheapNodeMapAbstractStateFactory - a map abstract state factory used for constructing the mapping from fields to valuespublic <T> StateT getFieldOrDefault(T object, java.lang.String fqn, StateT defaultValue)
JvmHeapAbstractStatefqn from a reference object.
If there is no abstract state representing the field, returns the defaultValuepublic <T> void setField(T object,
java.lang.String fqn,
StateT value)
JvmHeapAbstractStatevalue to a field fqn of a referenced object.public <T> StateT getArrayElementOrDefault(T array, StateT index, StateT defaultValue)
JvmHeapAbstractStatearray element at the specified index or the defaultValue, if the element is unset.public <T> void setArrayElement(T array,
StateT index,
StateT value)
JvmHeapAbstractStatearray element value at the specified index.public StateT newObject(java.lang.String className, JvmCfaNode creationCite)
JvmHeapAbstractStatepublic StateT newArray(java.lang.String type, java.util.List<StateT> dimensions, JvmCfaNode creationCite)
JvmHeapAbstractStatepublic void reduce(java.util.Set<java.lang.Object> references)
references - unusedpublic JvmTreeHeapFollowerAbstractState<StateT> join(JvmHeapAbstractState<StateT> abstractState)
LatticeAbstractStateabstractState.public JvmTreeHeapFollowerAbstractState<StateT> copy()
AbstractStatepublic void setPrincipalState(JvmReferenceAbstractState principal)
principal abstract state containing references.public SetAbstractState<Reference> getReferenceAbstractState(JvmMemoryLocation principalMemoryLocation)