Skip to content

Commit 01a4195

Browse files
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 9a87bb1 commit 01a4195

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/smt/smt_context.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,16 @@ namespace smt {
9999
m_model_generator->set_context(this);
100100
}
101101

102-
102+
::
103103
/**
104104
\brief retrieve flag for when cancelation is possible.
105105
*/
106106

107107
bool context::get_cancel_flag() {
108-
return !m.limit().inc();
108+
if (m.limit().inc())
109+
return false;
110+
m_last_search_failure = CANCELED;
111+
return true;
109112
}
110113

111114
void context::updt_params(params_ref const& p) {
@@ -3745,8 +3748,9 @@ namespace smt {
37453748
VERIFY(!resolve_conflict());
37463749
return l_false;
37473750
}
3748-
if (get_cancel_flag())
3751+
if (get_cancel_flag())
37493752
return l_undef;
3753+
37503754
timeit tt(get_verbosity_level() >= 100, "smt.stats");
37513755
reset_model();
37523756
SASSERT(at_search_level());
@@ -3959,10 +3963,8 @@ namespace smt {
39593963
if (m_last_search_failure != OK)
39603964
return true;
39613965

3962-
if (get_cancel_flag()) {
3963-
m_last_search_failure = CANCELED;
3964-
return true;
3965-
}
3966+
if (get_cancel_flag())
3967+
return true;
39663968

39673969
if (m_progress_callback) {
39683970
m_progress_callback->fast_progress_sample();
@@ -3973,10 +3975,8 @@ namespace smt {
39733975
}
39743976
}
39753977

3976-
if (get_cancel_flag()) {
3977-
m_last_search_failure = CANCELED;
3978-
return true;
3979-
}
3978+
if (get_cancel_flag())
3979+
return true;
39803980

39813981
if (memory::above_high_watermark()) {
39823982
m_last_search_failure = MEMOUT;

0 commit comments

Comments
 (0)