mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
fixes based on regression tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
809a4efc6b
commit
2ede4b2c80
21 changed files with 159 additions and 151 deletions
|
@ -444,16 +444,12 @@ namespace qe {
|
|||
div_rewriter_cfg(nlqsat& s): m(s.m), a(s.m), m_zero(a.mk_real(0), m) {}
|
||||
~div_rewriter_cfg() {}
|
||||
br_status reduce_app(func_decl* f, unsigned sz, expr* const* args, expr_ref& result, proof_ref& pr) {
|
||||
if (is_decl_of(f, a.get_family_id(), OP_DIV) && sz == 2 && !a.is_numeral(args[1])) {
|
||||
rational r(1);
|
||||
if (is_decl_of(f, a.get_family_id(), OP_DIV) && sz == 2 && (!a.is_numeral(args[1], r) || r.is_zero())) {
|
||||
result = m.mk_fresh_const("div", a.mk_real());
|
||||
m_divs.push_back(div(m, args[0], args[1], to_app(result)));
|
||||
return BR_DONE;
|
||||
}
|
||||
if (is_decl_of(f, a.get_family_id(), OP_DIV_0) && sz == 1 && !a.is_numeral(args[0])) {
|
||||
result = m.mk_fresh_const("div", a.mk_real());
|
||||
m_divs.push_back(div(m, args[0], m_zero, to_app(result)));
|
||||
return BR_DONE;
|
||||
}
|
||||
return BR_FAILED;
|
||||
}
|
||||
vector<div> const& divs() const { return m_divs; }
|
||||
|
@ -507,10 +503,6 @@ namespace qe {
|
|||
m_has_divs = true;
|
||||
return;
|
||||
}
|
||||
if (a.is_div0(n) && s.m_mode == qsat_t) {
|
||||
m_has_divs = true;
|
||||
return;
|
||||
}
|
||||
TRACE("qe", tout << "not NRA: " << mk_pp(n, s.m) << "\n";);
|
||||
throw tactic_exception("not NRA");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue