类 JvmAbstractState<ContentT extends AbstractState<ContentT>>
java.lang.Object
proguard.analysis.cpa.jvm.state.JvmAbstractState<ContentT>
- 类型参数:
ContentT- The type of the states contained in the JVM state. e.g., for taint analysis this would be aSetAbstractStatecontaining the taints and for value analysis aValueAbstractState.
- 所有已实现的接口:
AbstractState<JvmAbstractState<ContentT>>,ProgramLocationDependent
- 直接已知子类:
JvmValueAbstractState
public class JvmAbstractState<ContentT extends AbstractState<ContentT>>
extends Object
implements AbstractState<JvmAbstractState<ContentT>>, ProgramLocationDependent
The
JvmAbstractState consists of the method frame JvmFrameAbstractState and the
heap JvmHeapAbstractState.-
字段概要
字段修饰符和类型字段说明static final Stringprotected final JvmFrameAbstractState<ContentT>protected final JvmHeapAbstractState<ContentT>protected JvmCfaNodeprotected final MapAbstractState<String,ContentT> protected static final JvmCfaNode -
构造器概要
构造器构造器说明JvmAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<ContentT> frame, JvmHeapAbstractState<ContentT> heap, MapAbstractState<String, ContentT> staticFields) Create a JVM abstract state. -
方法概要
修饰符和类型方法说明voidEmpties the operand stack.copy()Creates a copy of itself.boolean<T> ContentTgetArrayElementOrDefault(T array, ContentT index, ContentT abstractDefault) Returns an abstract state for thearrayelement at the givenindexor theabstractDefaultif there is no information available.<T> ContentTgetFieldOrDefault(T object, ContentT defaultValue) Returns an abstract state representing the default field of theobjectordefaultStateif there is no entry.<T> ContentTgetFieldOrDefault(T object, String descriptor, ContentT defaultValue) Returns an abstract state representing the fielddescriptorof theobjectordefaultStateif there is no entry.getFrame()Returns the frame abstract state.getHeap()Returns the heap abstract state.Returns the program location.Returns the static field table abstract state.getStaticOrDefault(String fqn, ContentT defaultState) Returns an abstract state representing the static fieldfqnordefaultStateif there is no entry.getVariableOrDefault(int index, ContentT defaultState) Returns an abstract state at theindexth position of the variable array ordefaultStateif there is no entry.inthashCode()booleanisLessOrEqual(JvmAbstractState<ContentT> abstractState) Compares itself to theabstractState(i.e., compare the states on the partial order provided by the domain of the analysis).join(JvmAbstractState<ContentT> abstractState) Computes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).Returns an abstract state for a new array for the giventypeanddimentions.Returns an abstract state for a new object of the givenclassName.Returns an abstract state for a new object of the givenClazz.peek()Returns the top element of the operand stack.peek(int index) Returns theindexth element from the top of the operand stack.peekOrDefault(int index, ContentT defaultState) Returns theindexth element from the top of the operand stack or returnsdefaultStateif the stack does not have enough elements.peekOrDefault(ContentT defaultState) Returns the top element of the operand stack or returnsdefaultStateif the stack is empty.pop()Removes the top element of the operand stack end returns it.popOrDefault(ContentT defaultState) Removes the top element of the operand stack end returns it.Insertsstateto the top of the operand stack and returns it.Consequentially inserts elements ofstatesto the top of the operand stack and returnsstates.<T> voidsetArrayElement(T array, ContentT index, ContentT value) Sets thearrayelement at the givenindexto thevalue.<T> voidSets the default field of theobjecttovalue.<T> voidSets the fielddescriptorof theobjecttovalue.voidsetProgramLocation(JvmCfaNode programLocation) Sets the program location.voidSets the static fieldfqntovalue, unless the value isdefaultState.setVariable(int index, ContentT state, ContentT defaultState) Sets theindexth position of the variable array tostateand returnsstate.从接口继承的方法 proguard.analysis.cpa.interfaces.AbstractState
getPrecision, isLess
-
字段详细资料
-
DEFAULT_FIELD
- 另请参阅:
-
frame
-
heap
-
staticFields
-
programLocation
-
topLocation
-
-
构造器详细资料
-
JvmAbstractState
public JvmAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<ContentT> frame, JvmHeapAbstractState<ContentT> heap, MapAbstractState<String, ContentT> staticFields) Create a JVM abstract state.- 参数:
programLocation- a CFA nodeframe- a frame abstract stateheap- a heap abstract statestaticFields- a static field table
-
-
方法详细资料
-
join
从接口复制的说明:AbstractStateComputes a join over itself and another abstract stateabstractState(i.e., finds the least upper bound on the semilattice).- 指定者:
join在接口中AbstractState<ContentT extends AbstractState<ContentT>>
-
isLessOrEqual
从接口复制的说明:AbstractStateCompares itself to theabstractState(i.e., compare the states on the partial order provided by the domain of the analysis).- 指定者:
isLessOrEqual在接口中AbstractState<ContentT extends AbstractState<ContentT>>
-
getProgramLocation
从接口复制的说明:ProgramLocationDependentReturns the program location.- 指定者:
getProgramLocation在接口中ProgramLocationDependent
-
setProgramLocation
从接口复制的说明:ProgramLocationDependentSets the program location.- 指定者:
setProgramLocation在接口中ProgramLocationDependent
-
copy
从接口复制的说明:AbstractStateCreates a copy of itself.- 指定者:
copy在接口中AbstractState<ContentT extends AbstractState<ContentT>>
-
equals
- 指定者:
equals在接口中AbstractState<ContentT extends AbstractState<ContentT>>- 覆盖:
equals在类中Object
-
hashCode
public int hashCode()- 指定者:
hashCode在接口中AbstractState<ContentT extends AbstractState<ContentT>>- 覆盖:
hashCode在类中Object
-
peek
Returns the top element of the operand stack. -
peek
Returns theindexth element from the top of the operand stack. -
peekOrDefault
Returns the top element of the operand stack or returnsdefaultStateif the stack is empty. -
peekOrDefault
Returns theindexth element from the top of the operand stack or returnsdefaultStateif the stack does not have enough elements. -
pop
Removes the top element of the operand stack end returns it. -
popOrDefault
Removes the top element of the operand stack end returns it. ReturnsdefaultStateif the stack is empty. -
push
Insertsstateto the top of the operand stack and returns it. -
pushAll
Consequentially inserts elements ofstatesto the top of the operand stack and returnsstates. -
clearOperandStack
public void clearOperandStack()Empties the operand stack. -
getVariableOrDefault
Returns an abstract state at theindexth position of the variable array ordefaultStateif there is no entry. -
setVariable
Sets theindexth position of the variable array tostateand returnsstate. If the array has to be extended, the added cells are padded withdefaultState. -
getStaticOrDefault
Returns an abstract state representing the static fieldfqnordefaultStateif there is no entry. -
setStatic
Sets the static fieldfqntovalue, unless the value isdefaultState. -
getFieldOrDefault
Returns an abstract state representing the fielddescriptorof theobjectordefaultStateif there is no entry. -
getFieldOrDefault
Returns an abstract state representing the default field of theobjectordefaultStateif there is no entry. -
setField
Sets the fielddescriptorof theobjecttovalue. -
setField
Sets the default field of theobjecttovalue. -
getFrame
Returns the frame abstract state. -
getStaticFields
Returns the static field table abstract state. -
getHeap
Returns the heap abstract state. -
newArray
Returns an abstract state for a new array for the giventypeanddimentions. -
newObject
Returns an abstract state for a new object of the givenclassName. -
newObject
Returns an abstract state for a new object of the givenClazz. -
getArrayElementOrDefault
Returns an abstract state for thearrayelement at the givenindexor theabstractDefaultif there is no information available. -
setArrayElement
Sets thearrayelement at the givenindexto thevalue.
-