Class BooleanArrayValue

java.lang.Object
de.uzl.its.swat.symbolic.value.Value<T,K>
de.uzl.its.swat.symbolic.value.reference.ObjectValue<org.sosy_lab.java_smt.api.ArrayFormula<TI,TE>,K>
de.uzl.its.swat.symbolic.value.reference.array.AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
de.uzl.its.swat.symbolic.value.reference.array.BooleanArrayValue

public class BooleanArrayValue extends AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
Wrapper for Arrays that contain boolean values.
  • Constructor Details

    • BooleanArrayValue

      public BooleanArrayValue(org.sosy_lab.java_smt.api.SolverContext context, IntValue size, int address)
      Creates a new symbolic array that contains boolean values
      Parameters:
      context - The SolverContext to create formulas in the native Solver environment.
      size - The size of the array
      address - The address of the array reference
    • BooleanArrayValue

      public BooleanArrayValue(org.sosy_lab.java_smt.api.SolverContext context, IntValue size, int address, IntValue parentRefIdx, ArrayArrayValue parentRef)
    • BooleanArrayValue

      public BooleanArrayValue(org.sosy_lab.java_smt.api.SolverContext context, boolean[] concrete, int address)
  • Method Details

    • initArray

      protected void initArray(boolean[] array)
    • getElement

      public BooleanValue getElement(IntValue idx)
      Returns the formula that represents the element at the specified index.
      Specified by:
      getElement in class AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
      Parameters:
      idx - The formula that specifies the index.
      Returns:
      The formula that specifies the retrieved/ retrievable element.
    • storeElement

      public void storeElement(IntValue idx, BooleanValue val)
      Stores the formula representing an element at the position specified by the index formula.
      Specified by:
      storeElement in class AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
      Parameters:
      idx - The index formula.
      val - The element formula.
    • initArray

      protected void initArray(int size)
      Initializes the array with the default value.
      Specified by:
      initArray in class AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
      Parameters:
      size - The size of the array.
    • asBooleanArrayValue

      public BooleanArrayValue asBooleanArrayValue()
      Overrides:
      asBooleanArrayValue in class AbstractArrayValue<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula,IntValue,BooleanValue,boolean[]>
    • toString

      public String toString()
      Returns the string representation of the value used to visualize the stack. The representation is not complete.
      Overrides:
      toString in class ObjectValue<org.sosy_lab.java_smt.api.ArrayFormula<org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula,org.sosy_lab.java_smt.api.BooleanFormula>,boolean[]>
      Returns:
      the string representation of the value.