public class CompositeHeapJvmAbstractState extends AbstractWrapperState implements LatticeAbstractState<CompositeHeapJvmAbstractState>, ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
AbstractWrapperState
stores a JvmReferenceAbstractState
having the JvmTreeHeapPrincipalAbstractState
and a sequence of
JvmAbstractState
s which may have JvmTreeHeapFollowerAbstractState
s depending on
the first abstract state. Join and copy are done elementwise preserving the link between the heap
models.
The composite abstract state must have the JvmReferenceAbstractState
at its REFERENCE_STATE_INDEX
th position. This abstract state will be used as the principal heap model
for other abstract states.
Modifier and Type | Field and Description |
---|---|
static int |
REFERENCE_STATE_INDEX |
Constructor and Description |
---|
CompositeHeapJvmAbstractState(java.util.List<JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>>> jvmAbstractStates)
Create a composite abstract state from a list of JVM abstract states.
|
Modifier and Type | Method and Description |
---|---|
AbstractState |
copy()
Creates a copy of itself.
|
JvmCfaNode |
getProgramLocation()
Returns the program location.
|
JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>> |
getStateByIndex(int index)
Returns the state at the specified position in the composite state.
|
AbstractState |
getStateByName(java.lang.String name)
Returns an abstract state for a given if the state is composite, returns
self otherwise. |
java.util.List<JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>>> |
getWrappedStates()
Returns the wrapped abstract states.
|
boolean |
isLessOrEqual(CompositeHeapJvmAbstractState abstractState)
Compares itself to the
abstractState . |
CompositeHeapJvmAbstractState |
join(CompositeHeapJvmAbstractState abstractState)
Computes a join over itself and the
abstractState . |
void |
setProgramLocation(JvmCfaNode programLocation)
Sets the program location.
|
void |
updateHeapDependence() |
equals, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isLess
equals, getPrecision, hashCode
public static final int REFERENCE_STATE_INDEX
public CompositeHeapJvmAbstractState(java.util.List<JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>>> jvmAbstractStates)
jvmAbstractStates
- a list of JvmAbstractState
s, must contain a JvmReferenceAbstractState
at its REFERENCE_INDEX
th positionpublic JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>> getStateByIndex(int index)
public void updateHeapDependence()
public java.util.List<JvmAbstractState<? extends LatticeAbstractState<? extends AbstractState>>> getWrappedStates()
AbstractWrapperState
getWrappedStates
in class AbstractWrapperState
public CompositeHeapJvmAbstractState join(CompositeHeapJvmAbstractState abstractState)
LatticeAbstractState
abstractState
.join
in interface LatticeAbstractState<CompositeHeapJvmAbstractState>
public boolean isLessOrEqual(CompositeHeapJvmAbstractState abstractState)
LatticeAbstractState
abstractState
.isLessOrEqual
in interface LatticeAbstractState<CompositeHeapJvmAbstractState>
public JvmCfaNode getProgramLocation()
ProgramLocationDependent
getProgramLocation
in interface ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
public void setProgramLocation(JvmCfaNode programLocation)
ProgramLocationDependent
setProgramLocation
in interface ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
public AbstractState getStateByName(java.lang.String name)
AbstractState
self
otherwise.getStateByName
in interface AbstractState
public AbstractState copy()
AbstractState
copy
in interface AbstractState