Package com.ibm.wala.fixpoint
Class IntSetVariable<T extends IntSetVariable<T>>
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.NodeWithNumber
-
- com.ibm.wala.fixpoint.AbstractVariable<T>
-
- com.ibm.wala.fixpoint.IntSetVariable<T>
-
- All Implemented Interfaces:
IVariable<T>
,INodeWithNumber
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 Summary
Constructors Constructor Description IntSetVariable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int b)
Set a particular bitboolean
addAll(IntSet B)
Add all integers from the set Bboolean
addAll(T other)
Add all integers from the other int set variable.boolean
addAllInIntersection(IntSet other, IntSet filter)
boolean
addAllInIntersection(T other, IntSet filter)
boolean
contains(int b)
Is a particular bit set?boolean
containsAny(IntSet instances)
void
copyState(T other)
Set this variable to have the same state as another oneMutableIntSet
getValue()
void
remove(int i)
void
removeAll()
boolean
sameValue(IntSetVariable other)
int
size()
java.lang.String
toString()
-
Methods inherited from class com.ibm.wala.fixpoint.AbstractVariable
equals, getOrderNumber, hashCode, nextHash, setOrderNumber
-
Methods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
-
-
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
add
public void 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
public MutableIntSet getValue()
- Returns:
- the value of this variable as a MutableSparseIntSet ... null if the set is empty.
-
remove
public void remove(int i)
- Parameters:
i
-
-
size
public int size()
-
containsAny
public boolean containsAny(IntSet instances)
-
removeAll
public void removeAll()
-
-