Static Value-Flow Analysis
|
#include <BitVector.h>
Public Member Functions | |
BitVector (void) | |
Construct empty BV. | |
BitVector (size_t n) | |
Construct empty BV with space reserved for n Words. | |
BitVector (const BitVector &bv) | |
Copy constructor. | |
BitVector (BitVector &&bv) | |
Move constructor. | |
BitVector & | operator= (const BitVector &rhs) |
Copy assignment. | |
BitVector & | operator= (BitVector &&rhs) |
Move assignment. | |
Public Member Functions inherited from SVF::CoreBitVector | |
CoreBitVector (void) | |
Construct empty CBV. | |
CoreBitVector (size_t n) | |
Construct empty CBV with space reserved for n Words. | |
CoreBitVector (const CoreBitVector &cbv) | |
Copy constructor. | |
CoreBitVector (CoreBitVector &&cbv) | |
Move constructor. | |
CoreBitVector & | operator= (const CoreBitVector &rhs) |
Copy assignment. | |
CoreBitVector & | operator= (CoreBitVector &&rhs) |
Move assignment. | |
bool | empty (void) const |
Returns true if no bits are set. | |
u32_t | count (void) const |
Returns number of bits set. | |
void | clear (void) |
Empty the CBV. | |
bool | test (u32_t bit) const |
Returns true if bit is set in this CBV. | |
bool | test_and_set (u32_t bit) |
void | set (u32_t bit) |
Sets bit in the CBV. | |
void | reset (u32_t bit) |
Resets bit in the CBV. | |
bool | contains (const CoreBitVector &rhs) const |
Returns true if this CBV is a superset of rhs. | |
bool | intersects (const CoreBitVector &rhs) const |
Returns true if this CBV and rhs share any set bits. | |
bool | operator== (const CoreBitVector &rhs) const |
Returns true if this CBV and rhs have the same bits set. | |
bool | operator!= (const CoreBitVector &rhs) const |
Returns true if either this CBV or rhs has a bit set unique to the other. | |
bool | operator|= (const CoreBitVector &rhs) |
bool | operator&= (const CoreBitVector &rhs) |
bool | operator-= (const CoreBitVector &rhs) |
bool | intersectWithComplement (const CoreBitVector &rhs) |
void | intersectWithComplement (const CoreBitVector &lhs, const CoreBitVector &rhs) |
Put intersection of lhs with complement of rhs into this CBV. | |
size_t | hash (void) const |
Hash for this CBV. | |
const_iterator | begin (void) const |
const_iterator | end (void) const |
Additional Inherited Members | |
Public Types inherited from SVF::CoreBitVector | |
typedef unsigned long long | Word |
typedef CoreBitVectorIterator | const_iterator |
typedef const_iterator | iterator |
Static Public Attributes inherited from SVF::CoreBitVector | |
static const size_t | WordSize = sizeof(Word) * CHAR_BIT |
A contiguous bit vector in which trailing 0s are stripped. Does not shrink - only grows. This isn't a problem for points-to analysis, usually, but may be for other applications.
Implemented as a CBV that has an offset of zero. There is an extremely slight performance penalty in the form of checking if we need to extend backwards. Since the CBV also grows monotonically, this means this BV will always contain a word for 0 till the last ever set bit. TODO: if we change the CBV to shrink, we need to modify this implementation accordingly.
Definition at line 31 of file BitVector.h.
SVF::BitVector::BitVector | ( | void | ) |
SVF::BitVector::BitVector | ( | size_t | n | ) |
Construct empty BV with space reserved for n Words.
Definition at line 20 of file BitVector.cpp.
SVF::BitVector::BitVector | ( | BitVector && | bv | ) |
Move assignment.
Definition at line 40 of file BitVector.cpp.
Copy assignment.
Definition at line 34 of file BitVector.cpp.