26 _useIndependence(
true),
27 _useSimplification(
true) {
43 slice->clearIdealAndSubtract();
57 return slice.simplify();
60 return slice.adjustMultiply();
100 if (
slice2->getIdeal().getGeneratorCount() <
101 slice->getIdeal().getGeneratorCount()) {
void noThrowPushBack(Container &container, auto_ptr< Element > pointer)
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
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.
virtual auto_ptr< Slice > allocateSlice()=0
Directly allocate a slice of the correct type using new.
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.
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.
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.