mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
parent
20870c43ec
commit
33525007ab
|
@ -1935,3 +1935,6 @@ void core::collect_statistics(::statistics & st) {
|
||||||
|
|
||||||
|
|
||||||
} // end of nla
|
} // end of nla
|
||||||
|
|
||||||
|
template void nla::intervals::set_var_interval<dd::w_dep::without_deps>(lpvar v, nla::intervals::interval& b);
|
||||||
|
template void nla::intervals::set_var_interval<dd::w_dep::with_deps>(lpvar v, nla::intervals::interval& b);
|
||||||
|
|
|
@ -51,41 +51,38 @@ namespace q {
|
||||||
|
|
||||||
struct remove_binding;
|
struct remove_binding;
|
||||||
struct insert_binding;
|
struct insert_binding;
|
||||||
|
|
||||||
binding* alloc_binding(unsigned n, app* pat, unsigned max_generation, unsigned min_top, unsigned max_top);
|
|
||||||
void add_binding(clause& c, app* pat, euf::enode* const* _binding, unsigned max_generation, unsigned min_top, unsigned max_top);
|
|
||||||
|
|
||||||
sat::ext_justification_idx mk_justification(unsigned idx, clause& c, euf::enode* const* b);
|
|
||||||
|
|
||||||
struct pop_clause;
|
struct pop_clause;
|
||||||
struct scoped_mark_reset;
|
struct scoped_mark_reset;
|
||||||
|
|
||||||
|
|
||||||
euf::solver& ctx;
|
euf::solver& ctx;
|
||||||
solver& m_qs;
|
solver& m_qs;
|
||||||
ast_manager& m;
|
ast_manager& m;
|
||||||
eval m_eval;
|
eval m_eval;
|
||||||
quantifier_stat_gen m_qstat_gen;
|
quantifier_stat_gen m_qstat_gen;
|
||||||
fingerprints m_fingerprints;
|
fingerprints m_fingerprints;
|
||||||
scoped_ptr<binding> m_tmp_binding;
|
scoped_ptr<binding> m_tmp_binding;
|
||||||
unsigned m_tmp_binding_capacity { 0 };
|
unsigned m_tmp_binding_capacity { 0 };
|
||||||
queue m_inst_queue;
|
queue m_inst_queue;
|
||||||
pattern_inference_rw m_infer_patterns;
|
pattern_inference_rw m_infer_patterns;
|
||||||
scoped_ptr<q::mam> m_mam, m_lazy_mam;
|
scoped_ptr<q::mam> m_mam, m_lazy_mam;
|
||||||
ptr_vector<clause> m_clauses;
|
ptr_vector<clause> m_clauses;
|
||||||
obj_map<quantifier, unsigned> m_q2clauses;
|
obj_map<quantifier, unsigned> m_q2clauses;
|
||||||
vector<unsigned_vector> m_watch; // expr_id -> clause-index*
|
vector<unsigned_vector> m_watch; // expr_id -> clause-index*
|
||||||
stats m_stats;
|
stats m_stats;
|
||||||
expr_fast_mark1 m_mark;
|
expr_fast_mark1 m_mark;
|
||||||
unsigned m_generation_propagation_threshold{ 3 };
|
unsigned m_generation_propagation_threshold{ 3 };
|
||||||
|
ptr_vector<app> m_ground;
|
||||||
|
nat_set m_node_in_queue;
|
||||||
|
nat_set m_clause_in_queue;
|
||||||
|
unsigned m_qhead { 0 };
|
||||||
|
unsigned_vector m_clause_queue;
|
||||||
|
|
||||||
|
binding* alloc_binding(unsigned n, app* pat, unsigned max_generation, unsigned min_top, unsigned max_top);
|
||||||
|
void add_binding(clause& c, app* pat, euf::enode* const* _binding, unsigned max_generation, unsigned min_top, unsigned max_top);
|
||||||
|
|
||||||
nat_set m_node_in_queue;
|
sat::ext_justification_idx mk_justification(unsigned idx, clause& c, euf::enode* const* b);
|
||||||
nat_set m_clause_in_queue;
|
|
||||||
unsigned m_qhead { 0 };
|
|
||||||
unsigned_vector m_clause_queue;
|
|
||||||
|
|
||||||
ptr_vector<app> m_ground;
|
|
||||||
void ensure_ground_enodes(expr* e);
|
void ensure_ground_enodes(expr* e);
|
||||||
void ensure_ground_enodes(clause const& c);
|
void ensure_ground_enodes(clause const& c);
|
||||||
|
|
||||||
|
@ -126,12 +123,15 @@ namespace q {
|
||||||
// callback from mam
|
// callback from mam
|
||||||
void on_binding(quantifier* q, app* pat, euf::enode* const* binding, unsigned max_generation, unsigned min_gen, unsigned max_gen);
|
void on_binding(quantifier* q, app* pat, euf::enode* const* binding, unsigned max_generation, unsigned min_gen, unsigned max_gen);
|
||||||
|
|
||||||
// callback from queue
|
// callbacks from queue
|
||||||
lbool evaluate(euf::enode* const* binding, clause& c) { return m_eval(binding, c); }
|
lbool evaluate(euf::enode* const* binding, clause& c) { return m_eval(binding, c); }
|
||||||
|
|
||||||
void add_instantiation(clause& c, binding& b, sat::literal lit);
|
void add_instantiation(clause& c, binding& b, sat::literal lit);
|
||||||
|
|
||||||
bool propagate(euf::enode* const* binding, unsigned max_generation, clause& c);
|
bool propagate(euf::enode* const* binding, unsigned max_generation, clause& c);
|
||||||
|
|
||||||
std::ostream& display(std::ostream& out) const;
|
std::ostream& display(std::ostream& out) const;
|
||||||
|
|
||||||
std::ostream& display_constraint(std::ostream& out, sat::ext_constraint_idx idx) const;
|
std::ostream& display_constraint(std::ostream& out, sat::ext_constraint_idx idx) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -497,7 +497,7 @@ namespace q {
|
||||||
m_num_regs(num_args + 1),
|
m_num_regs(num_args + 1),
|
||||||
m_num_choices(0),
|
m_num_choices(0),
|
||||||
m_root(nullptr) {
|
m_root(nullptr) {
|
||||||
DEBUG_CODE(m_egraph = 0;);
|
DEBUG_CODE(m_egraph = nullptr;);
|
||||||
#ifdef _PROFILE_MAM
|
#ifdef _PROFILE_MAM
|
||||||
m_counter = 0;
|
m_counter = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -566,7 +566,7 @@ namespace q {
|
||||||
|
|
||||||
#ifdef Z3DEBUG
|
#ifdef Z3DEBUG
|
||||||
void set_egraph(egraph * ctx) {
|
void set_egraph(egraph * ctx) {
|
||||||
SASSERT(m_egraph == 0);
|
SASSERT(m_egraph == nullptr);
|
||||||
m_egraph = ctx;
|
m_egraph = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3772,8 +3772,7 @@ namespace q {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& display(std::ostream& out) override {
|
std::ostream& display(std::ostream& out) override {
|
||||||
out << "mam:\n";
|
m_lbl_hasher.display(out << "mam:\n");
|
||||||
m_lbl_hasher.display(out);
|
|
||||||
for (auto* t : m_trees)
|
for (auto* t : m_trees)
|
||||||
if (t)
|
if (t)
|
||||||
t->display(out);
|
t->display(out);
|
||||||
|
@ -3783,7 +3782,6 @@ namespace q {
|
||||||
void propagate() override {
|
void propagate() override {
|
||||||
TRACE("trigger_bug", tout << "match\n"; display(tout););
|
TRACE("trigger_bug", tout << "match\n"; display(tout););
|
||||||
for (code_tree* t : m_to_match) {
|
for (code_tree* t : m_to_match) {
|
||||||
std::cout << t << "\n";
|
|
||||||
SASSERT(t->has_candidates());
|
SASSERT(t->has_candidates());
|
||||||
m_interpreter.execute(t);
|
m_interpreter.execute(t);
|
||||||
t->reset_candidates();
|
t->reset_candidates();
|
||||||
|
|
|
@ -34,7 +34,11 @@ namespace q {
|
||||||
m_parser(m),
|
m_parser(m),
|
||||||
m_evaluator(m),
|
m_evaluator(m),
|
||||||
m_subst(m)
|
m_subst(m)
|
||||||
{}
|
{
|
||||||
|
init_parser_vars();
|
||||||
|
m_vals.resize(15, 0.0f);
|
||||||
|
setup();
|
||||||
|
}
|
||||||
|
|
||||||
void queue::setup() {
|
void queue::setup() {
|
||||||
TRACE("q", tout << "qi_cost: " << m_params.m_qi_cost << "\n";);
|
TRACE("q", tout << "qi_cost: " << m_params.m_qi_cost << "\n";);
|
||||||
|
|
|
@ -81,8 +81,9 @@ namespace q {
|
||||||
}
|
}
|
||||||
|
|
||||||
void solver::collect_statistics(statistics& st) const {
|
void solver::collect_statistics(statistics& st) const {
|
||||||
st.update("quantifier asserts", m_stats.m_num_quantifier_asserts);
|
st.update("q asserts", m_stats.m_num_quantifier_asserts);
|
||||||
m_mbqi.collect_statistics(st);
|
m_mbqi.collect_statistics(st);
|
||||||
|
m_ematch.collect_statistics(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
euf::th_solver* solver::clone(euf::solver& ctx) {
|
euf::th_solver* solver::clone(euf::solver& ctx) {
|
||||||
|
|
Loading…
Reference in a new issue