Class JvmAbstractState<StateT extends LatticeAbstractState<StateT>>

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface AbstractState
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface AbstractState
        Overrides:
        hashCode in class java.lang.Object
      • peek

        public StateT peek()
        Returns the top element of the operand stack.
      • peek

        public StateT peek​(int index)
        Returns the indexth element from the top of the operand stack.
      • peekOrDefault

        public StateT peekOrDefault​(StateT defaultState)
        Returns the top element of the operand stack or returns defaultState if the stack is empty.
      • peekOrDefault

        public StateT peekOrDefault​(int index,
                                    StateT defaultState)
        Returns the indexth element from the top of the operand stack or returns defaultState if the stack does not have enough elements.
      • pop

        public StateT pop()
        Removes the top element of the operand stack end returns it.
      • popOrDefault

        public StateT popOrDefault​(StateT defaultState)
        Removes the top element of the operand stack end returns it. Returns defaultState if the stack is empty.
      • push

        public StateT push​(StateT state)
        Inserts state to the top of the operand stack and returns it.
      • pushAll

        public java.util.List<StateT> pushAll​(java.util.List<StateT> states)
        Consequentially inserts elements of states to the top of the operand stack and returns states.
      • clearOperandStack

        public void clearOperandStack()
        Empties the operand stack.
      • getVariableOrDefault

        public StateT getVariableOrDefault​(int index,
                                           StateT defaultState)
        Returns an abstract state at the indexth position of the variable array or defaultState if there is no entry.
      • setVariable

        public StateT setVariable​(int index,
                                  StateT state,
                                  StateT defaultState)
        Sets the indexth position of the variable array to state and returns state. If the array has to be extended, the added cells are padded with defaultState.
      • getStaticOrDefault

        public StateT getStaticOrDefault​(java.lang.String fqn,
                                         StateT defaultState)
        Returns an abstract state representing the static field fqn or defaultState if there is no entry.
      • setStatic

        public void setStatic​(java.lang.String fqn,
                              StateT value,
                              StateT defaultState)
        Sets the static field fqn to value, unless the value is defaultState.
      • getFieldOrDefault

        public <T> StateT getFieldOrDefault​(T object,
                                            java.lang.String descriptor,
                                            StateT defaultValue)
        Returns an abstract state representing the field descriptor of the object or defaultState if there is no entry.
      • getFieldOrDefault

        public <T> StateT getFieldOrDefault​(T object,
                                            StateT defaultValue)
        Returns an abstract state representing the default field of the object or defaultState if there is no entry.
      • setField

        public <T> void setField​(T object,
                                 java.lang.String descriptor,
                                 StateT value)
        Sets the field descriptor of the object to value.
      • setField

        public <T> void setField​(T object,
                                 StateT value)
        Sets the default field of the object to value.
      • getStaticFields

        public MapAbstractState<java.lang.String,​StateT> getStaticFields()
        Returns the static field table abstract state.
      • newArray

        public StateT newArray​(java.lang.String type,
                               java.util.List<StateT> dimensions)
        Returns an abstract state for a new array for the given type and dimentions.
      • newObject

        public StateT newObject​(java.lang.String className)
        Returns an abstract state for a new object of the given className.
      • newObject

        public StateT newObject​(Clazz clazz)
        Returns an abstract state for a new object of the given Clazz.
      • getArrayElementOrDefault

        public <T> StateT getArrayElementOrDefault​(T array,
                                                   StateT index,
                                                   StateT abstractDefault)
        Returns an abstract state for the array element at the given index or the abstractDefault if there is no information available.
      • setArrayElement

        public <T> void setArrayElement​(T array,
                                        StateT index,
                                        StateT value)
        Sets the array element at the given index to the value.