25 _split(splitStrategy),
26 _useIndependence(true),
27 _useSimplification(true) {
28 ASSERT(splitStrategy != 0);
43 slice->clearIdealAndSubtract();
66 auto_ptr<Slice> slice;
100 if (slice2->getIdeal().getGeneratorCount() <
101 slice->getIdeal().getGeneratorCount()) {
104 auto_ptr<Slice> tmp = slice2;
void noThrowPushBack(Container &container, auto_ptr< Element > pointer)
virtual void setUseIndependence(bool use)
This method should only be called before calling run().
bool getUseIndependence() const
Returns true if independence splits should be performed when possible.
virtual void getPivot(Term &pivot, Slice &slice)=0
Used by pivotSplit to obtain a pivot.
bool getUseSimplification() const
Returns true if slices should be simplified.
const SplitStrategy * _split
vector< Slice * > _sliceCache
This is the cache maintained through newSlice and freeSlice.
virtual bool simplify(Slice &slice)
Simplifies slice and returns true if it changed.
virtual void pivotSplit(auto_ptr< Slice > slice)
Takes over ownership of slice.
virtual auto_ptr< Slice > allocateSlice()=0
Directly allocate a slice of the correct type using new.
auto_ptr< Slice > newSlice()
Returns a slice from the cache that freeSlice adds to, or allocate a new one using allocateSlice.
SliceStrategyCommon(const SplitStrategy *splitStrategy)
virtual ~SliceStrategyCommon()
virtual void setUseSimplification(bool use)
This method should only be called before calling run().
virtual void freeSlice(auto_ptr< Slice > slice)
It is allowed to delete returned slices directly, but it is better to use freeSlice.
virtual bool debugIsValidSlice(Slice *slice)=0
Check that this slice is valid for use with this strategy.
TaskEngine _tasks
This keeps track of pending tasks to process.
This class represents a slice, which is the central data structure of the Slice Algorithm.
bool adjustMultiply()
Ensure that for each var, var appears to the first power in some generator of getIdeal().
virtual bool simplify()
Simplifies this object such that it may become simpler without changing the content.
A SplitStrategy is an implementation of a split selection strategy for the Slice Algorithm.
virtual bool isLabelSplit() const =0
If returns true, only call getLabelSplitVariable.
void addTask(Task *task)
Add a task at the head of the list of pending tasks.
void reset(size_t newVarCount)
size_t getVarCount() const
static bool isIdentity(const Exponent *a, size_t varCount)
Returns whether a is 1, i.e. whether all entries of a are 0.