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.public abstract class JvmTransferRelation<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements ProgramLocationDependentForwardTransferRelation<ContentT>
JvmTransferRelation computes the successors of an JvmAbstractState for a
given instruction. It stores category 2 computational types as tuples of the abstract state
containing the information about the value in the most significant bits and a default abstract
state in the least significant bits of the big-endian notation.| Modifier and Type | Class and Description |
|---|---|
protected class |
JvmTransferRelation.InstructionAbstractInterpreter
This
InstructionVisitor performs generic operations (e.g., loads, stores) parametrized
by the specific behavior of JvmTransferRelation for instruction applications, method
invocations, and constructing literals. |
| Constructor and Description |
|---|
JvmTransferRelation() |
| Modifier and Type | Method and Description |
|---|---|
protected ContentT |
calculateArithmeticInstruction(Instruction instruction,
java.util.List<ContentT> operands)
Calculates the result of the instruction application.
|
protected ContentT |
computeIncrement(ContentT state,
int value)
Returns the abstract state of the incremented input
state by value. |
JvmAbstractState<ContentT> |
generateEdgeAbstractSuccessor(JvmAbstractState<ContentT> abstractState,
JvmCfaEdge edge,
Precision precision) |
java.util.Collection<JvmAbstractState<ContentT>> |
generateEdgeAbstractSuccessors(JvmAbstractState<ContentT> abstractState,
JvmCfaEdge edge,
Precision precision)
Computes the successor states for the CFA
edge. |
ContentT |
getAbstractByteConstant(byte b)
Returns an abstract representation of a byte constant
b. |
abstract ContentT |
getAbstractDefault()
Returns a default abstract state.
|
java.util.List<ContentT> |
getAbstractDoubleConstant(double d)
Returns an abstract representation of a double constant
d. |
ContentT |
getAbstractFloatConstant(float f)
Returns an abstract representation of a float constant
f. |
ContentT |
getAbstractIntegerConstant(int i)
Returns an abstract representation of an integer constant
i. |
java.util.List<ContentT> |
getAbstractLongConstant(long l)
Returns an abstract representation of a long constant
l. |
ContentT |
getAbstractNull()
Returns an abstract representation of a null reference.
|
ContentT |
getAbstractReferenceValue(java.lang.String className,
Clazz referencedClazz,
boolean mayBeExtension,
boolean mayBeNull,
Clazz creationClass,
Method creationMethod,
int creationOffset,
java.lang.Object value)
Returns an abstract representation of a reference value
object. |
ContentT |
getAbstractShortConstant(short s)
Returns an abstract representation of a short constant
s. |
protected JvmAbstractState<ContentT> |
getAbstractSuccessorForInstruction(JvmAbstractState<ContentT> abstractState,
Instruction instruction,
Clazz clazz,
Precision precision)
Returns the result of applying
instruction to the abstractState. |
protected ContentT |
handleCheckCast(ContentT state,
java.lang.String typeName)
Returns an abstract state representing the result of the
checkcast operation. |
void |
invokeMethod(JvmAbstractState<ContentT> state,
Call call,
java.util.List<ContentT> operands)
The default implementation computes join over its arguments.
|
protected ContentT |
isInstanceOf(ContentT state,
java.lang.String type)
Returns an abstract state representing the result of the
instanceof operation. |
protected void |
processCall(JvmAbstractState<ContentT> state,
Call call)
Pops the arguments from the operand stack and passes them to
invokeMethod. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEdgesgenerateAbstractSuccessors, wrapAbstractSuccessorInCollectionpublic java.util.Collection<JvmAbstractState<ContentT>> generateEdgeAbstractSuccessors(JvmAbstractState<ContentT> abstractState, JvmCfaEdge edge, Precision precision)
ProgramLocationDependentTransferRelationedge.generateEdgeAbstractSuccessors in interface ProgramLocationDependentTransferRelation<ContentT extends AbstractState<ContentT>>public JvmAbstractState<ContentT> generateEdgeAbstractSuccessor(JvmAbstractState<ContentT> abstractState, JvmCfaEdge edge, Precision precision)
protected JvmAbstractState<ContentT> getAbstractSuccessorForInstruction(JvmAbstractState<ContentT> abstractState, Instruction instruction, Clazz clazz, Precision precision)
instruction to the abstractState.protected ContentT calculateArithmeticInstruction(Instruction instruction, java.util.List<ContentT> operands)
protected ContentT computeIncrement(ContentT state, int value)
state by value. The default
implementation computes the join.public ContentT getAbstractByteConstant(byte b)
b.public abstract ContentT getAbstractDefault()
public java.util.List<ContentT> getAbstractDoubleConstant(double d)
d.public ContentT getAbstractFloatConstant(float f)
f.public ContentT getAbstractIntegerConstant(int i)
i.public java.util.List<ContentT> getAbstractLongConstant(long l)
l.public ContentT getAbstractNull()
public ContentT getAbstractShortConstant(short s)
s.public ContentT getAbstractReferenceValue(java.lang.String className, Clazz referencedClazz, boolean mayBeExtension, boolean mayBeNull, Clazz creationClass, Method creationMethod, int creationOffset, java.lang.Object value)
object.protected void processCall(JvmAbstractState<ContentT> state, Call call)
invokeMethod.public void invokeMethod(JvmAbstractState<ContentT> state, Call call, java.util.List<ContentT> operands)
protected ContentT isInstanceOf(ContentT state, java.lang.String type)
instanceof operation.