uint size = orders->getSize();
for (uint i = 0; i < size; i++) {
Order *order = orders->get(i);
- DecomposeOrderTransform* decompose = new DecomposeOrderTransform(This, order, DECOMPOSEORDER, &onoff);
+ DecomposeOrderTransform* decompose = new DecomposeOrderTransform(This, order);
if (!decompose->canExecuteTransform()){
- continue;
delete decompose;
+ continue;
}
OrderGraph *graph = buildOrderGraph(order);
delete graph;
/*
- IntegerEncodingTransform* integerEncoding = new IntegerEncodingTransform(This, order, ORDERINTEGERENCODING, &offon);
+ IntegerEncodingTransform* integerEncoding = new IntegerEncodingTransform(This, order);
if(!integerEncoding->canExecuteTransform()){
- continue;
delete integerEncoding;
+ continue;
}
integerEncoding->doTransform();
- delete integerEncoding; */
+ delete integerEncoding;*/
}
}
#include "csolver.h"
-DecomposeOrderTransform::DecomposeOrderTransform(CSolver* _solver, Order* _order, Tunables _tunable, TunableDesc* _desc)
- :Transform(_solver, _tunable, _desc),
+DecomposeOrderTransform::DecomposeOrderTransform(CSolver* _solver, Order* _order)
+ :Transform(_solver),
order(_order)
{
}
}
bool DecomposeOrderTransform::canExecuteTransform(){
- return canExecutePass(solver, order->type);
+ return canExecutePass(solver, order->type, DECOMPOSEORDER, &onoff);
}
void DecomposeOrderTransform::doTransform(){
class DecomposeOrderTransform : public Transform {
public:
- DecomposeOrderTransform(CSolver* _solver, Order* order, Tunables _tunable, TunableDesc* _desc);
+ DecomposeOrderTransform(CSolver* _solver, Order* order);
virtual ~DecomposeOrderTransform();
void doTransform();
void setOrderGraph(OrderGraph* _graph){
HashTableOrderIntegerEncoding* IntegerEncodingTransform::orderIntegerEncoding = new HashTableOrderIntegerEncoding();
-IntegerEncodingTransform::IntegerEncodingTransform(CSolver* _solver, Order* _order, Tunables _tunable, TunableDesc* _desc)
- :Transform(_solver, _tunable, _desc),
+IntegerEncodingTransform::IntegerEncodingTransform(CSolver* _solver, Order* _order)
+ :Transform(_solver),
order(_order)
{
}
bool IntegerEncodingTransform::canExecuteTransform(){
- return canExecutePass(solver, order->type);
+ return canExecutePass(solver, order->type, ORDERINTEGERENCODING, &offon);
}
void IntegerEncodingTransform::doTransform(){
class IntegerEncodingTransform : public Transform{
public:
- IntegerEncodingTransform(CSolver* solver, Order* order, Tunables _tunable, TunableDesc* _desc);
+ IntegerEncodingTransform(CSolver* solver, Order* order);
void orderIntegerEncodingSATEncoder(BooleanOrder *boolOrder);
void doTransform();
bool canExecuteTransform();
+++ /dev/null
-#include "pass.h"
-#include "tunable.h"
-#include "csolver.h"
-
-Pass::Pass(Tunables _tunable, TunableDesc* _desc):
- tunable(_tunable),
- tunableDesc(_desc)
-{
-
-}
-
-Pass::~Pass(){
-}
class Pass{
public:
- Pass(Tunables _tunable, TunableDesc* _desc);
- virtual ~Pass();
- virtual inline bool canExecutePass(CSolver* This, uint type=0){
- return GETVARTUNABLE(This->getTuner(), type, tunable, tunableDesc);
+ Pass(){};
+ virtual ~Pass(){};
+ virtual inline bool canExecutePass(CSolver* This, uint type, Tunables tunable, TunableDesc* desc){
+ return GETVARTUNABLE(This->getTuner(), type, tunable, desc);
}
MEMALLOC;
-protected:
- Tunables tunable;
- TunableDesc* tunableDesc;
+
};
#include "transform.h"
-Transform::Transform(CSolver* _solver, Tunables _tunable, TunableDesc* _desc):
- Pass(_tunable, _desc)
+Transform::Transform(CSolver* _solver)
{
solver = _solver;
}
class Transform : public Pass{
public:
- Transform(CSolver* _solver,Tunables _tunable, TunableDesc* _desc);
+ Transform(CSolver* _solver);
virtual ~Transform();
virtual bool canExecuteTransform() = 0;
virtual void doTransform() = 0;
class OrderElement;
class IntegerEncodingRecord;
class Transform;
+class Pass;
class ElementEncoding;
class FunctionEncoding;
class AutoTuner;
class SearchTuner;
class TunableSetting;
-class Pass;
-class Transform;
struct IncrementalSolver;
typedef struct IncrementalSolver IncrementalSolver;