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