Class JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>
java.lang.Object
proguard.analysis.cpa.jvm.domain.memory.JvmMemoryLocationAbstractState<ContentT>
- Type Parameters:
ContentT- The content of the jvm states for the traced analysis. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
- All Implemented Interfaces:
BamLocationDependent<ContentT>,AbstractState<JvmMemoryLocationAbstractState<ContentT>>,ProgramLocationDependent
public class JvmMemoryLocationAbstractState<ContentT extends AbstractState<ContentT>>
extends Object
implements AbstractState<JvmMemoryLocationAbstractState<ContentT>>, ProgramLocationDependent, BamLocationDependent<ContentT>
This
AbstractState consists of a BamLocationDependentJvmMemoryLocation with a set
of sources contributed into its value and the call stack that generated it.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn entry of the call stack of the state. -
Constructor Summary
ConstructorsConstructorDescriptionJvmMemoryLocationAbstractState(BamLocationDependentJvmMemoryLocation<ContentT> locationDependentMemoryLocation) Create aJvmMemoryLocationAbstractStatewith empty source locations and call stack.JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) Create aJvmMemoryLocationAbstractStatewith empty source locations and call stack.JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack) Create aJvmMemoryLocationAbstractStatewith empty source locations.JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations) Create aJvmMemoryLocationAbstractStatewith empty call stack.JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations, LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack) Create aJvmMemoryLocationAbstractStatewith source locations. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSourceLocation(BamLocationDependentJvmMemoryLocation<ContentT> sourceLocation) Adds a source location to the source set.booleancallStackContains(MethodSignature signature) Returns true if a method is present in the call stack.copy()Creates a copy of itself.Returns a shallow copy of the call stack.booleanReturns the program location.Returns the source set.Returns the reached set the abstract state belongs to.inthashCode()booleanisLessOrEqual(JvmMemoryLocationAbstractState<ContentT> abstractState) Compares itself to theabstractState(i.e., compare the states on the partial order provided by the domain of the analysis).join(JvmMemoryLocationAbstractState<ContentT> abstractState) Computes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).Returns the information of the caller, null if the caller of the method the state belongs to is unknown.voidsetProgramLocation(JvmCfaNode programLocation) Sets the program location.voidsetSourceReachedSet(ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) Sets the reached set the abstract state belongs to.static <ContentT extends AbstractState<ContentT>>
JvmMemoryLocationAbstractState<ContentT>top()Get the top state of the semi lattice for the given content type.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
getPrecision, isLess
-
Constructor Details
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(BamLocationDependentJvmMemoryLocation<ContentT> locationDependentMemoryLocation) Create aJvmMemoryLocationAbstractStatewith empty source locations and call stack.- Parameters:
locationDependentMemoryLocation- aJvmMemoryLocationin a specified program location coming from a specific reached set.
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) Create aJvmMemoryLocationAbstractStatewith empty source locations and call stack.- Parameters:
memoryLocation- a memory location.programLocation- the program location of the memory location.sourceReachedSet- the reached set of the traced analysis from which the analyzed state comes from.
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations) Create aJvmMemoryLocationAbstractStatewith empty call stack.- Parameters:
memoryLocation- a memory location.programLocation- the program location of the memory location.sourceReachedSet- the reached set of the traced analysis from which the analyzed state comes from.sourceLocations- the succcessor memory locations.
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack) Create aJvmMemoryLocationAbstractStatewith empty source locations.- Parameters:
memoryLocation- a memory location.programLocation- the program location of the memory location.sourceReachedSet- the reached set of the traced analysis from which the analyzed state comes from.callStack- the call stack.
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet, Set<BamLocationDependentJvmMemoryLocation<ContentT>> sourceLocations, LinkedList<JvmMemoryLocationAbstractState.StackEntry<ContentT>> callStack) Create aJvmMemoryLocationAbstractStatewith source locations.- Parameters:
memoryLocation- a memory location.programLocation- the program location of the memory location.sourceReachedSet- the reached set of the traced analysis from which the analyzed state comes from.sourceLocations- the succcessor memory locations.callStack- the call stack.
-
-
Method Details
-
getLocationDependentMemoryLocation
-
peekCallStack
Returns the information of the caller, null if the caller of the method the state belongs to is unknown. -
callStackContains
Returns true if a method is present in the call stack. -
copyStack
Returns a shallow copy of the call stack. -
join
public JvmMemoryLocationAbstractState<ContentT> join(JvmMemoryLocationAbstractState<ContentT> abstractState) Description copied from interface:AbstractStateComputes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).- Specified by:
joinin interfaceAbstractState<ContentT extends AbstractState<ContentT>>
-
isLessOrEqual
Description copied from interface:AbstractStateCompares itself to theabstractState(i.e., compare the states on the partial order provided by the domain of the analysis).- Specified by:
isLessOrEqualin interfaceAbstractState<ContentT extends AbstractState<ContentT>>
-
getProgramLocation
Description copied from interface:ProgramLocationDependentReturns the program location.- Specified by:
getProgramLocationin interfaceProgramLocationDependent
-
setProgramLocation
Description copied from interface:ProgramLocationDependentSets the program location.- Specified by:
setProgramLocationin interfaceProgramLocationDependent
-
getSourceReachedSet
Description copied from interface:BamLocationDependentReturns the reached set the abstract state belongs to.- Specified by:
getSourceReachedSetin interfaceBamLocationDependent<ContentT extends AbstractState<ContentT>>
-
setSourceReachedSet
public void setSourceReachedSet(ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) Description copied from interface:BamLocationDependentSets the reached set the abstract state belongs to.- Specified by:
setSourceReachedSetin interfaceBamLocationDependent<ContentT extends AbstractState<ContentT>>
-
addSourceLocation
Adds a source location to the source set. -
getSourceLocations
Returns the source set. -
copy
Description copied from interface:AbstractStateCreates a copy of itself.- Specified by:
copyin interfaceAbstractState<ContentT extends AbstractState<ContentT>>
-
equals
- Specified by:
equalsin interfaceAbstractState<ContentT extends AbstractState<ContentT>>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceAbstractState<ContentT extends AbstractState<ContentT>>- Overrides:
hashCodein classObject
-
top
public static <ContentT extends AbstractState<ContentT>> JvmMemoryLocationAbstractState<ContentT> top()Get the top state of the semi lattice for the given content type.- Type Parameters:
ContentT- The content of the jvm states. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
-