mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
track quantifier instantiation method in proof hint #7080
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
302ebff704
commit
7486e8724f
8 changed files with 38 additions and 9 deletions
|
@ -699,6 +699,22 @@ app* bool_rewriter::mk_eq(expr* lhs, expr* rhs) {
|
|||
return m().mk_eq(lhs, rhs);
|
||||
}
|
||||
|
||||
bool bool_rewriter::try_ite_eq(expr* lhs, expr* rhs, expr_ref& r) {
|
||||
expr* c, *t, *e;
|
||||
if (!m().is_ite(lhs, c, t, e))
|
||||
return false;
|
||||
if (m().are_equal(t, rhs) && m().are_distinct(e, rhs)) {
|
||||
r = c;
|
||||
return true;
|
||||
}
|
||||
if (m().are_equal(e, rhs) && m().are_distinct(t, rhs)) {
|
||||
r = m().mk_not(c);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
br_status bool_rewriter::mk_eq_core(expr * lhs, expr * rhs, expr_ref & result) {
|
||||
if (m().are_equal(lhs, rhs)) {
|
||||
result = m().mk_true();
|
||||
|
@ -713,6 +729,12 @@ br_status bool_rewriter::mk_eq_core(expr * lhs, expr * rhs, expr_ref & result) {
|
|||
br_status r = BR_FAILED;
|
||||
|
||||
|
||||
if (try_ite_eq(lhs, rhs, result))
|
||||
return BR_REWRITE1;
|
||||
|
||||
if (try_ite_eq(rhs, lhs, result))
|
||||
return BR_REWRITE1;
|
||||
|
||||
if (m_ite_extra_rules) {
|
||||
if (m().is_ite(lhs) && m().is_value(rhs)) {
|
||||
r = try_ite_value(to_app(lhs), to_app(rhs), result);
|
||||
|
|
|
@ -71,6 +71,8 @@ class bool_rewriter {
|
|||
|
||||
void mk_and_as_or(unsigned num_args, expr * const * args, expr_ref & result);
|
||||
|
||||
bool try_ite_eq(expr* lhs, expr* rhs, expr_ref& r);
|
||||
|
||||
expr * mk_or_app(unsigned num_args, expr * const * args);
|
||||
bool simp_nested_not_or(unsigned num_args, expr * const * args, expr_fast_mark1 & neg_lits, expr_fast_mark2 & pos_lits, expr_ref & result);
|
||||
expr * simp_arg(expr * arg, expr_fast_mark1 & neg_lits, expr_fast_mark2 & pos_lits, bool & modified);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue