public abstract class JvmTransferRelation<StateT extends LatticeAbstractState<StateT>> extends java.lang.Object implements ProgramLocationDependentForwardTransferRelation<JvmCfaNode,JvmCfaEdge,MethodSignature>
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 StateT |
calculateArithmeticInstruction(Instruction instruction,
java.util.List<StateT> operands)
Calculates the result of the instruction application.
|
protected StateT |
computeIncrement(StateT state,
int value)
Returns the abstract state of the incremented input
state by value . |
AbstractState |
generateEdgeAbstractSuccessor(AbstractState abstractState,
JvmCfaEdge edge,
Precision precision) |
StateT |
getAbstractByteConstant(byte b)
Returns an abstract representation of a byte constant
b . |
abstract StateT |
getAbstractDefault()
Returns a default abstract state.
|
java.util.List<StateT> |
getAbstractDoubleConstant(double d)
Returns an abstract representation of a double constant
d . |
StateT |
getAbstractFloatConstant(float f)
Returns an abstract representation of a float constant
f . |
StateT |
getAbstractIntegerConstant(int i)
Returns an abstract representation of an integer constant
i . |
java.util.List<StateT> |
getAbstractLongConstant(long l)
Returns an abstract representation of a long constant
l . |
StateT |
getAbstractNull()
Returns an abstract representation of a null reference.
|
StateT |
getAbstractReferenceValue(java.lang.String className)
Returns an abstract representation of a reference value
object . |
StateT |
getAbstractReferenceValue(java.lang.String className,
Clazz referencedClazz,
boolean mayBeExtension,
boolean mayBeNull)
Returns an abstract representation of a reference value
object . |
StateT |
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 . |
StateT |
getAbstractShortConstant(short s)
Returns an abstract representation of a short constant
s . |
protected JvmAbstractState<StateT> |
getAbstractSuccessorForInstruction(JvmAbstractState<StateT> abstractState,
Instruction instruction,
Clazz clazz,
Precision precision)
Returns the result of applying
instruction to the abstractState . |
protected StateT |
handleCheckCast(StateT state,
java.lang.String typeName)
Returns an abstract state representing the result of the
checkcast operation. |
void |
invokeMethod(JvmAbstractState<StateT> state,
Call call,
java.util.List<StateT> operands)
The default implementation computes join over its arguments.
|
protected StateT |
isInstanceOf(StateT state,
java.lang.String type)
Returns an abstract state representing the result of the
instanceof operation. |
protected void |
processCall(JvmAbstractState<StateT> 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, wait
getEdges
generateAbstractSuccessors, generateEdgeAbstractSuccessors, wrapAbstractSuccessorInCollection
public AbstractState generateEdgeAbstractSuccessor(AbstractState abstractState, JvmCfaEdge edge, Precision precision)
protected JvmAbstractState<StateT> getAbstractSuccessorForInstruction(JvmAbstractState<StateT> abstractState, Instruction instruction, Clazz clazz, Precision precision)
instruction
to the abstractState
.protected StateT calculateArithmeticInstruction(Instruction instruction, java.util.List<StateT> operands)
protected StateT computeIncrement(StateT state, int value)
state
by value
. The default
implementation computes the join.public StateT getAbstractByteConstant(byte b)
b
.public abstract StateT getAbstractDefault()
public java.util.List<StateT> getAbstractDoubleConstant(double d)
d
.public StateT getAbstractFloatConstant(float f)
f
.public StateT getAbstractIntegerConstant(int i)
i
.public java.util.List<StateT> getAbstractLongConstant(long l)
l
.public StateT getAbstractNull()
public StateT getAbstractShortConstant(short s)
s
.public StateT getAbstractReferenceValue(java.lang.String className)
object
.public StateT getAbstractReferenceValue(java.lang.String className, Clazz referencedClazz, boolean mayBeExtension, boolean mayBeNull)
object
.public StateT 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<StateT> state, Call call)
invokeMethod
.public void invokeMethod(JvmAbstractState<StateT> state, Call call, java.util.List<StateT> operands)
protected StateT isInstanceOf(StateT state, java.lang.String type)
instanceof
operation.