diff options
author | Andres Nötzli <andres.noetzli@gmail.com> | 2017-06-22 23:56:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 23:56:45 -0700 |
commit | ea8e9af7e428930898ba42d9a80ad725dee43cc7 (patch) | |
tree | 17a011f5219038cfd80021df9ac18b94910eb641 /src/prop | |
parent | 3fe6b54ff58533adf84220bb77dbcac31ad5e157 (diff) |
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`.
Diffstat (limited to 'src/prop')
-rw-r--r-- | src/prop/minisat/core/Solver.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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<Lit>& ps, bool removable, ClauseId& id) } } return ok; - } else return ok; + } else { + PROOF(id = ClauseIdUndef;); + return ok; + } } } |