We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 252ca1b commit ae350bcCopy full SHA for ae350bc
src/opt/maxlex.cpp
@@ -52,14 +52,15 @@ namespace opt {
52
ast_manager& m;
53
maxsat_context& m_c;
54
55
- void update_assignment() {
+ bool update_assignment() {
56
model_ref mdl;
57
s().get_model(mdl);
58
if (mdl) {
59
m_model = mdl;
60
m_c.model_updated(mdl.get());
61
update_assignment(mdl);
62
}
63
+ return mdl.get() != nullptr;
64
65
66
void assert_value(soft& soft) {
@@ -158,7 +159,8 @@ namespace opt {
158
159
lbool is_sat = s().check_sat(asms);
160
switch (is_sat) {
161
case l_true:
- update_assignment();
162
+ if (!update_assignment())
163
+ return l_undef;
164
SASSERT(soft.value == l_true || m.limit().get_cancel_flag());
165
break;
166
case l_false:
0 commit comments