mirror of
https://github.com/Z3Prover/z3
synced 2026-02-17 06:11:44 +00:00
catch and fail on an exception
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
c58652bf5b
commit
9a72bbd4ba
1 changed files with 9 additions and 1 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include "math/polynomial/polynomial_cache.h"
|
#include "math/polynomial/polynomial_cache.h"
|
||||||
#include "math/polynomial/polynomial.h"
|
#include "math/polynomial/polynomial.h"
|
||||||
|
#include "util/z3_exception.h"
|
||||||
|
|
||||||
bool is_set(unsigned k) { return static_cast<int>(k) != -1; }
|
bool is_set(unsigned k) { return static_cast<int>(k) != -1; }
|
||||||
|
|
||||||
|
|
@ -821,7 +822,14 @@ or
|
||||||
SASSERT(is_square_free(p.m_poly));
|
SASSERT(is_square_free(p.m_poly));
|
||||||
scoped_anum_vector roots(m_am);
|
scoped_anum_vector roots(m_am);
|
||||||
SASSERT(max_var(p.m_poly) == m_level);
|
SASSERT(max_var(p.m_poly) == m_level);
|
||||||
m_am.isolate_roots(p.m_poly, undef_var_assignment(sample(), m_level), roots);
|
try {
|
||||||
|
m_am.isolate_roots(p.m_poly, undef_var_assignment(sample(), m_level), roots);
|
||||||
|
}
|
||||||
|
catch (z3_exception const& ex) {
|
||||||
|
TRACE(lws, tout << "isolate_roots failed: " << ex.what() << "\n";);
|
||||||
|
m_fail = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (roots.size() == 0) {
|
if (roots.size() == 0) {
|
||||||
/* Rule 4.6. Let i ∈ N, R ⊆ Ri, s ∈ R_{i−1}, and realRoots(p(s, xi )) = ∅.
|
/* Rule 4.6. Let i ∈ N, R ⊆ Ri, s ∈ R_{i−1}, and realRoots(p(s, xi )) = ∅.
|
||||||
sample(s)(R), an_del(p)(R) ⊢ sgn_inv(p)(R) */
|
sample(s)(R), an_del(p)(R) ⊢ sgn_inv(p)(R) */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue