mirror of
https://github.com/Z3Prover/z3
synced 2025-06-15 18:36:16 +00:00
fix #4901
This commit is contained in:
parent
9a76bf0aa2
commit
c15968aa9e
6 changed files with 34 additions and 1 deletions
|
@ -401,6 +401,7 @@ namespace smt {
|
|||
|
||||
expr_ref_vector* m_new_constraints{ nullptr };
|
||||
random_gen m_rand;
|
||||
func_decl_set m_specrels;
|
||||
|
||||
|
||||
void reset_sort2k() {
|
||||
|
@ -470,6 +471,7 @@ namespace smt {
|
|||
ast_manager& get_manager() const { return m; }
|
||||
|
||||
void reset() {
|
||||
m_specrels.reset();
|
||||
flush_nodes();
|
||||
m_nodes.reset();
|
||||
m_next_node_id = 0;
|
||||
|
@ -479,6 +481,11 @@ namespace smt {
|
|||
reset_sort2k();
|
||||
}
|
||||
|
||||
void set_specrels(context& c) {
|
||||
m_specrels.reset();
|
||||
c.get_specrels(m_specrels);
|
||||
}
|
||||
|
||||
void set_model(proto_model* m) {
|
||||
reset_eval_cache();
|
||||
m_model = m;
|
||||
|
@ -1049,9 +1056,13 @@ namespace smt {
|
|||
*/
|
||||
void complete_partial_funcs(func_decl_set const& partial_funcs) {
|
||||
for (func_decl* f : partial_funcs) {
|
||||
|
||||
// Complete the current interpretation
|
||||
m_model->complete_partial_func(f, true);
|
||||
|
||||
if (m_specrels.contains(f))
|
||||
continue;
|
||||
|
||||
unsigned arity = f->get_arity();
|
||||
func_interp* fi = m_model->get_func_interp(f);
|
||||
if (fi->is_constant())
|
||||
|
@ -2399,9 +2410,11 @@ namespace smt {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void model_finder::process_auf(ptr_vector<quantifier> const& qs, proto_model* mdl) {
|
||||
m_auf_solver->reset();
|
||||
m_auf_solver->set_model(mdl);
|
||||
m_auf_solver->set_specrels(*m_context);
|
||||
|
||||
for (quantifier* q : qs) {
|
||||
quantifier_info* qi = get_quantifier_info(q);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue