mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 18:45:33 +00:00
remove iff
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ecf15ab07d
commit
ff0f257102
47 changed files with 199 additions and 264 deletions
|
@ -12,7 +12,7 @@ Copyright (c) 2015 Microsoft Corporation
|
|||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "ast/rewriter/var_subst.h"
|
||||
|
||||
#define IS_EQUIV(_e_) (m.is_eq(_e_) || m.is_iff(_e_))
|
||||
#define IS_EQUIV(_e_) m.is_eq(_e_)
|
||||
|
||||
#define SAME_OP(_d1_, _d2_) ((_d1_ == _d2_) || (IS_EQUIV(_d1_) && IS_EQUIV(_d2_)))
|
||||
|
||||
|
@ -1032,7 +1032,7 @@ bool proof_checker::match_and(expr const* e, expr_ref_vector& terms) const {
|
|||
}
|
||||
|
||||
bool proof_checker::match_iff(expr const* e, expr_ref& t1, expr_ref& t2) const {
|
||||
return match_op(e, OP_IFF, t1, t2);
|
||||
return match_op(e, OP_EQ, t1, t2) && m.is_bool(t1);
|
||||
}
|
||||
|
||||
bool proof_checker::match_equiv(expr const* e, expr_ref& t1, expr_ref& t2) const {
|
||||
|
@ -1044,7 +1044,7 @@ bool proof_checker::match_implies(expr const* e, expr_ref& t1, expr_ref& t2) con
|
|||
}
|
||||
|
||||
bool proof_checker::match_eq(expr const* e, expr_ref& t1, expr_ref& t2) const {
|
||||
return match_op(e, OP_EQ, t1, t2) || match_iff(e, t1, t2);
|
||||
return match_op(e, OP_EQ, t1, t2);
|
||||
}
|
||||
|
||||
bool proof_checker::match_oeq(expr const* e, expr_ref& t1, expr_ref& t2) const {
|
||||
|
|
|
@ -110,10 +110,10 @@ public:
|
|||
|
||||
if (m.is_or(decl))
|
||||
{ mk_or_core(args, res); }
|
||||
else if (m.is_iff(decl) && args.size() == 2)
|
||||
else if (m.is_eq(decl) && args.size() == 2)
|
||||
// avoiding simplifying equalities. In particular,
|
||||
// we don't want (= (not a) (not b)) to be reduced to (= a b)
|
||||
{ res = m.mk_iff(args.get(0), args.get(1)); }
|
||||
{ res = m.mk_eq(args.get(0), args.get(1)); }
|
||||
else
|
||||
{ brwr.mk_app(decl, args.size(), args.c_ptr(), res); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue