Assert(oldKind != kind::BITVECTOR_SREM);
Assert(oldKind != kind::BITVECTOR_SMOD);
Assert(oldKind != kind::BITVECTOR_XNOR);
+ Assert(oldKind != kind::BITVECTOR_NOR);
Assert(oldKind != kind::BITVECTOR_NAND);
Assert(oldKind != kind::BITVECTOR_SUB);
Assert(oldKind != kind::BITVECTOR_REPEAT);
{
// Based on Hacker's Delight section 2-2 equation a:
// -x = ~x+1
- Node p2 = pow2(bvsize);
- return d_nm->mkNode(kind::SUB, p2, n);
+ Node bvNotNode = createBVNotNode(n, bvsize);
+ return createBVAddNode(bvNotNode, d_one, bvsize);
}
Node IntBlaster::createBVNotNode(Node n, uint64_t bvsize)
regress0/bv/bv_to_int_bvuf_to_intuf.smt2
regress0/bv/bv_to_int_bvuf_to_intuf_sorts.smt2
regress0/bv/bv_to_int_elim_err.smt2
+ regress0/bv/bv_to_int_issue_8413_1.smt2
+ regress0/bv/bv_to_int_issue_8413_2.smt2
regress0/bv/bv_to_int_int1.smt2
regress0/bv/bv_to_int_zext.smt2
regress0/bv/bvcomp.cvc.smt2
--- /dev/null
+; COMMAND-LINE: --solve-bv-as-int=sum
+; EXPECT: sat
+
+(set-logic QF_BV)
+
+(declare-fun zero () (_ BitVec 16))
+(declare-fun x () (_ BitVec 16))
+
+(assert (= zero (_ bv0 16)))
+(assert (= zero (bvneg x)))
+
+(check-sat)
--- /dev/null
+; COMMAND-LINE: --solve-bv-as-int=sum
+; EXPECT: sat
+
+(set-logic QF_BV)
+(declare-fun a () (_ BitVec 1))
+(assert (= (_ bv0 16) (bvsdiv ((_ zero_extend 8) ((_ zero_extend 7) a)) (bvnor (_ bv0 16) (_ bv0 16)))))
+(check-sat)