From ea8e9af7e428930898ba42d9a80ad725dee43cc7 Mon Sep 17 00:00:00 2001 From: Andres Nötzli Date: Thu, 22 Jun 2017 23:56:45 -0700 Subject: Fix assertion failure due to missing clause id (#180) This commit fixes bug 821. As written in the description of the bug, the issue is that `id` is not being set on one of the paths in addClause(), specifically in the case where all but one literal are assigned false and the remaining literal is assigned true. In that case, we are not actually adding anything and set the `id` to `ClauseIdUndef`. --- src/prop/minisat/core/Solver.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/prop') diff --git a/src/prop/minisat/core/Solver.cc b/src/prop/minisat/core/Solver.cc index 26af5f146..0bf5d5d7c 100644 --- a/src/prop/minisat/core/Solver.cc +++ b/src/prop/minisat/core/Solver.cc @@ -428,7 +428,10 @@ bool Solver::addClause_(vec& ps, bool removable, ClauseId& id) } } return ok; - } else return ok; + } else { + PROOF(id = ClauseIdUndef;); + return ok; + } } } -- cgit v1.2.3