mirror of
https://github.com/Z3Prover/z3
synced 2025-06-28 17:08:45 +00:00
build fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
939bf1c725
commit
b909b87acc
2 changed files with 30 additions and 27 deletions
|
@ -38,29 +38,30 @@ namespace polymorphism {
|
||||||
|
|
||||||
if (!u.has_type_vars(e))
|
if (!u.has_type_vars(e))
|
||||||
return;
|
return;
|
||||||
// insert e into the occurs list for polymorphic roots
|
|
||||||
ast_mark seen;
|
// insert e into the occurs list for polymorphic roots
|
||||||
for (auto* f : inst.m_poly_fns) {
|
ast_mark seen;
|
||||||
f = m.poly_root(f);
|
for (auto* f : inst.m_poly_fns) {
|
||||||
if (seen.is_marked(f))
|
f = m.poly_root(f);
|
||||||
continue;
|
if (seen.is_marked(f))
|
||||||
seen.mark(f, true);
|
continue;
|
||||||
if (!m_occurs.contains(f)) {
|
seen.mark(f, true);
|
||||||
m_occurs.insert(f, ptr_vector<expr>());
|
if (!m_occurs.contains(f)) {
|
||||||
t.push(insert_map(m_occurs, f));
|
m_occurs.insert(f, ptr_vector<expr>());
|
||||||
}
|
t.push(insert_map(m_occurs, f));
|
||||||
auto& es = m_occurs.find(f);
|
|
||||||
es.push_back(e);
|
|
||||||
t.push(remove_back(m_occurs, f));
|
|
||||||
}
|
}
|
||||||
m_assertions.push_back(e);
|
auto& es = m_occurs.find(f);
|
||||||
t.push(push_back_vector(m_assertions));
|
es.push_back(e);
|
||||||
u.collect_type_vars(e, inst.m_tvs);
|
t.push(remove_back(m_occurs, f));
|
||||||
inst.m_subst = alloc(substitutions);
|
}
|
||||||
inst.m_subst->insert(alloc(substitution, m));
|
m_assertions.push_back(e);
|
||||||
m_instances.insert(e, inst);
|
t.push(push_back_vector(m_assertions));
|
||||||
t.push(new_obj_trail(inst.m_subst));
|
u.collect_type_vars(e, inst.m_tvs);
|
||||||
t.push(insert_map(m_instances, e));
|
inst.m_subst = alloc(substitutions);
|
||||||
|
inst.m_subst->insert(alloc(substitution, m));
|
||||||
|
m_instances.insert(e, inst);
|
||||||
|
t.push(new_obj_trail(inst.m_subst));
|
||||||
|
t.push(insert_map(m_instances, e));
|
||||||
}
|
}
|
||||||
|
|
||||||
void inst::collect_instantiations(expr* e) {
|
void inst::collect_instantiations(expr* e) {
|
||||||
|
|
|
@ -41,8 +41,10 @@ namespace polymorphism {
|
||||||
vector<parameter> ps;
|
vector<parameter> ps;
|
||||||
for (unsigned i = 0; i < n; ++i) {
|
for (unsigned i = 0; i < n; ++i) {
|
||||||
auto p = s->get_parameter(i);
|
auto p = s->get_parameter(i);
|
||||||
if (p.is_ast() && is_sort(p.get_ast()))
|
if (p.is_ast() && is_sort(p.get_ast())) {
|
||||||
ps.push_back(parameter((*this)(to_sort(p.get_ast()))));
|
sort_ref s = (*this)(to_sort(p.get_ast()));
|
||||||
|
ps.push_back(parameter(s.get()));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ps.push_back(p);
|
ps.push_back(p);
|
||||||
}
|
}
|
||||||
|
@ -101,11 +103,11 @@ namespace polymorphism {
|
||||||
if (pending)
|
if (pending)
|
||||||
continue;
|
continue;
|
||||||
todo.pop_back();
|
todo.pop_back();
|
||||||
ptr_buffer<sort> sorts;
|
domain.reset();
|
||||||
for (unsigned i = 0; i < q->get_num_decls(); ++i)
|
for (unsigned i = 0; i < q->get_num_decls(); ++i)
|
||||||
sorts.push_back((*this)(q->get_decl_sort(i)));
|
domain.push_back((*this)(q->get_decl_sort(i)));
|
||||||
quantifier* q2 =
|
quantifier* q2 =
|
||||||
m.mk_quantifier(q->get_kind(), q->get_num_decls(), sorts.data(), q->get_decl_names(), result.get(q->get_expr()->get_id()),
|
m.mk_quantifier(q->get_kind(), q->get_num_decls(), domain.data(), q->get_decl_names(), result.get(q->get_expr()->get_id()),
|
||||||
q->get_weight(),
|
q->get_weight(),
|
||||||
q->get_qid(), q->get_skid(),
|
q->get_qid(), q->get_skid(),
|
||||||
q->get_num_patterns(), patterns.data(), q->get_num_no_patterns(), no_patterns.data()
|
q->get_num_patterns(), patterns.data(), q->get_num_no_patterns(), no_patterns.data()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue