Class JvmTransferRelation<ContentT extends AbstractState<ContentT>>
- java.lang.Object
-
- proguard.analysis.cpa.jvm.transfer.JvmTransferRelation<ContentT>
-
- Type Parameters:
ContentT- The content of the jvm states. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
- All Implemented Interfaces:
ProgramLocationDependentForwardTransferRelation<ContentT>,ProgramLocationDependentTransferRelation<ContentT>,TransferRelation<JvmAbstractState<ContentT>>
- Direct Known Subclasses:
JvmTaintTransferRelation,JvmValueTransferRelation
public abstract class JvmTransferRelation<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements ProgramLocationDependentForwardTransferRelation<ContentT>
TheJvmTransferRelationcomputes the successors of anJvmAbstractStatefor 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJvmTransferRelation.InstructionAbstractInterpreterThisInstructionVisitorperforms generic operations (e.g., loads, stores) parametrized by the specific behavior ofJvmTransferRelationfor instruction applications, method invocations, and constructing literals.
-
Constructor Summary
Constructors Constructor Description JvmTransferRelation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ContentTcalculateArithmeticInstruction(Instruction instruction, java.util.List<ContentT> operands)Calculates the result of the instruction application.protected ContentTcomputeIncrement(ContentT state, int value)Returns the abstract state of the incremented inputstatebyvalue.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 CFAedge.ContentTgetAbstractByteConstant(byte b)Returns an abstract representation of a byte constantb.abstract ContentTgetAbstractDefault()Returns a default abstract state.java.util.List<ContentT>getAbstractDoubleConstant(double d)Returns an abstract representation of a double constantd.ContentTgetAbstractFloatConstant(float f)Returns an abstract representation of a float constantf.ContentTgetAbstractIntegerConstant(int i)Returns an abstract representation of an integer constanti.java.util.List<ContentT>getAbstractLongConstant(long l)Returns an abstract representation of a long constantl.ContentTgetAbstractNull()Returns an abstract representation of a null reference.ContentTgetAbstractReferenceValue(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 valueobject.ContentTgetAbstractShortConstant(short s)Returns an abstract representation of a short constants.protected JvmAbstractState<ContentT>getAbstractSuccessorForInstruction(JvmAbstractState<ContentT> abstractState, Instruction instruction, Clazz clazz, Precision precision)Returns the result of applyinginstructionto theabstractState.protected ContentThandleCheckCast(ContentT state, java.lang.String typeName)Returns an abstract state representing the result of thecheckcastoperation.voidinvokeMethod(JvmAbstractState<ContentT> state, Call call, java.util.List<ContentT> operands)The default implementation computes join over its arguments.protected ContentTisInstanceOf(ContentT state, java.lang.String type)Returns an abstract state representing the result of theinstanceofoperation.protected voidprocessCall(JvmAbstractState<ContentT> state, Call call)Pops the arguments from the operand stack and passes them toinvokeMethod.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.interfaces.ProgramLocationDependentForwardTransferRelation
getEdges
-
Methods inherited from interface proguard.analysis.cpa.interfaces.ProgramLocationDependentTransferRelation
generateAbstractSuccessors, wrapAbstractSuccessorInCollection
-
-
-
-
Method Detail
-
generateEdgeAbstractSuccessors
public java.util.Collection<JvmAbstractState<ContentT>> generateEdgeAbstractSuccessors(JvmAbstractState<ContentT> abstractState, JvmCfaEdge edge, Precision precision)
Description copied from interface:ProgramLocationDependentTransferRelationComputes the successor states for the CFAedge.- Specified by:
generateEdgeAbstractSuccessorsin interfaceProgramLocationDependentTransferRelation<ContentT extends AbstractState<ContentT>>
-
generateEdgeAbstractSuccessor
public JvmAbstractState<ContentT> generateEdgeAbstractSuccessor(JvmAbstractState<ContentT> abstractState, JvmCfaEdge edge, Precision precision)
-
getAbstractSuccessorForInstruction
protected JvmAbstractState<ContentT> getAbstractSuccessorForInstruction(JvmAbstractState<ContentT> abstractState, Instruction instruction, Clazz clazz, Precision precision)
Returns the result of applyinginstructionto theabstractState.
-
calculateArithmeticInstruction
protected ContentT calculateArithmeticInstruction(Instruction instruction, java.util.List<ContentT> operands)
Calculates the result of the instruction application. The default implementation computes join over its arguments.
-
computeIncrement
protected ContentT computeIncrement(ContentT state, int value)
Returns the abstract state of the incremented inputstatebyvalue. The default implementation computes the join.
-
getAbstractByteConstant
public ContentT getAbstractByteConstant(byte b)
Returns an abstract representation of a byte constantb.
-
getAbstractDefault
public abstract ContentT getAbstractDefault()
Returns a default abstract state. In case of lattice abstract domains, it should be the bottom element.
-
getAbstractDoubleConstant
public java.util.List<ContentT> getAbstractDoubleConstant(double d)
Returns an abstract representation of a double constantd.
-
getAbstractFloatConstant
public ContentT getAbstractFloatConstant(float f)
Returns an abstract representation of a float constantf.
-
getAbstractIntegerConstant
public ContentT getAbstractIntegerConstant(int i)
Returns an abstract representation of an integer constanti.
-
getAbstractLongConstant
public java.util.List<ContentT> getAbstractLongConstant(long l)
Returns an abstract representation of a long constantl.
-
getAbstractNull
public ContentT getAbstractNull()
Returns an abstract representation of a null reference.
-
getAbstractShortConstant
public ContentT getAbstractShortConstant(short s)
Returns an abstract representation of a short constants.
-
getAbstractReferenceValue
public 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 valueobject.
-
processCall
protected void processCall(JvmAbstractState<ContentT> state, Call call)
Pops the arguments from the operand stack and passes them toinvokeMethod.
-
invokeMethod
public void invokeMethod(JvmAbstractState<ContentT> state, Call call, java.util.List<ContentT> operands)
The default implementation computes join over its arguments.
-
isInstanceOf
protected ContentT isInstanceOf(ContentT state, java.lang.String type)
Returns an abstract state representing the result of theinstanceofoperation.
-
-