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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int b) Set a particular bitbooleanAdd all integers from the set BbooleanAdd all integers from the other int set variable.booleanaddAllInIntersection(IntSet other, IntSet filter) booleanaddAllInIntersection(T other, IntSet filter) booleancontains(int b) Is a particular bit set?booleancontainsAny(IntSet instances) voidSet this variable to have the same state as another onegetValue()voidremove(int i) voidbooleansameValue(IntSetVariable other) intsize()toString()Methods inherited from class AbstractVariable
equals, getOrderNumber, hashCode, nextHash, setOrderNumberMethods inherited from class NodeWithNumber
getGraphNodeId, setGraphNodeIdMethods inherited from interface 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()
-