Class ToppedSetFact<E>

java.lang.Object
pascal.taie.analysis.dataflow.fact.SetFact<E>
pascal.taie.analysis.dataflow.fact.ToppedSetFact<E>
Type Parameters:
E - type of elements
All Implemented Interfaces:
Iterable<E>, Copyable<SetFact<E>>

public class ToppedSetFact<E> extends SetFact<E>
Represents set-like data-flow facts. This fact can represent a top element in the lattice, i.e., Universe. Note that the top element is conceptual, i.e., it is mock and does not really contain all elements in the domain, thus remove and iteration operations on the top element are unsupported.
  • Constructor Details

    • ToppedSetFact

      public ToppedSetFact(boolean isTop)
    • ToppedSetFact

      public ToppedSetFact(Collection<E> c)
  • Method Details

    • isTop

      public boolean isTop()
    • setTop

      public void setTop(boolean top)
    • contains

      public boolean contains(E e)
      Overrides:
      contains in class SetFact<E>
      Returns:
      true if this set contains the specified element, otherwise false.
    • add

      public boolean add(E e)
      Description copied from class: SetFact
      Adds an element to this fact.
      Overrides:
      add in class SetFact<E>
      Returns:
      true if this fact changed as a result of the call, otherwise false.
    • remove

      public boolean remove(E e)
      Description copied from class: SetFact
      Removes an element from this fact.
      Overrides:
      remove in class SetFact<E>
      Returns:
      true if an element was removed as a result of the call, otherwise false.
    • removeIf

      public boolean removeIf(Predicate<E> filter)
      Description copied from class: SetFact
      Removes all the elements of this fact that satisfy the given predicate.
      Overrides:
      removeIf in class SetFact<E>
      Returns:
      true if any elements were removed as a result of the call, otherwise false.
    • union

      public boolean union(SetFact<E> other)
      Description copied from class: SetFact
      Unions other fact into this fact.
      Overrides:
      union in class SetFact<E>
      Returns:
      true if this fact changed as a result of the call, otherwise false.
    • intersect

      public boolean intersect(SetFact<E> other)
      Description copied from class: SetFact
      Intersects this fact with other fact.
      Overrides:
      intersect in class SetFact<E>
      Returns:
      true if this fact changed as a result of the call, otherwise false.
    • set

      public void set(SetFact<E> other)
      Description copied from class: SetFact
      Sets the content of this set to the same as other set.
      Overrides:
      set in class SetFact<E>
    • copy

      public ToppedSetFact<E> copy()
      Description copied from class: SetFact
      Creates and returns a copy of this fact.
      Specified by:
      copy in interface Copyable<E>
      Overrides:
      copy in class SetFact<E>
      Returns:
      a copy of this object.
    • clear

      public void clear()
      Description copied from class: SetFact
      Clears all content in this fact.
      Overrides:
      clear in class SetFact<E>
    • isEmpty

      public boolean isEmpty()
      Overrides:
      isEmpty in class SetFact<E>
    • stream

      public Stream<E> stream()
      Overrides:
      stream in class SetFact<E>
    • size

      public int size()
      Overrides:
      size in class SetFact<E>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class SetFact<E>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SetFact<E>
    • toString

      public String toString()
      Overrides:
      toString in class SetFact<E>