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 JvmMemoryLocationTransferRelation<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements TransferRelation<JvmMemoryLocationAbstractState<ContentT>>
JvmMemoryLocationTransferRelation computes the backward successors of an JvmMemoryLocationAbstractState for a given instruction. A backward successor is a memory
location which may have contributed to the value of the current JvmMemoryLocation.
The transfer relation uses a BamCache containing the results of an analysis in order
to calculate the successors JvmMemoryLocationAbstractState:
ProgramLocationDependentReachedSet (representing the results of the back-traced analysis
for the current method call with a specific entry state).
ReduceOperator of the back-traced analysis for the caller
abstract state and that have an exit state that results in the current state after applying
the ExpandOperator of the back-traced analysis).
ReduceOperator).
The value of the successor memory location is guaranteed to be greater than the threshold
(e.g. if ContentT is a SetAbstractState we can set
the threshold to SetAbstractState.bottom to guarantee we
don't calculate a successor if the taint is not propagated anymore). Thus, the threshold defines
the cut-off of the traces generated with JvmMemoryLocationTransferRelation.
| Constructor and Description |
|---|
JvmMemoryLocationTransferRelation(ContentT threshold,
BamCpa<ContentT> bamCpa,
java.util.Map<Call,java.util.Set<JvmMemoryLocation>> extraTaintPropagationLocations)
Create a memory location transfer relation.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<JvmMemoryLocationAbstractState<ContentT>> |
generateAbstractSuccessors(JvmMemoryLocationAbstractState<ContentT> abstractState,
Precision precision)
Returns abstract successor states of the
abstractState under the selected precision. |
protected java.util.List<JvmMemoryLocation> |
processCall(JvmMemoryLocation memoryLocation,
ConstantInstruction callInstruction,
Clazz clazz,
JvmCfaNode parentNode)
The default implementation traces the return value back to the method arguments and the
instance.
|
public JvmMemoryLocationTransferRelation(ContentT threshold, BamCpa<ContentT> bamCpa, java.util.Map<Call,java.util.Set<JvmMemoryLocation>> extraTaintPropagationLocations)
threshold - a cut-off thresholdbamCpa - the BAM cpa that was used to calculate the results in the cachepublic java.util.Collection<JvmMemoryLocationAbstractState<ContentT>> generateAbstractSuccessors(JvmMemoryLocationAbstractState<ContentT> abstractState, Precision precision)
TransferRelationabstractState under the selected precision.generateAbstractSuccessors in interface TransferRelation<JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>>protected java.util.List<JvmMemoryLocation> processCall(JvmMemoryLocation memoryLocation, ConstantInstruction callInstruction, Clazz clazz, JvmCfaNode parentNode)