Class JvmValueAbstractState
- java.lang.Object
-
- proguard.analysis.cpa.jvm.state.JvmAbstractState<ValueAbstractState>
-
- proguard.analysis.cpa.jvm.domain.value.JvmValueAbstractState
-
- All Implemented Interfaces:
AbstractState<JvmAbstractState<ValueAbstractState>>,ProgramLocationDependent
public class JvmValueAbstractState extends JvmAbstractState<ValueAbstractState>
-
-
Field Summary
-
Fields inherited from class proguard.analysis.cpa.jvm.state.JvmAbstractState
DEFAULT_FIELD, frame, heap, programLocation, staticFields, topLocation
-
-
Constructor Summary
Constructors Constructor Description JvmValueAbstractState(ValueFactory valueFactory, ExecutingInvocationUnit executingInvocationUnit, JvmCfaNode programLocation, JvmFrameAbstractState<ValueAbstractState> frame, JvmHeapAbstractState<ValueAbstractState> heap, MapAbstractState<java.lang.String,ValueAbstractState> staticFields)Create a JVM value abstract state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JvmValueAbstractStatecopy()Creates a copy of itself.booleanequals(java.lang.Object obj)ValueFactorygetValueFactory()Returns theValueFactory.ValueAbstractStategetVariableOrDefault(int index, ValueAbstractState defaultState)Returns an abstract state at theindexth position of the variable array, the corresponding heap value for anIdentifiedReferenceValueordefaultStateif there is no entry.JvmValueAbstractStatejoin(JvmAbstractState<ValueAbstractState> abstractState)Computes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).ValueAbstractStatenewObject(java.lang.String className)Returns anValueAbstractStatefor a new object of the givenclassName.ValueAbstractStatenewObject(Clazz clazz)Returns anValueAbstractStatestate for a new object of the givenClazz.<T> voidsetField(T object, ValueAbstractState value)Sets the default field of theobjecttovalue.ValueAbstractStatesetVariable(int index, ValueAbstractState state, ValueAbstractState defaultState)Sets theindexth position of the variable array tostateand returnsstate.java.lang.StringtoString()-
Methods inherited from class proguard.analysis.cpa.jvm.state.JvmAbstractState
clearOperandStack, getArrayElementOrDefault, getFieldOrDefault, getFieldOrDefault, getFrame, getHeap, getProgramLocation, getStaticFields, getStaticOrDefault, hashCode, isLessOrEqual, newArray, peek, peek, peekOrDefault, peekOrDefault, pop, popOrDefault, push, pushAll, setArrayElement, setField, setProgramLocation, setStatic
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
getPrecision, isLess
-
-
-
-
Constructor Detail
-
JvmValueAbstractState
public JvmValueAbstractState(ValueFactory valueFactory, ExecutingInvocationUnit executingInvocationUnit, JvmCfaNode programLocation, JvmFrameAbstractState<ValueAbstractState> frame, JvmHeapAbstractState<ValueAbstractState> heap, MapAbstractState<java.lang.String,ValueAbstractState> staticFields)
Create a JVM value abstract state.- Parameters:
valueFactory- a ValueFactory which is used to create abstract values.executingInvocationUnit- an ExecutingInvocationUnit which is used to execute methods reflectively.programLocation- a CFA nodeframe- a frame abstract stateheap- a heap abstract statestaticFields- a static field table
-
-
Method Detail
-
getValueFactory
public ValueFactory getValueFactory()
Returns theValueFactory.
-
getVariableOrDefault
public ValueAbstractState getVariableOrDefault(int index, ValueAbstractState defaultState)
Returns an abstract state at theindexth position of the variable array, the corresponding heap value for anIdentifiedReferenceValueordefaultStateif there is no entry.- Overrides:
getVariableOrDefaultin classJvmAbstractState<ValueAbstractState>
-
setVariable
public ValueAbstractState setVariable(int index, ValueAbstractState state, ValueAbstractState defaultState)
Sets theindexth position of the variable array tostateand returnsstate. If the array has to be extended, the added cells are padded withdefaultState.If the value is an
IdentifiedReferenceValue, the corresponding heap value is also updated.- Overrides:
setVariablein classJvmAbstractState<ValueAbstractState>
-
newObject
public ValueAbstractState newObject(java.lang.String className)
Returns anValueAbstractStatefor a new object of the givenclassName.- Overrides:
newObjectin classJvmAbstractState<ValueAbstractState>
-
newObject
public ValueAbstractState newObject(Clazz clazz)
Returns anValueAbstractStatestate for a new object of the givenClazz.- Overrides:
newObjectin classJvmAbstractState<ValueAbstractState>
-
setField
public <T> void setField(T object, ValueAbstractState value)Description copied from class:JvmAbstractStateSets the default field of theobjecttovalue.- Overrides:
setFieldin classJvmAbstractState<ValueAbstractState>
-
join
public JvmValueAbstractState join(JvmAbstractState<ValueAbstractState> 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<JvmAbstractState<ValueAbstractState>>- Overrides:
joinin classJvmAbstractState<ValueAbstractState>
-
copy
public JvmValueAbstractState copy()
Description copied from interface:AbstractStateCreates a copy of itself.- Specified by:
copyin interfaceAbstractState<JvmAbstractState<ValueAbstractState>>- Overrides:
copyin classJvmAbstractState<ValueAbstractState>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfaceAbstractState<JvmAbstractState<ValueAbstractState>>- Overrides:
equalsin classJvmAbstractState<ValueAbstractState>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-