Class JvmReferenceAbstractState
- java.lang.Object
-
- proguard.analysis.cpa.jvm.state.JvmAbstractState<SetAbstractState<Reference>>
-
- proguard.analysis.cpa.jvm.domain.reference.JvmReferenceAbstractState
-
- All Implemented Interfaces:
LatticeAbstractState<JvmAbstractState<SetAbstractState<Reference>>>
,AbstractState
,ProgramLocationDependent<JvmCfaNode,JvmCfaEdge,MethodSignature>
public class JvmReferenceAbstractState extends JvmAbstractState<SetAbstractState<Reference>>
AJvmAbstractState
for the reference CPA. Since the analysis may skip library methods which include some constructors, it treats missing information about variables (i.e., initialization) as if they were references to distinct heap locations. Thus, we can approximate missing analysis of library constructors and call site of the entry method. Thus, some aliasing can be missed and the analysis result becomes unsound.
-
-
Field Summary
-
Fields inherited from class proguard.analysis.cpa.jvm.state.JvmAbstractState
DEFAULT_FIELD, frame, heap, programLocation, staticFields, topLocation
-
-
Constructor Summary
Constructors Constructor Description JvmReferenceAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<SetAbstractState<Reference>> frame, JvmHeapAbstractState<SetAbstractState<Reference>> heap, MapAbstractState<java.lang.String,SetAbstractState<Reference>> staticFields)
Create a JVM reference abstract state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JvmReferenceAbstractState
copy()
Creates a copy of itself.<T> SetAbstractState<Reference>
getFieldOrDefault(T object, java.lang.String descriptor, SetAbstractState<Reference> defaultValue)
Returns an abstract state representing the fielddescriptor
of theobject
ordefaultState
if there is no entry.SetAbstractState<Reference>
getStaticOrDefault(java.lang.String fqn, SetAbstractState<Reference> defaultState)
Returns an abstract state representing the static fieldfqn
ordefaultState
if there is no entry.SetAbstractState<Reference>
getVariableOrDefault(int index, SetAbstractState<Reference> defaultState)
Returns an abstract state at theindex
th position of the variable array ordefaultState
if there is no entry.JvmReferenceAbstractState
join(JvmAbstractState<SetAbstractState<Reference>> abstractState)
Computes a join over itself and theabstractState
.-
Methods inherited from class proguard.analysis.cpa.jvm.state.JvmAbstractState
clearOperandStack, equals, getArrayElementOrDefault, getFieldOrDefault, getFrame, getHeap, getProgramLocation, getStaticFields, hashCode, isLessOrEqual, newArray, newObject, newObject, peek, peek, peekOrDefault, peekOrDefault, pop, popOrDefault, push, pushAll, setArrayElement, setField, setField, setProgramLocation, setStatic, setVariable
-
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
-
-
-
-
Constructor Detail
-
JvmReferenceAbstractState
public JvmReferenceAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<SetAbstractState<Reference>> frame, JvmHeapAbstractState<SetAbstractState<Reference>> heap, MapAbstractState<java.lang.String,SetAbstractState<Reference>> staticFields)
Create a JVM reference abstract state.- Parameters:
programLocation
- a CFA nodeframe
- a frame abstract stateheap
- a heap abstract statestaticFields
- a static field table
-
-
Method Detail
-
getVariableOrDefault
public SetAbstractState<Reference> getVariableOrDefault(int index, SetAbstractState<Reference> defaultState)
Description copied from class:JvmAbstractState
Returns an abstract state at theindex
th position of the variable array ordefaultState
if there is no entry.- Overrides:
getVariableOrDefault
in classJvmAbstractState<SetAbstractState<Reference>>
-
getStaticOrDefault
public SetAbstractState<Reference> getStaticOrDefault(java.lang.String fqn, SetAbstractState<Reference> defaultState)
Description copied from class:JvmAbstractState
Returns an abstract state representing the static fieldfqn
ordefaultState
if there is no entry.- Overrides:
getStaticOrDefault
in classJvmAbstractState<SetAbstractState<Reference>>
-
getFieldOrDefault
public <T> SetAbstractState<Reference> getFieldOrDefault(T object, java.lang.String descriptor, SetAbstractState<Reference> defaultValue)
Description copied from class:JvmAbstractState
Returns an abstract state representing the fielddescriptor
of theobject
ordefaultState
if there is no entry.- Overrides:
getFieldOrDefault
in classJvmAbstractState<SetAbstractState<Reference>>
-
join
public JvmReferenceAbstractState join(JvmAbstractState<SetAbstractState<Reference>> abstractState)
Description copied from interface:LatticeAbstractState
Computes a join over itself and theabstractState
.- Specified by:
join
in interfaceLatticeAbstractState<JvmAbstractState<SetAbstractState<Reference>>>
- Overrides:
join
in classJvmAbstractState<SetAbstractState<Reference>>
-
copy
public JvmReferenceAbstractState copy()
Description copied from interface:AbstractState
Creates a copy of itself.- Specified by:
copy
in interfaceAbstractState
- Overrides:
copy
in classJvmAbstractState<SetAbstractState<Reference>>
-
-