Class BamLocationDependentJvmMemoryLocation<ContentT extends AbstractState<ContentT>>
java.lang.Object
proguard.analysis.cpa.jvm.domain.memory.BamLocationDependentJvmMemoryLocation<ContentT>
- Type Parameters:
ContentT- The content of the jvm states for the traced analysis, contained in the BAM cache. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
- All Implemented Interfaces:
BamLocationDependent<ContentT>,ProgramLocationDependent
public class BamLocationDependentJvmMemoryLocation<ContentT extends AbstractState<ContentT>>
extends Object
implements ProgramLocationDependent, BamLocationDependent<ContentT>
This class wraps a
JvmMemoryLocation adding information on its program location and
source reached set.-
Constructor Summary
ConstructorsConstructorDescriptionBamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation) BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanextractFirstValue(ContentT defaultValue) Extract the value from the first state from the reached state corresponding to the program, memory location, and BAM cache entry represented by this object.Returns the program location.Returns the reached set the abstract state belongs to.inthashCode()voidsetProgramLocation(JvmCfaNode programLocation) Sets the program location.voidsetSourceReachedSet(ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet) Sets the reached set the abstract state belongs to.toString()
-
Constructor Details
-
BamLocationDependentJvmMemoryLocation
-
BamLocationDependentJvmMemoryLocation
public BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
-
-
Method Details
-
getMemoryLocation
-
copy
-
extractFirstValue
Extract the value from the first state from the reached state corresponding to the program, memory location, and BAM cache entry represented by this object.Most analyses will have one state at most for each program location, and this method should be mostly used for this kind of analyses since it will return the only valid state. It's also possible that, for analyses where multiple states are possible, the returned value might be non-deterministic depending on the underlying reached set implementation.
- Returns:
- an empty optional if there is no analysis state in the cache entry and program location represented by this object. Otherwise, the content for the memory location specified by this object of the first state (there is usually only one state anyway, but this is analysis-dependent) for that program location.
-
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>>
-
equals
-
hashCode
public int hashCode() -
toString
-