// Parameters (user settable):
//
- c(c)
+ d_notify(nullptr)
+ , c(c)
, verbosity (0)
, var_decay (opt_var_decay)
, clause_decay (opt_clause_decay)
vardata[var(p)] = mkVarData(from, decisionLevel());
trail.push_(p);
if (decisionLevel() <= assumptions.size() && marker[var(p)] == 1) {
- if (notify) {
- Debug("bvminisat::explain") << OUTPUT_TAG << "propagating " << p << std::endl;
- notify->notify(p);
+ if (d_notify) {
+ Debug("bvminisat::explain")
+ << OUTPUT_TAG << "propagating " << p << std::endl;
+ d_notify->notify(p);
}
}
}
else if (to[cr].has_extra()) to[cr].calcAbstraction();
}
+void Solver::setNotify(Notify* toNotify) { d_notify = toNotify; }
+
+bool Solver::withinBudget(uint64_t ammount) const {
+ AlwaysAssert(d_notify);
+ d_notify->spendResource(ammount);
+ d_notify->safePoint(0);
+
+ return !asynch_interrupt &&
+ (conflict_budget < 0 || conflicts < (uint64_t)conflict_budget) &&
+ (propagation_budget < 0 ||
+ propagations < (uint64_t)propagation_budget);
+}
+
} /* CVC4::BVMinisat namespace */
} /* CVC4 namespace */
static CRef TCRef_Lazy;
private:
/** To notify */
- Notify* notify;
+ Notify* d_notify;
/** Cvc4 context */
CVC4::context::Context* c;
Solver(CVC4::context::Context* c);
virtual ~Solver();
- void setNotify(Notify* toNotify) { notify = toNotify; }
+ void setNotify(Notify* toNotify);
// Problem specification:
//
inline void Solver::interrupt(){ asynch_interrupt = true; }
inline void Solver::clearInterrupt(){ asynch_interrupt = false; }
inline void Solver::budgetOff(){ conflict_budget = propagation_budget = -1; }
-inline bool Solver::withinBudget(uint64_t ammount) const {
- Assert (notify);
- notify->spendResource(ammount);
- notify->safePoint(0);
-
- return !asynch_interrupt &&
- (conflict_budget < 0 || conflicts < (uint64_t)conflict_budget) &&
- (propagation_budget < 0 || propagations < (uint64_t)propagation_budget); }
inline lbool Solver::solve () { budgetOff(); return solve_(); }
inline lbool Solver::solve (Lit p) { budgetOff(); assumptions.push(p); return solve_(); }