ContentT - The content of the jvm states for the traced analysis. For example, this can be
a SetAbstractState of taints for taint analysis or a ValueAbstractState for value analysis.public class JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements AbstractState<JvmMemoryLocationAbstractState<ContentT>>, ProgramLocationDependent, BamLocationDependent<ContentT>
AbstractState consists of a BamLocationDependentJvmMemoryLocation with a set
of sources contributed into its value and the call stack that generated it.| Modifier and Type | Class and Description |
|---|---|
static class |
JvmMemoryLocationAbstractState.StackEntry<ContentT extends AbstractState<ContentT>>
An entry of the call stack of the state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceLocation(BamLocationDependentJvmMemoryLocation<ContentT> sourceLocation)
Adds a source location to the source set.
|
boolean |
callStackContains(MethodSignature signature)
Returns true if a method is present in the call stack.
|
JvmMemoryLocationAbstractState<ContentT> |
copy()
Creates a copy of itself.
|
java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> |
copyStack()
Returns a shallow copy of the call stack.
|
boolean |
equals(java.lang.Object obj) |
BamLocationDependentJvmMemoryLocation<ContentT> |
getLocationDependentMemoryLocation() |
JvmCfaNode |
getProgramLocation()
Returns the program location.
|
java.util.Set<BamLocationDependentJvmMemoryLocation<ContentT>> |
getSourceLocations()
Returns the source set.
|
ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> |
getSourceReachedSet()
Returns the reached set the abstract state belongs to.
|
int |
hashCode() |
boolean |
isLessOrEqual(JvmMemoryLocationAbstractState<ContentT> abstractState)
Compares itself to the
abstractState (i.e., compare the states on the partial order
provided by the domain of the analysis). |
JvmMemoryLocationAbstractState<ContentT> |
join(JvmMemoryLocationAbstractState<ContentT> abstractState)
Computes a join over itself and another abstract state
abstractState (i.e., finds the
least upper bound on the semilattice). |
JvmMemoryLocationAbstractState.StackEntry<ContentT> |
peekCallStack()
Returns the information of the caller, null if the caller of the method the state belongs to is
unknown.
|
void |
setProgramLocation(JvmCfaNode programLocation)
Sets the program location.
|
void |
setSourceReachedSet(ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
Sets the reached set the abstract state belongs to.
|
static <ContentT extends AbstractState<ContentT>> |
top()
Get the top state of the semi lattice for the given content type.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetPrecision, isLesspublic JvmMemoryLocationAbstractState(BamLocationDependentJvmMemoryLocation<ContentT> locationDependentMemoryLocation)
JvmMemoryLocationAbstractState with empty source locations and call stack.locationDependentMemoryLocation - a JvmMemoryLocation in a specified program
location coming from a specific reached set.public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
JvmMemoryLocationAbstractState with empty source locations and call stack.memoryLocation - a memory location.programLocation - the program location of the memory location.sourceReachedSet - the reached set of the traced analysis from which the analyzed state
comes from.public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, java.util.Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations)
JvmMemoryLocationAbstractState with empty call stack.memoryLocation - a memory location.programLocation - the program location of the memory location.sourceReachedSet - the reached set of the traced analysis from which the analyzed state
comes from.sourceLocations - the succcessor memory locations.public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack)
JvmMemoryLocationAbstractState with empty source locations.memoryLocation - a memory location.programLocation - the program location of the memory location.sourceReachedSet - the reached set of the traced analysis from which the analyzed state
comes from.callStack - the call stack.public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, java.util.Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations, java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack)
JvmMemoryLocationAbstractState with source locations.memoryLocation - a memory location.programLocation - the program location of the memory location.sourceReachedSet - the reached set of the traced analysis from which the analyzed state
comes from.sourceLocations - the succcessor memory locations.callStack - the call stack.public BamLocationDependentJvmMemoryLocation<ContentT> getLocationDependentMemoryLocation()
public JvmMemoryLocationAbstractState.StackEntry<ContentT> peekCallStack()
public boolean callStackContains(MethodSignature signature)
public java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> copyStack()
public JvmMemoryLocationAbstractState<ContentT> join(JvmMemoryLocationAbstractState<ContentT> abstractState)
AbstractStateabstractState (i.e., finds the
least upper bound on the semilattice).join in interface AbstractState<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>public boolean isLessOrEqual(JvmMemoryLocationAbstractState<ContentT> abstractState)
AbstractStateabstractState (i.e., compare the states on the partial order
provided by the domain of the analysis).isLessOrEqual in interface AbstractState<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>public JvmCfaNode getProgramLocation()
ProgramLocationDependentgetProgramLocation in interface ProgramLocationDependentpublic void setProgramLocation(JvmCfaNode programLocation)
ProgramLocationDependentsetProgramLocation in interface ProgramLocationDependentpublic ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> getSourceReachedSet()
BamLocationDependentgetSourceReachedSet in interface BamLocationDependent<ContentT extends AbstractState<ContentT>>public void setSourceReachedSet(ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
BamLocationDependentsetSourceReachedSet in interface BamLocationDependent<ContentT extends AbstractState<ContentT>>public void addSourceLocation(BamLocationDependentJvmMemoryLocation<ContentT> sourceLocation)
public java.util.Set<BamLocationDependentJvmMemoryLocation<ContentT>> getSourceLocations()
public JvmMemoryLocationAbstractState<ContentT> copy()
AbstractStatecopy in interface AbstractState<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>public boolean equals(java.lang.Object obj)
equals in interface AbstractState<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface AbstractState<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>hashCode in class java.lang.Objectpublic static <ContentT extends AbstractState<ContentT>> JvmMemoryLocationAbstractState<ContentT> top()
ContentT - The content of the jvm states. For example, this can be a SetAbstractState of taints for taint analysis or a ValueAbstractState for value analysis.