Skip to content

Commit 0e34169

Browse files
committed
Fix types in use of set_polarity
MiniSat expects an lbool, not a bool. This remained unnoticed as the method is unused and thus never instantiated. It only became apparent when doing an explicit class template instantiation in the course of other debugging work.
1 parent 43b43ee commit 0e34169

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/solvers/sat/satcheck_minisat2.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ void satcheck_minisat2_baset<T>::set_polarity(literalt a, bool value)
7373
{
7474
PRECONDITION(!a.is_constant());
7575

76+
using Minisat::lbool;
77+
7678
try
7779
{
7880
add_variables();
79-
solver->setPolarity(a.var_no(), value);
81+
solver->setPolarity(a.var_no(), value ? l_True : l_False);
8082
}
8183
catch(Minisat::OutOfMemoryException)
8284
{

0 commit comments

Comments
 (0)