Package daikon
Class ModBitTracker
- Object
-
- ModBitTracker
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ModBitTracker extends Object implements Serializable, Cloneable
ModBitTracker maintains a BitSet for each variable at a program point. The BitSet indicates, for each sample seen in order, whether that variable was present or not.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModBitTracker(int num_vars)
Creates a ModBitTracker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ValueTuple vt, int count)
Add to this the modbits for the given ValueTuple.void
checkRep()
Check the representation invariant.BitSet
get(int varindex)
Returns a BitSet of modbit values for the given variable.boolean
get(int varindex, int sampleno)
Returns the modbit for the given variable and sample number.int
num_samples()
int
num_sets()
Accessor for testing only.int
num_vars()
-
-
-
Constructor Detail
-
ModBitTracker
public ModBitTracker(int num_vars)
Creates a ModBitTracker.- Parameters:
num_vars
- number of variables to allocate space for
-
-
Method Detail
-
num_vars
public int num_vars()
-
num_samples
public int num_samples()
-
num_sets
public int num_sets()
Accessor for testing only.
-
checkRep
public void checkRep(@UnknownInitialization(ModBitTracker.class) ModBitTracker this)
Check the representation invariant.
-
get
public BitSet get(int varindex)
Returns a BitSet of modbit values for the given variable. The caller must not modify the returned value!
-
get
public boolean get(int varindex, int sampleno)
Returns the modbit for the given variable and sample number.
-
add
public void add(ValueTuple vt, int count)
Add to this the modbits for the given ValueTuple.
-
-