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 java.lang.Object implements ProgramLocationDependent, BamLocationDependent<ContentT>
This class wraps aJvmMemoryLocationadding information on its program location and source reached set.
-
-
Constructor Summary
Constructors Constructor Description BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation)BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BamLocationDependentJvmMemoryLocation<ContentT>copy()booleanequals(java.lang.Object obj)ContentTextractFirstValue(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.JvmMemoryLocationgetMemoryLocation()JvmCfaNodegetProgramLocation()Returns the program location.ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>>getSourceReachedSet()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.java.lang.StringtoString()
-
-
-
Constructor Detail
-
BamLocationDependentJvmMemoryLocation
public BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation)
-
BamLocationDependentJvmMemoryLocation
public BamLocationDependentJvmMemoryLocation(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> sourceReachedSet)
-
-
Method Detail
-
getMemoryLocation
public JvmMemoryLocation getMemoryLocation()
-
copy
public BamLocationDependentJvmMemoryLocation<ContentT> copy()
-
extractFirstValue
public ContentT extractFirstValue(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.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
public JvmCfaNode getProgramLocation()
Description copied from interface:ProgramLocationDependentReturns the program location.- Specified by:
getProgramLocationin interfaceProgramLocationDependent
-
setProgramLocation
public void setProgramLocation(JvmCfaNode programLocation)
Description copied from interface:ProgramLocationDependentSets the program location.- Specified by:
setProgramLocationin interfaceProgramLocationDependent
-
getSourceReachedSet
public ProgramLocationDependentReachedSet<JvmAbstractState<ContentT>> 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
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-