Class JvmMemoryLocationAbstractState<AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>>
- java.lang.Object
-
- proguard.analysis.cpa.jvm.domain.memory.JvmMemoryLocationAbstractState<AbstractStateT>
-
- Type Parameters:
AbstractStateT
- The type of the abstract states in the BAM cache.
- All Implemented Interfaces:
BamLocationDependent<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature>
,LatticeAbstractState<JvmMemoryLocationAbstractState<AbstractStateT>>
,AbstractState
,ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
public class JvmMemoryLocationAbstractState<AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>> extends java.lang.Object implements LatticeAbstractState<JvmMemoryLocationAbstractState<AbstractStateT>>, ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>, BamLocationDependent<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature>
ThisAbstractState
consists of aBamLocationDependentJvmMemoryLocation
with a set of sources contributed into its value and the call stack that generated it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JvmMemoryLocationAbstractState.StackEntry
An entry of the call stack of the state.
-
Field Summary
Fields Modifier and Type Field Description static JvmMemoryLocationAbstractState
top
-
Constructor Summary
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSourceLocation(BamLocationDependentJvmMemoryLocation<AbstractStateT> sourceLocation)
Adds a source location to the source set.boolean
callStackContains(MethodSignature signature)
Returns true if a method is present in the call stack.JvmMemoryLocationAbstractState
copy()
Creates a copy of itself.java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry>
copyStack()
Returns a shallow copy of the call stack.boolean
equals(java.lang.Object obj)
BamLocationDependentJvmMemoryLocation<AbstractStateT>
getLocationDependentMemoryLocation()
JvmCfaNode
getProgramLocation()
Returns the program location.java.util.Set<BamLocationDependentJvmMemoryLocation<AbstractStateT>>
getSourceLocations()
Returns the source set.ProgramLocationDependentReachedSet<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature>
getSourceReachedSet()
Returns the reached set the abstract state belongs to.int
hashCode()
boolean
isLessOrEqual(JvmMemoryLocationAbstractState<AbstractStateT> abstractState)
Compares itself to theabstractState
.JvmMemoryLocationAbstractState
join(JvmMemoryLocationAbstractState abstractState)
Computes a join over itself and theabstractState
.JvmMemoryLocationAbstractState.StackEntry
peekCallStack()
Returns the information of the caller, null if the caller of the method the state belongs to is unknown.void
setProgramLocation(JvmCfaNode programLocation)
Sets the program location.void
setSourceReachedSet(ProgramLocationDependentReachedSet<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet)
Sets the reached set the abstract state belongs to.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
getPrecision, getStateByName
-
Methods inherited from interface proguard.analysis.cpa.defaults.LatticeAbstractState
isLess
-
-
-
-
Field Detail
-
top
public static final JvmMemoryLocationAbstractState top
-
-
Constructor Detail
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(BamLocationDependentJvmMemoryLocation<AbstractStateT> locationDependentMemoryLocation)
Create aJvmMemoryLocationAbstractState
with empty source locations and call stack.- Parameters:
locationDependentMemoryLocation
- aJvmMemoryLocation
in a specified program location coming from a specific reached set.
-
JvmMemoryLocationAbstractState
public JvmMemoryLocationAbstractState(JvmMemoryLocation memoryLocation, JvmCfaNode programLocation, ProgramLocationDependentReachedSet<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet)
Create aJvmMemoryLocationAbstractState
with 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<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet, java.util.Set<BamLocationDependentJvmMemoryLocation<AbstractStateT>> sourceLocations)
Create aJvmMemoryLocationAbstractState
with 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<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet, java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry> callStack)
Create aJvmMemoryLocationAbstractState
with 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<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet, java.util.Set<BamLocationDependentJvmMemoryLocation<AbstractStateT>> sourceLocations, java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry> callStack)
Create aJvmMemoryLocationAbstractState
with 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 Detail
-
getLocationDependentMemoryLocation
public BamLocationDependentJvmMemoryLocation<AbstractStateT> getLocationDependentMemoryLocation()
-
peekCallStack
public JvmMemoryLocationAbstractState.StackEntry peekCallStack()
Returns the information of the caller, null if the caller of the method the state belongs to is unknown.
-
callStackContains
public boolean callStackContains(MethodSignature signature)
Returns true if a method is present in the call stack.
-
copyStack
public java.util.LinkedList<JvmMemoryLocationAbstractState.StackEntry> copyStack()
Returns a shallow copy of the call stack.
-
join
public JvmMemoryLocationAbstractState join(JvmMemoryLocationAbstractState abstractState)
Description copied from interface:LatticeAbstractState
Computes a join over itself and theabstractState
.- Specified by:
join
in interfaceLatticeAbstractState<AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>>
-
isLessOrEqual
public boolean isLessOrEqual(JvmMemoryLocationAbstractState<AbstractStateT> abstractState)
Description copied from interface:LatticeAbstractState
Compares itself to theabstractState
.- Specified by:
isLessOrEqual
in interfaceLatticeAbstractState<AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>>
-
getProgramLocation
public JvmCfaNode getProgramLocation()
Description copied from interface:ProgramLocationDependent
Returns the program location.- Specified by:
getProgramLocation
in interfaceProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
-
setProgramLocation
public void setProgramLocation(JvmCfaNode programLocation)
Description copied from interface:ProgramLocationDependent
Sets the program location.- Specified by:
setProgramLocation
in interfaceProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
-
getSourceReachedSet
public ProgramLocationDependentReachedSet<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> getSourceReachedSet()
Description copied from interface:BamLocationDependent
Returns the reached set the abstract state belongs to.- Specified by:
getSourceReachedSet
in interfaceBamLocationDependent<JvmCfaNode,JvmCfaEdge,AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>,MethodSignature>
-
setSourceReachedSet
public void setSourceReachedSet(ProgramLocationDependentReachedSet<JvmCfaNode,JvmCfaEdge,AbstractStateT,MethodSignature> sourceReachedSet)
Description copied from interface:BamLocationDependent
Sets the reached set the abstract state belongs to.- Specified by:
setSourceReachedSet
in interfaceBamLocationDependent<JvmCfaNode,JvmCfaEdge,AbstractStateT extends AbstractState & ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>,MethodSignature>
-
addSourceLocation
public void addSourceLocation(BamLocationDependentJvmMemoryLocation<AbstractStateT> sourceLocation)
Adds a source location to the source set.
-
getSourceLocations
public java.util.Set<BamLocationDependentJvmMemoryLocation<AbstractStateT>> getSourceLocations()
Returns the source set.
-
copy
public JvmMemoryLocationAbstractState copy()
Description copied from interface:AbstractState
Creates a copy of itself.- Specified by:
copy
in interfaceAbstractState
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfaceAbstractState
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceAbstractState
- Overrides:
hashCode
in classjava.lang.Object
-
-