From 299e1788b8fe309fc98b3bff9da5c64914e87316 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sat, 21 Nov 2020 15:03:05 -0800 Subject: [PATCH] fix #4808 Signed-off-by: Nikolaj Bjorner --- src/ast/rewriter/bv_rewriter.cpp | 9 --------- src/ast/rewriter/bv_rewriter.h | 1 - src/params/bv_rewriter_params.pyg | 1 - 3 files changed, 11 deletions(-) diff --git a/src/ast/rewriter/bv_rewriter.cpp b/src/ast/rewriter/bv_rewriter.cpp index 108aee81c..86a0f3894 100644 --- a/src/ast/rewriter/bv_rewriter.cpp +++ b/src/ast/rewriter/bv_rewriter.cpp @@ -31,7 +31,6 @@ void bv_rewriter::updt_local_params(params_ref const & _p) { m_bit2bool = p.bit2bool(); m_blast_eq_value = p.blast_eq_value(); m_split_concat_eq = p.split_concat_eq(); - m_bvnot2arith = p.bvnot2arith(); m_bvnot_simpl = p.bv_not_simpl(); m_bv_sort_ac = p.bv_sort_ac(); m_mkbv2num = _p.get_bool("mkbv2num", false); @@ -1986,14 +1985,6 @@ br_status bv_rewriter::mk_bv_not(expr * arg, expr_ref & result) { return BR_REWRITE2; } - if (m_bvnot2arith) { - // (bvnot x) --> (bvsub -1 x) - bv_size = get_bv_size(arg); - rational minus_one = (rational::power_of_two(bv_size) - numeral(1)); - result = m_util.mk_bv_sub(m_util.mk_numeral(minus_one, bv_size), arg); - return BR_REWRITE1; - } - if (m_bvnot_simpl) { expr *s(nullptr), *t(nullptr); if (m_util.is_bv_mul(arg, s, t)) { diff --git a/src/ast/rewriter/bv_rewriter.h b/src/ast/rewriter/bv_rewriter.h index 19cc812e8..f8884203c 100644 --- a/src/ast/rewriter/bv_rewriter.h +++ b/src/ast/rewriter/bv_rewriter.h @@ -56,7 +56,6 @@ class bv_rewriter : public poly_rewriter { bool m_mkbv2num; bool m_ite2id; bool m_split_concat_eq; - bool m_bvnot2arith; bool m_bv_sort_ac; bool m_extract_prop; bool m_bvnot_simpl; diff --git a/src/params/bv_rewriter_params.pyg b/src/params/bv_rewriter_params.pyg index 07a43160b..b439f2924 100644 --- a/src/params/bv_rewriter_params.pyg +++ b/src/params/bv_rewriter_params.pyg @@ -7,7 +7,6 @@ def_module_params(module_name='rewriter', ("elim_sign_ext", BOOL, True, "expand sign-ext operator using concat and extract"), ("hi_div0", BOOL, True, "use the 'hardware interpretation' for division by zero (for bit-vector terms)"), ("mul2concat", BOOL, False, "replace multiplication by a power of two into a concatenation"), - ("bvnot2arith", BOOL, False, "replace (bvnot x) with (bvsub -1 x)"), ("bv_sort_ac", BOOL, False, "sort the arguments of all AC operators"), ("bv_extract_prop", BOOL, False, "attempt to partially propagate extraction inwards"), ("bv_not_simpl", BOOL, False, "apply simplifications for bvnot"),