mirror of
https://github.com/Z3Prover/z3
synced 2025-11-14 18:11:16 +00:00
add an option to register callback on quantifier instantiation
Suppose a user propagator encodes axioms using quantifiers and uses E-matching for instantiation. If it wants to implement a custom priority scheme or drop some instances based on internal checks it can register a callback with quantifier instantiation
This commit is contained in:
parent
d4a4dd6cc7
commit
b33f444545
24 changed files with 126 additions and 3 deletions
|
|
@ -263,6 +263,11 @@ namespace smt {
|
|||
if (stat->get_num_instances() % m_params.m_qi_profile_freq == 0) {
|
||||
m_qm.display_stats(verbose_stream(), q);
|
||||
}
|
||||
|
||||
if (m_on_binding && !m_on_binding(q, instance)) {
|
||||
verbose_stream() << "qi_queue: on_binding returned false, skipping instance.\n";
|
||||
return;
|
||||
}
|
||||
expr_ref lemma(m);
|
||||
if (m.is_or(s_instance)) {
|
||||
ptr_vector<expr> args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue