Skip to content

Commit

Permalink
weird latent bug in wmax: init() succeeds and it returns undef
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Apr 25, 2023
1 parent fdd5c92 commit d8156ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/opt/maxsmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ namespace opt {
try {
is_sat = (*m_msolver)();
}
catch (z3_exception&) {
catch (z3_exception& ex) {
IF_VERBOSE(1, verbose_stream() << ex.msg() << "\n");
is_sat = l_undef;
}
if (is_sat != l_false) {
Expand Down
2 changes: 1 addition & 1 deletion src/opt/wmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace opt {
TRACE("opt", tout << "weighted maxsat\n";);
scoped_ensure_theory wth(*this);
reset();
if (init())
if (!init())
return l_undef;

lbool is_sat = l_true;
Expand Down

0 comments on commit d8156ae

Please sign in to comment.