mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
log also quantifier generation (besides binding)
We add also logging for quantifier generation. It is auxiliary information that is of use for diagnostics (axiom profiler).
This commit is contained in:
parent
c1b355f342
commit
842e8057bc
7 changed files with 27 additions and 16 deletions
|
@ -364,10 +364,10 @@ namespace q {
|
|||
}
|
||||
}
|
||||
|
||||
q_proof_hint* q_proof_hint::mk(euf::solver& s, sat::literal_vector const& lits, unsigned n, euf::enode* const* bindings) {
|
||||
q_proof_hint* q_proof_hint::mk(euf::solver& s, unsigned generation, sat::literal_vector const& lits, unsigned n, euf::enode* const* bindings) {
|
||||
SASSERT(n > 0);
|
||||
auto* mem = s.get_region().allocate(q_proof_hint::get_obj_size(n, lits.size()));
|
||||
q_proof_hint* ph = new (mem) q_proof_hint(n, lits.size());
|
||||
q_proof_hint* ph = new (mem) q_proof_hint(generation, n, lits.size());
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
ph->m_bindings[i] = bindings[i]->get_expr();
|
||||
for (unsigned i = 0; i < lits.size(); ++i)
|
||||
|
@ -375,10 +375,10 @@ namespace q {
|
|||
return ph;
|
||||
}
|
||||
|
||||
q_proof_hint* q_proof_hint::mk(euf::solver& s, sat::literal l1, sat::literal l2, unsigned n, expr* const* bindings) {
|
||||
q_proof_hint* q_proof_hint::mk(euf::solver& s, unsigned generation, sat::literal l1, sat::literal l2, unsigned n, expr* const* bindings) {
|
||||
SASSERT(n > 0);
|
||||
auto* mem = s.get_region().allocate(q_proof_hint::get_obj_size(n, 2));
|
||||
q_proof_hint* ph = new (mem) q_proof_hint(n, 2);
|
||||
q_proof_hint* ph = new (mem) q_proof_hint(generation, n, 2);
|
||||
for (unsigned i = 0; i < n; ++i)
|
||||
ph->m_bindings[i] = bindings[i];
|
||||
ph->m_literals[0] = l1;
|
||||
|
@ -390,6 +390,9 @@ namespace q {
|
|||
ast_manager& m = s.get_manager();
|
||||
expr_ref_vector args(m);
|
||||
expr_ref binding(m);
|
||||
arith_util a(m);
|
||||
expr_ref gen(a.mk_int(m_generation), m);
|
||||
expr* gens[1] = { gen.get() };
|
||||
sort* range = m.mk_proof_sort();
|
||||
for (unsigned i = 0; i < m_num_bindings; ++i)
|
||||
args.push_back(m_bindings[i]);
|
||||
|
@ -398,6 +401,7 @@ namespace q {
|
|||
for (unsigned i = 0; i < m_num_literals; ++i)
|
||||
args.push_back(s.literal2expr(~m_literals[i]));
|
||||
args.push_back(binding);
|
||||
args.push_back(m.mk_app(symbol("gen"), 1, gens, range));
|
||||
return m.mk_app(symbol("inst"), args.size(), args.data(), range);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue