3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 17:38:45 +00:00

Added function to select the next variable to split on (User-Propagator) (#6096)

* Added function to select the next variable to split on

* Fixed typo

* Small fixes

* uint -> int
This commit is contained in:
Clemens Eisenhofer 2022-06-19 19:49:25 +02:00 committed by GitHub
parent f08e3d70a9
commit 2fa60aa43c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 255 additions and 104 deletions

View file

@ -83,6 +83,9 @@ namespace smt {
expr_ref_vector m_to_add;
unsigned_vector m_to_add_lim;
unsigned m_to_add_qhead = 0;
expr* m_next_split_expr = nullptr;
unsigned m_next_split_idx;
lbool m_next_split_phase;
expr* var2expr(theory_var v) { return m_var2expr.get(v); }
theory_var expr2var(expr* e) { check_defined(e); return m_expr2var[e->get_id()]; }
@ -95,6 +98,8 @@ namespace smt {
void propagate_consequence(prop_info const& prop);
void propagate_new_fixed(prop_info const& prop);
bool_var enode_to_bool(enode* n, unsigned bit);
public:
theory_user_propagator(context& ctx);
@ -125,13 +130,14 @@ namespace smt {
void register_decide(user_propagator::decide_eh_t& decide_eh) { m_decide_eh = decide_eh; }
bool has_fixed() const { return (bool)m_fixed_eh; }
bool has_decide() const { return (bool)m_decide_eh; }
void propagate_cb(unsigned num_fixed, expr* const* fixed_ids, unsigned num_eqs, expr* const* lhs, expr* const* rhs, expr* conseq) override;
void register_cb(expr* e) override;
void next_split_cb(expr* e, unsigned idx, lbool phase) override;
void new_fixed_eh(theory_var v, expr* value, unsigned num_lits, literal const* jlits);
void decide(bool_var& var, bool& is_pos);
bool get_case_split(bool_var& var, bool& is_pos);
theory * mk_fresh(context * new_ctx) override;
bool internalize_atom(app* atom, bool gate_ctx) override;
@ -154,5 +160,5 @@ namespace smt {
bool can_propagate() override;
void propagate() override;
void display(std::ostream& out) const override {}
};
};
};