Class ObjectArrayValue

java.lang.Object
de.uzl.its.swat.symbolic.value.Value<T,K>
de.uzl.its.swat.symbolic.value.reference.ObjectValue
de.uzl.its.swat.symbolic.value.reference.array.ObjectArrayValue

public class ObjectArrayValue extends ObjectValue
Wrapper for arrays of references (non-primitive types)
  • Field Details

    • size

      public final IntValue size
      Size of the array
  • Constructor Details

    • ObjectArrayValue

      public ObjectArrayValue(org.sosy_lab.java_smt.api.SolverContext context, String className, IntValue size)
      Creates an Array of references To create multidimensional arrays, this class is nested
      Parameters:
      className - The type of the reference
      size - The size of the array (this dimension)
  • Method Details

    • checkIndex

      public org.sosy_lab.java_smt.api.BooleanFormula checkIndex(IntValue idx)
    • getElement

      public Value<?,?> getElement(IntValue idx)
      Retrieves a reference from an Array ToDo (Nils): The index and value are currently not tracked symbolically See: Issue 59
      Parameters:
      idx - The index of the position to retrieve
      Returns:
      The reference value at position idx
    • storeElement

      public void storeElement(IntValue idx, Value<?,?> ref)
      Stores a reference value in an array at index idx ToDo (Nils): The index and value are currently not tracked symbolically See: Issue 59
      Parameters:
      idx - The index where to store the Value
      ref - The value to be stored
    • asObjectArrayValue

      public ObjectArrayValue asObjectArrayValue()
      Cast replacement
      Overrides:
      asObjectArrayValue in class ObjectValue
      Returns:
      ObjectArrayValue this
    • getSize

      public IntValue getSize()
      Getter for the concrete size of the array
      Returns:
      The concrete size of the array
    • toString

      public String toString()
      Description copied from class: Value
      Returns the string representation of the value. Should be implemented by each inheriting class.
      Overrides:
      toString in class ObjectValue
      Returns:
      the string representation of the value