mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
check cancellation flag in min/max. Fixes issue #206
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
dd01f6be46
commit
7f219e84de
|
@ -1530,7 +1530,7 @@ namespace smt {
|
||||||
max_min_t result = OPTIMIZED;
|
max_min_t result = OPTIMIZED;
|
||||||
has_shared = false;
|
has_shared = false;
|
||||||
unsigned max_efforts = 10 + (ctx.get_random_value() % 20);
|
unsigned max_efforts = 10 + (ctx.get_random_value() % 20);
|
||||||
while (best_efforts < max_efforts) {
|
while (best_efforts < max_efforts && !ctx.get_cancel_flag()) {
|
||||||
theory_var x_j = null_theory_var;
|
theory_var x_j = null_theory_var;
|
||||||
theory_var x_i = null_theory_var;
|
theory_var x_i = null_theory_var;
|
||||||
max_gain.reset();
|
max_gain.reset();
|
||||||
|
@ -1692,7 +1692,7 @@ namespace smt {
|
||||||
SASSERT(satisfy_bounds());
|
SASSERT(satisfy_bounds());
|
||||||
}
|
}
|
||||||
TRACE("opt", display(tout););
|
TRACE("opt", display(tout););
|
||||||
return (best_efforts>0)?BEST_EFFORT:result;
|
return (best_efforts>0 || ctx.get_cancel_flag())?BEST_EFFORT:result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue