mirror of
https://github.com/Z3Prover/z3
synced 2025-11-28 00:09:49 +00:00
fix infinite loop in update function
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
11fb5c7dc4
commit
6d19c045d8
1 changed files with 2 additions and 0 deletions
|
|
@ -2707,6 +2707,8 @@ namespace sls {
|
|||
void arith_base<num_t>::update_unchecked(var_t v, num_t const& new_value) {
|
||||
auto& vi = m_vars[v];
|
||||
auto old_value = value(v);
|
||||
if (old_value == new_value)
|
||||
return;
|
||||
IF_VERBOSE(5, verbose_stream() << "update: v" << v << " " << mk_bounded_pp(vi.m_expr, m) << " := " << old_value << " -> " << new_value << "\n");
|
||||
TRACE(arith, tout << "update: v" << v << " " << mk_bounded_pp(vi.m_expr, m) << " := " << old_value << " -> " << new_value << "\n");
|
||||
vi.set_value(new_value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue