mirror of
https://github.com/Z3Prover/z3
synced 2025-08-27 21:48:56 +00:00
Adding a probe for qf_ufbv and applying it in the qfufbv_ackr_tactic.
This commit is contained in:
parent
956d774299
commit
acd01c7778
3 changed files with 46 additions and 4 deletions
|
@ -301,6 +301,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
class is_qfbv_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
|
@ -356,6 +357,46 @@ probe * mk_is_qfaufbv_probe() {
|
|||
return alloc(is_qfaufbv_probe);
|
||||
}
|
||||
|
||||
|
||||
struct is_non_qfufbv_predicate {
|
||||
struct found {};
|
||||
ast_manager & m;
|
||||
bv_util m_bv_util;
|
||||
|
||||
is_non_qfufbv_predicate(ast_manager & _m) : m(_m), m_bv_util(_m) {}
|
||||
|
||||
void operator()(var *) { throw found(); }
|
||||
|
||||
void operator()(quantifier *) { throw found(); }
|
||||
|
||||
void operator()(app * n) {
|
||||
if (!m.is_bool(n) && !m_bv_util.is_bv(n))
|
||||
throw found();
|
||||
family_id fid = n->get_family_id();
|
||||
if (fid == m.get_basic_family_id())
|
||||
return;
|
||||
if (fid == m_bv_util.get_family_id())
|
||||
return;
|
||||
if (is_uninterp(n))
|
||||
return;
|
||||
|
||||
throw found();
|
||||
}
|
||||
};
|
||||
|
||||
class is_qfufbv_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
return !test<is_non_qfufbv_predicate>(g);
|
||||
}
|
||||
};
|
||||
|
||||
probe * mk_is_qfufbv_probe() {
|
||||
return alloc(is_qfufbv_probe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
class num_consts_probe : public probe {
|
||||
bool m_bool; // If true, track only boolean constants. Otherwise, track only non boolean constants.
|
||||
char const * m_family; // (Ignored if m_bool == true), if != 0 and m_bool == true, then track only constants of the given family.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue