Package com.ibm.wala.fixpoint
Class BitVectorVariable
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.NodeWithNumber
-
- com.ibm.wala.fixpoint.AbstractVariable<BitVectorVariable>
-
- com.ibm.wala.fixpoint.BitVectorVariable
-
- All Implemented Interfaces:
IVariable<BitVectorVariable>
,INodeWithNumber
public class BitVectorVariable extends AbstractVariable<BitVectorVariable>
A bit vector variable for dataflow analysis.
-
-
Constructor Summary
Constructors Constructor Description BitVectorVariable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(BitVectorVariable other)
Add all the bits from other to this bit vectorvoid
addAll(BitVector B)
Add all the bits in B to this bit vectorvoid
clear(int i)
void
copyState(BitVectorVariable other)
Set this variable to have the same state as another oneboolean
equals(java.lang.Object obj)
boolean
get(int b)
Is a particular bit set?IntSet
getValue()
int
populationCount()
boolean
sameValue(BitVectorVariable other)
Does this variable have the same value as another?void
set(int b)
Set a particular bitjava.lang.String
toString()
-
Methods inherited from class com.ibm.wala.fixpoint.AbstractVariable
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(BitVectorVariable other)
Description copied from interface:IVariable
Set this variable to have the same state as another one
-
addAll
public void addAll(BitVector B)
Add all the bits in B to this bit vector
-
addAll
public void addAll(BitVectorVariable other)
Add all the bits from other to this bit vector
-
sameValue
public boolean sameValue(BitVectorVariable other)
Does this variable have the same value as another?
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
set
public void set(int b)
Set a particular bit- Parameters:
b
- the bit to set
-
get
public boolean get(int b)
Is a particular bit set?- Parameters:
b
- the bit to check
-
getValue
public IntSet getValue()
- Returns:
- the value of this variable as a bit vector ... null if the bit vector is empty.
-
clear
public void clear(int i)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classAbstractVariable<BitVectorVariable>
-
populationCount
public int populationCount()
-
-