// Problem specification:
//
- Var newVar (bool polarity = true, bool dvar = true); // Add a new variable with parameters specifying variable mode.
- bool addClause (vec<Lit>& ps); // Add a clause to the solver. NOTE! 'ps' may be shrunk by this method!
+ virtual Var newVar (bool polarity = true, bool dvar = true); // Add a new variable with parameters specifying variable mode.
+ virtual bool addClause (vec<Lit>& ps); // Add a clause to the solver. NOTE! 'ps' may be shrunk by this method!
// Solving:
//
- bool simplify (); // Removes already satisfied clauses.
+ virtual bool simplify (); // Removes already satisfied clauses.
bool solve (const vec<Lit>& assumps); // Search for a model that respects a given set of assumptions.
- bool solve (); // Search without assumptions.
+ virtual bool solve (); // Search without assumptions.
bool okay () const; // FALSE means solver is in a conflicting state
// Variable mode:
// Solving:
//
bool solve (const vec<Lit>& assumps, bool do_simp = true, bool turn_off_simp = false);
- bool solve (bool do_simp = true, bool turn_off_simp = false);
+ bool solve ();
bool eliminate (bool turn_off_elim = false); // Perform variable elimination based simplification.
// Generate a (possibly simplified) DIMACS file:
inline bool SimpSolver::isEliminated (Var v) const { return v < elimtable.size() && elimtable[v].order != 0; }
inline void SimpSolver::setFrozen (Var v, bool b) { frozen[v] = (char)b; if (b) { updateElimHeap(v); } }
-inline bool SimpSolver::solve (bool do_simp, bool turn_off_simp) { vec<Lit> tmp; return solve(tmp, do_simp, turn_off_simp); }
+inline bool SimpSolver::solve () { vec<Lit> tmp; return solve(tmp, true, false); }
//=================================================================================================
};