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
- Direct Known Subclasses:
PointsToSetVariable
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int b) Set a particular bitboolean
Add all integers from the set Bboolean
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
Set this variable to have the same state as another onegetValue()
void
remove
(int i) void
boolean
sameValue
(IntSetVariable other) int
size()
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
-
Constructor Details
-
IntSetVariable
public IntSetVariable()
-
-
Method Details
-
copyState
-
addAll
Add all integers from the set B- Returns:
- true iff the value of this changes
-
addAll
Add all integers from the other int set variable.- Returns:
- true iff the contents of this variable changes.
-
sameValue
-
toString
-
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
- 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
-
addAllInIntersection
-
addAllInIntersection
-
removeAll
public void removeAll()
-