Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Care for root index being undefine while calling Z3_algebraic_get_i()
In some cases, Z3_algebraic_get_i() returned 0. For example, in the following Python snippet, the last assert would fail: import z3 x = z3.Real('x') s = z3.Solver() s.add( (x * x) - 2 == 0, x <= 0) s.check() val_x = s.model().get_interp(x) assert val_x.index() == 1 The problem was that `algebraic_numbers::manager::imp::get_i()` did not check whether the root index was properly initialized. This commit fixes this issue by checking whether root index is initialized the same way various other routines do. Fixes issue Z3Prover#5807. Signed-off-by: Jan Vrany <jan.vrany@labware.com>
- Loading branch information