summaryrefslogtreecommitdiff
path: root/src/prop/bvminisat/simp/SimpSolver.h
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-03-10 15:58:11 -0800
committerGitHub <noreply@github.com>2021-03-10 23:58:11 +0000
commit982d1bea6ec9ac9b8932f99762ab2b3908958f32 (patch)
tree4f5ba9a5559d9b273a514f60eb9b354555e74b95 /src/prop/bvminisat/simp/SimpSolver.h
parent489209a31c2a2bf2f5ce465c1a79f73aad90c764 (diff)
Use Assert instead of assert. (#6095)
This commit replaces all uses of assert with Assert from base/check.h to ensure that all assertions get checked in production builds with enabled assertions.
Diffstat (limited to 'src/prop/bvminisat/simp/SimpSolver.h')
-rw-r--r--src/prop/bvminisat/simp/SimpSolver.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/prop/bvminisat/simp/SimpSolver.h b/src/prop/bvminisat/simp/SimpSolver.h
index c76878da4..bf23a7dff 100644
--- a/src/prop/bvminisat/simp/SimpSolver.h
+++ b/src/prop/bvminisat/simp/SimpSolver.h
@@ -21,6 +21,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#ifndef BVMinisat_SimpSolver_h
#define BVMinisat_SimpSolver_h
+#include "base/check.h"
#include "proof/clause_id.h"
#include "prop/bvminisat/core/Solver.h"
#include "prop/bvminisat/mtl/Queue.h"
@@ -188,11 +189,12 @@ class SimpSolver : public Solver {
inline bool SimpSolver::isEliminated (Var v) const { return eliminated[v]; }
inline void SimpSolver::updateElimHeap(Var v) {
- assert(use_simplification);
- // if (!frozen[v] && !isEliminated(v) && value(v) == l_Undef)
- if (elim_heap.inHeap(v) || (!frozen[v] && !isEliminated(v) && value(v) == l_Undef))
- elim_heap.update(v); }
-
+ Assert(use_simplification);
+ // if (!frozen[v] && !isEliminated(v) && value(v) == l_Undef)
+ if (elim_heap.inHeap(v)
+ || (!frozen[v] && !isEliminated(v) && value(v) == l_Undef))
+ elim_heap.update(v);
+}
inline bool SimpSolver::addClause (const vec<Lit>& ps, ClauseId& id) { ps.copyTo(add_tmp); return addClause_(add_tmp, id); }
inline bool SimpSolver::addEmptyClause() { add_tmp.clear(); ClauseId id; return addClause_(add_tmp, id); }
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback