Class IntSetVariable<T extends IntSetVariable<T>>

All Implemented Interfaces:
IVariable<T>, INodeWithNumber
Direct Known Subclasses:
PointsToSetVariable

public abstract class IntSetVariable<T extends IntSetVariable<T>> extends AbstractVariable<T>
A variable for dataflow analysis, representing a set of integers.

TODO: optimize the representation more; e.g. BitVectors with non-zero lower bound.

  • Constructor Details

    • IntSetVariable

      public IntSetVariable()
  • Method Details

    • copyState

      public void copyState(T other)
      Description copied from interface: IVariable
      Set this variable to have the same state as another one
    • addAll

      public boolean addAll(IntSet B)
      Add all integers from the set B
      Returns:
      true iff the value of this changes
    • addAll

      public boolean addAll(T other)
      Add all integers from the other int set variable.
      Returns:
      true iff the contents of this variable changes.
    • sameValue

      public boolean sameValue(IntSetVariable other)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • add

      public boolean add(int b)
      Set a particular bit
      Parameters:
      b - the bit to set
    • contains

      public boolean contains(int b)
      Is a particular bit set?
      Parameters:
      b - the bit to check
    • getValue

      @NullUnmarked public MutableIntSet getValue()
      Returns:
      the value of this variable as a MutableSparseIntSet ... null if the set is empty.
    • remove

      public void remove(int i)
    • size

      public int size()
    • containsAny

      public boolean containsAny(IntSet instances)
    • addAllInIntersection

      public boolean addAllInIntersection(T other, IntSet filter)
    • addAllInIntersection

      public boolean addAllInIntersection(IntSet other, IntSet filter)
    • removeAll

      public void removeAll()