mirror of
https://github.com/Z3Prover/z3
synced 2026-06-10 19:07:18 +00:00
Initial commit of QGen
Controlled by fixedpoint.spacer.use_quanti_generalizer measure cumulative time, number of invocations, and number of failed SMT calls Relaxing equality in a pattern: if a variable equals a numeral, relax with GE pob::get_skolems() returns all skolems that might appear in the pob. New skolems must be added above the largest index in that map, even if they are not used in the pob itself. pattern generalization should be done before the pattern is skolemized and added into the new cube.
This commit is contained in:
parent
a1efb88318
commit
23a8e59493
10 changed files with 583 additions and 16 deletions
|
|
@ -340,22 +340,27 @@ app* mk_zk_const(ast_manager &m, unsigned idx, sort *s) {
|
|||
|
||||
namespace find_zk_const_ns {
|
||||
struct proc {
|
||||
int m_max;
|
||||
app_ref_vector &m_out;
|
||||
proc (app_ref_vector &out) : m_out(out) {}
|
||||
proc (app_ref_vector &out) : m_max(-1), m_out(out) {}
|
||||
void operator() (var const * n) const {}
|
||||
void operator() (app *n) const {
|
||||
if (is_uninterp_const(n) &&
|
||||
n->get_decl()->get_name().str().compare (0, 3, "sk!") == 0) {
|
||||
m_out.push_back (n);
|
||||
void operator() (app *n) {
|
||||
int idx;
|
||||
if (is_zk_const(n, idx)) {
|
||||
m_out.push_back(n);
|
||||
if (idx > m_max) {
|
||||
m_max = idx;
|
||||
}
|
||||
}
|
||||
}
|
||||
void operator() (quantifier const *n) const {}
|
||||
};
|
||||
}
|
||||
|
||||
void find_zk_const(expr *e, app_ref_vector &res) {
|
||||
int find_zk_const(expr *e, app_ref_vector &res) {
|
||||
find_zk_const_ns::proc p(res);
|
||||
for_each_expr (p, e);
|
||||
return p.m_max;
|
||||
}
|
||||
|
||||
namespace has_zk_const_ns {
|
||||
|
|
@ -363,8 +368,8 @@ struct found {};
|
|||
struct proc {
|
||||
void operator() (var const *n) const {}
|
||||
void operator() (app const *n) const {
|
||||
if (is_uninterp_const(n) &&
|
||||
n->get_decl()->get_name().str().compare(0, 3, "sk!") == 0) {
|
||||
int idx;
|
||||
if (is_zk_const(n, idx)) {
|
||||
throw found();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue