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
-
Field Summary
Fields inherited from class proguard.analysis.cpa.jvm.state.JvmAbstractState
DEFAULT_FIELD, frame, heap, programLocation, staticFields, topLocation -
Constructor Summary
ConstructorsConstructorDescriptionJvmValueAbstractState(ValueFactory valueFactory, ExecutingInvocationUnit executingInvocationUnit, JvmCfaNode programLocation, JvmFrameAbstractState<ValueAbstractState> frame, JvmHeapAbstractState<ValueAbstractState> heap, MapAbstractState<String, ValueAbstractState> staticFields) Create a JVM value abstract state. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of itself.booleanReturns theValueFactory.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.join(JvmAbstractState<ValueAbstractState> abstractState) Computes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).Returns anValueAbstractStatefor a new object of the givenclassName.Returns anValueAbstractStatestate for a new object of the givenClazz.<T> voidsetField(T object, ValueAbstractState value) Sets the default field of theobjecttovalue.setVariable(int index, ValueAbstractState state, ValueAbstractState defaultState) Sets theindexth position of the variable array tostateand returnsstate.toString()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, setStaticMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface proguard.analysis.cpa.interfaces.AbstractState
getPrecision, isLess
-
Constructor Details
-
JvmValueAbstractState
public JvmValueAbstractState(ValueFactory valueFactory, ExecutingInvocationUnit executingInvocationUnit, JvmCfaNode programLocation, JvmFrameAbstractState<ValueAbstractState> frame, JvmHeapAbstractState<ValueAbstractState> heap, MapAbstractState<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 Details
-
getValueFactory
Returns theValueFactory. -
getVariableOrDefault
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
Returns anValueAbstractStatefor a new object of the givenclassName.- Overrides:
newObjectin classJvmAbstractState<ValueAbstractState>
-
newObject
Returns anValueAbstractStatestate for a new object of the givenClazz.- Overrides:
newObjectin classJvmAbstractState<ValueAbstractState>
-
setField
Description copied from class:JvmAbstractStateSets the default field of theobjecttovalue.- Overrides:
setFieldin classJvmAbstractState<ValueAbstractState>
-
join
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
Description copied from interface:AbstractStateCreates a copy of itself.- Specified by:
copyin interfaceAbstractState<JvmAbstractState<ValueAbstractState>>- Overrides:
copyin classJvmAbstractState<ValueAbstractState>
-
equals
- Specified by:
equalsin interfaceAbstractState<JvmAbstractState<ValueAbstractState>>- Overrides:
equalsin classJvmAbstractState<ValueAbstractState>
-
toString
-