public class JvmTaintTreeHeapFollowerAbstractState extends JvmTreeHeapFollowerAbstractState<SetAbstractState<JvmTaintSource>> implements JvmTaintHeapAbstractState
JvmTreeHeapFollowerAbstractState
with the possibility of object tainting.principal
defaultValue, heapMapAbstractStateFactory, heapNodeMapAbstractStateFactory, referenceToObject
Constructor and Description |
---|
JvmTaintTreeHeapFollowerAbstractState(JvmReferenceAbstractState principal,
SetAbstractState<JvmTaintSource> defaultValue,
MapAbstractState<Reference,HeapNode<SetAbstractState<JvmTaintSource>>> referenceToNode,
MapAbstractStateFactory<Reference,HeapNode<SetAbstractState<JvmTaintSource>>> heapMapAbstractStateFactory,
MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> heapNodeMapAbstractStateFactory)
Create a taint follower heap abstract state.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assignField(SetAbstractState<Reference> object,
java.lang.String descriptor,
SetAbstractState<JvmTaintSource> value)
Assigns the field value to the given one if the reference is unambiguous, joins otherwise.
|
JvmTaintTreeHeapFollowerAbstractState |
copy()
Creates a copy of itself.
|
<T> SetAbstractState<JvmTaintSource> |
getArrayElementOrDefault(T array,
SetAbstractState<JvmTaintSource> index,
SetAbstractState<JvmTaintSource> defaultValue)
Returns an
array element at the specified index or the defaultValue , if
the element is unset. |
<T> SetAbstractState<JvmTaintSource> |
getFieldOrDefault(T object,
java.lang.String fqn,
SetAbstractState<JvmTaintSource> defaultValue)
Returns a field
fqn from a reference object . |
JvmTaintTreeHeapFollowerAbstractState |
join(JvmHeapAbstractState<SetAbstractState<JvmTaintSource>> abstractState)
Computes a join over itself and the
abstractState . |
<T> void |
taintObject(T object,
SetAbstractState<JvmTaintSource> value)
Transitively applies the taint
value to the object . |
getReferenceAbstractState, newArray, newObject, reduce, setArrayElement, setField, setPrincipalState
equals, expand, getArrayElementOrDefault, getField, getHeapNode, hashCode, isLessOrEqual, mergeField, setArrayElement, setField
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
newObject
isLess
getPrecision, getStateByName
public JvmTaintTreeHeapFollowerAbstractState(JvmReferenceAbstractState principal, SetAbstractState<JvmTaintSource> defaultValue, MapAbstractState<Reference,HeapNode<SetAbstractState<JvmTaintSource>>> referenceToNode, MapAbstractStateFactory<Reference,HeapNode<SetAbstractState<JvmTaintSource>>> heapMapAbstractStateFactory, MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> 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> void taintObject(T object, SetAbstractState<JvmTaintSource> value)
JvmTaintHeapAbstractState
value
to the object
.taintObject
in interface JvmTaintHeapAbstractState
public <T> SetAbstractState<JvmTaintSource> getFieldOrDefault(T object, java.lang.String fqn, SetAbstractState<JvmTaintSource> defaultValue)
JvmHeapAbstractState
fqn
from a reference object
. If there is no abstract state
representing the field, returns the defaultValue
getFieldOrDefault
in interface JvmHeapAbstractState<SetAbstractState<JvmTaintSource>>
getFieldOrDefault
in class JvmTreeHeapFollowerAbstractState<SetAbstractState<JvmTaintSource>>
public <T> SetAbstractState<JvmTaintSource> getArrayElementOrDefault(T array, SetAbstractState<JvmTaintSource> index, SetAbstractState<JvmTaintSource> defaultValue)
JvmHeapAbstractState
array
element at the specified index
or the defaultValue
, if
the element is unset.getArrayElementOrDefault
in interface JvmHeapAbstractState<SetAbstractState<JvmTaintSource>>
getArrayElementOrDefault
in class JvmTreeHeapFollowerAbstractState<SetAbstractState<JvmTaintSource>>
protected void assignField(SetAbstractState<Reference> object, java.lang.String descriptor, SetAbstractState<JvmTaintSource> value)
JvmTreeHeapAbstractState
assignField
in class JvmTreeHeapAbstractState<SetAbstractState<JvmTaintSource>>
public JvmTaintTreeHeapFollowerAbstractState join(JvmHeapAbstractState<SetAbstractState<JvmTaintSource>> abstractState)
LatticeAbstractState
abstractState
.join
in interface LatticeAbstractState<JvmHeapAbstractState<SetAbstractState<JvmTaintSource>>>
join
in class JvmTreeHeapFollowerAbstractState<SetAbstractState<JvmTaintSource>>
public JvmTaintTreeHeapFollowerAbstractState copy()
AbstractState
copy
in interface AbstractState
copy
in interface JvmHeapAbstractState<SetAbstractState<JvmTaintSource>>
copy
in class JvmTreeHeapFollowerAbstractState<SetAbstractState<JvmTaintSource>>