17#ifndef SLICE_STRATEGY_COMMON
18#define SLICE_STRATEGY_COMMON
39 virtual void freeSlice(unique_ptr<Slice> slice);
67 virtual void pivotSplit(unique_ptr<Slice> slice);
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 void freeSlice(unique_ptr< Slice > slice)
It is allowed to delete returned slices directly, but it is better to use freeSlice.
virtual bool simplify(Slice &slice)
Simplifies slice and returns true if it changed.
virtual unique_ptr< Slice > allocateSlice()=0
Directly allocate a slice of the correct type using new.
virtual void pivotSplit(unique_ptr< Slice > slice)
Takes over ownership of slice.
SliceStrategyCommon(const SplitStrategy *splitStrategy)
virtual ~SliceStrategyCommon()
virtual void setUseSimplification(bool use)
This method should only be called before calling run().
virtual bool debugIsValidSlice(Slice *slice)=0
Check that this slice is valid for use with this strategy.
unique_ptr< Slice > newSlice()
Returns a slice from the cache that freeSlice adds to, or allocate a new one using allocateSlice.
TaskEngine _tasks
This keeps track of pending tasks to process.
This class describes the interface of a strategy object for the Slice Algorithm.
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.
TaskEngine handles a list of tasks that are to be carried out.
Term represents a product of variables which does not include a coefficient.