}
void Preprocess::doTransform() {
- if (solver->getTuner()->getTunable(PREPROCESS, &onoff) == 0)
+ if (!solver->isBooleanVarUsed() && solver->getTuner()->getTunable(PREPROCESS, &onoff) == 0)
return;
BooleanIterator bit(solver);
boolTrue(BooleanEdge(new BooleanConst(true))),
boolFalse(boolTrue.negate()),
unsat(false),
+ booleanVarUsed(false),
tuner(NULL),
elapsedTime(0),
satsolverTimeout(NOTIMEOUT)
boolTrue = BooleanEdge(new BooleanConst(true));
boolFalse = boolTrue.negate();
unsat = false;
+ booleanVarUsed = false;
elapsedTime = 0;
tuner = NULL;
satEncoder->resetSATEncoder();
BooleanEdge CSolver::getBooleanVar(VarType type) {
Boolean *boolean = new BooleanVar(type);
allBooleans.push(boolean);
+ if(!booleanVarUsed)
+ booleanVarUsed = true;
return BooleanEdge(boolean);
}
void setUnSAT() { model_print("Setting UNSAT %%%%%%\n"); unsat = true; }
void setSatSolverTimeout(long seconds) { satsolverTimeout = seconds;}
bool isUnSAT() { return unsat; }
-
+ bool isBooleanVarUsed(){return booleanVarUsed;}
void printConstraint(BooleanEdge boolean);
void printConstraints();
SATEncoder *satEncoder;
bool unsat;
- Tuner *tuner;
+ bool booleanVarUsed;
+ Tuner *tuner;
long long elapsedTime;
long satsolverTimeout;
friend class ElementOpt;