3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-12-10 20:48:46 -08:00
parent 701671466b
commit 21121f14a5
3 changed files with 15 additions and 6 deletions

View file

@ -48,13 +48,13 @@ namespace polysat {
lbool value; // value assigned by solver
};
solver_interface& s;
mutable scoped_ptr_vector<dd::pdd_manager> m_pdd;
viable m_viable;
constraints m_constraints;
assignment m_assignment;
unsigned m_qhead = 0, m_vqhead = 0;
svector<prop_item> m_prop_queue;
svector<constraint_info> m_constraint_index; // index of constraints
mutable scoped_ptr_vector<dd::pdd_manager> m_pdd;
dependency_vector m_unsat_core;

View file

@ -148,6 +148,7 @@ namespace polysat {
public:
solver(euf::solver& ctx, theory_id id);
~solver() override {}
void set_lookahead(sat::lookahead* s) override { }
void init_search() override {}
double get_reward(literal l, sat::ext_constraint_idx idx, sat::literal_occs_fun& occs) const override { return 0; }

View file

@ -289,8 +289,19 @@ public:
return m_cached_mc;
}
unsigned get_num_assertions() const override { return s->get_num_assertions(); }
expr* get_assertion(unsigned idx) const override { return s->get_assertion(idx); }
unsigned get_num_assertions() const override {
unsigned qhead = m_preprocess_state.qhead();
unsigned qtail = m_preprocess_state.qtail();
return s->get_num_assertions() + qtail - qhead;
}
expr* get_assertion(unsigned idx) const override {
unsigned qhead = m_preprocess_state.qhead();
unsigned qtail = m_preprocess_state.qtail();
if (idx < qtail - qhead)
return m_fmls.get(idx + qhead).fml();
idx -= qtail - qhead;
return s->get_assertion(idx);
}
std::string reason_unknown() const override { return s->reason_unknown(); }
void set_reason_unknown(char const* msg) override { s->set_reason_unknown(msg); }
void get_labels(svector<symbol>& r) override { s->get_labels(r); }
@ -364,9 +375,6 @@ public:
expr* congruence_root(expr* e) override { return s->congruence_root(e); }
expr* congruence_next(expr* e) override { return s->congruence_next(e); }
std::ostream& display(std::ostream& out, unsigned n, expr* const* assumptions) const override {
return s->display(out, n, assumptions);
}
void get_units_core(expr_ref_vector& units) override { s->get_units_core(units); }
expr_ref_vector get_trail(unsigned max_level) override { return s->get_trail(max_level); }
void get_levels(ptr_vector<expr> const& vars, unsigned_vector& depth) override { s->get_levels(vars, depth); }