mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
24a9ca3226
commit
9dd8ebb474
3 changed files with 23 additions and 21 deletions
|
@ -22,6 +22,13 @@ Notes:
|
|||
#include "math/polynomial/algebraic_numbers.h"
|
||||
#include "ast/ast_pp.h"
|
||||
|
||||
seq_util& arith_rewriter_core::seq() {
|
||||
if (!m_seq) {
|
||||
m_seq = alloc(seq_util, m());
|
||||
}
|
||||
return *m_seq;
|
||||
}
|
||||
|
||||
void arith_rewriter::updt_local_params(params_ref const & _p) {
|
||||
arith_rewriter_params p(_p);
|
||||
m_arith_lhs = p.arith_lhs();
|
||||
|
@ -247,10 +254,10 @@ bool arith_rewriter::is_non_negative(expr* e) {
|
|||
unsigned pu;
|
||||
return m_util.is_power(e, n, p) && m_util.is_unsigned(p, pu) && (pu % 2 == 0);
|
||||
};
|
||||
if (m_seq.str.is_length(e))
|
||||
return true;
|
||||
if (is_even_power(e))
|
||||
return true;
|
||||
if (seq().str.is_length(e))
|
||||
return true;
|
||||
if (!m_util.is_mul(e))
|
||||
return false;
|
||||
expr_mark mark;
|
||||
|
@ -260,7 +267,7 @@ bool arith_rewriter::is_non_negative(expr* e) {
|
|||
for (expr* arg : args) {
|
||||
if (is_even_power(arg))
|
||||
continue;
|
||||
if (m_seq.str.is_length(e))
|
||||
if (seq().str.is_length(e))
|
||||
continue;
|
||||
if (m_util.is_numeral(arg, r)) {
|
||||
if (r.is_neg())
|
||||
|
|
|
@ -27,13 +27,14 @@ class arith_rewriter_core {
|
|||
protected:
|
||||
typedef rational numeral;
|
||||
arith_util m_util;
|
||||
seq_util m_seq;
|
||||
scoped_ptr<seq_util> m_seq;
|
||||
bool m_expand_power;
|
||||
bool m_mul2power;
|
||||
bool m_expand_tan;
|
||||
|
||||
ast_manager & m() const { return m_util.get_manager(); }
|
||||
family_id get_fid() const { return m_util.get_family_id(); }
|
||||
seq_util& seq();
|
||||
|
||||
bool is_numeral(expr * n) const { return m_util.is_numeral(n); }
|
||||
bool is_numeral(expr * n, numeral & r) const { return m_util.is_numeral(n, r); }
|
||||
|
@ -45,7 +46,7 @@ protected:
|
|||
bool use_power() const { return m_mul2power && !m_expand_power; }
|
||||
decl_kind power_decl_kind() const { return OP_POWER; }
|
||||
public:
|
||||
arith_rewriter_core(ast_manager & m):m_util(m), m_seq(m) {}
|
||||
arith_rewriter_core(ast_manager & m):m_util(m) {}
|
||||
bool is_zero(expr * n) const { return m_util.is_zero(n); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue