3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

pin elements in expr2depth

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-10-06 11:45:29 +01:00
parent eac659f748
commit 6df628edc7
5 changed files with 10 additions and 5 deletions

View file

@ -70,11 +70,13 @@ struct interval {
if (is_wrapped()) {
// l >= b.l >= b.h >= h
return b.is_wrapped() && h <= b.h && l >= b.l;
} else if (b.is_wrapped()) {
}
else if (b.is_wrapped()) {
// b.l > b.h >= h >= l
// h >= l >= b.l > b.h
return h <= b.h || l >= b.l;
} else {
}
else {
//
return l >= b.l && h <= b.h;
}

View file

@ -430,6 +430,8 @@ void expr_substitution_simplifier::update_substitution(expr* n, proof* pr) {
if (is_ground(n) && (m.is_eq(n, lhs, rhs) || m.is_iff(n, lhs, rhs))) {
compute_depth(lhs);
compute_depth(rhs);
m_trail.push_back(lhs);
m_trail.push_back(rhs);
if (is_gt(lhs, rhs)) {
TRACE("propagate_values", tout << "insert " << mk_pp(lhs, m) << " -> " << mk_pp(rhs, m) << "\n";);
m_scoped_substitution.insert(lhs, rhs, pr);

View file

@ -146,6 +146,7 @@ class expr_substitution_simplifier : public dom_simplifier {
expr_substitution m_subst;
scoped_expr_substitution m_scoped_substitution;
obj_map<expr, unsigned> m_expr2depth;
expr_ref_vector m_trail;
// move from asserted_formulas to here..
void compute_depth(expr* e);
@ -153,7 +154,7 @@ class expr_substitution_simplifier : public dom_simplifier {
unsigned depth(expr* e) { return m_expr2depth[e]; }
public:
expr_substitution_simplifier(ast_manager& m): m(m), m_subst(m), m_scoped_substitution(m_subst) {}
expr_substitution_simplifier(ast_manager& m): m(m), m_subst(m), m_scoped_substitution(m_subst), m_trail(m) {}
virtual ~expr_substitution_simplifier() {}
virtual bool assert_expr(expr * t, bool sign);