|
Frobby 0.10.0
|
#include <SliceStrategyCommon.h>


Public Member Functions | |
| SliceStrategyCommon (const SplitStrategy *splitStrategy) | |
| virtual void | freeSlice (unique_ptr< Slice > slice) |
| virtual void | setUseIndependence (bool use) |
| virtual void | setUseSimplification (bool use) |
| Public Member Functions inherited from SliceStrategy | |
| virtual void | run (const Ideal &ideal)=0 |
| virtual bool | processSlice (TaskEngine &tasks, unique_ptr< Slice > slice)=0 |
Protected Member Functions | |
| virtual bool | simplify (Slice &slice) |
| virtual unique_ptr< Slice > | allocateSlice ()=0 |
| virtual bool | debugIsValidSlice (Slice *slice)=0 |
| unique_ptr< Slice > | newSlice () |
| virtual void | pivotSplit (unique_ptr< Slice > slice) |
| virtual void | getPivot (Term &pivot, Slice &slice)=0 |
| bool | getUseIndependence () const |
| bool | getUseSimplification () const |
Protected Attributes | |
| const SplitStrategy * | _split |
| TaskEngine | _tasks |
This class adds code to the SliceStrategy base class that is useful for derived classes. The public interface is unchanged.
|
protectedpure virtual |
Directly allocate a slice of the correct type using new.
|
protectedpure virtual |
Check that this slice is valid for use with this strategy. No check need be performed unless DEBUG is defined, making it acceptable to check things using ASSERT. This method should not be called if DEBUG is not defined.
|
virtual |
It is allowed to delete returned slices directly, but it is better to use freeSlice. freeSlice can only be called on slices obtained from a method of the same strategy. This allows caching of slices to avoid frequent allocation and deallocation.
Implements SliceStrategy.
Used by pivotSplit to obtain a pivot.
Implemented in MsmStrategy, and OptimizeStrategy.
|
protected |
Returns true if independence splits should be performed when possible.
|
protectedvirtual |
Returns true if slices should be simplified.
Implements SliceStrategy.
|
protected |
Returns a slice from the cache that freeSlice adds to, or allocate a new one using allocateSlice. This method should be used in place of allocating new slices directly.
|
protectedvirtual |
Takes over ownership of slice. Uses the pivot gotten through getPivot.
|
virtual |
This method should only be called before calling run().
Implements SliceStrategy.
Reimplemented in OptimizeStrategy.
|
virtual |
This method should only be called before calling run().
Implements SliceStrategy.
|
protectedvirtual |
Simplifies slice and returns true if it changed.
Reimplemented in OptimizeStrategy.
|
protected |
This keeps track of pending tasks to process. These are slices and other events.