This commit fixes Bugzilla bug 766 as proposed by jacobly.alt@gmail.com.
{ f = MK_EXPR(MK_CONST(BitVectorRepeat(k)), f); }
/* BV rotate right */
| BVROTR_TOK LPAREN formula[f] COMMA k=numeral RPAREN
- { f = MK_EXPR(MK_CONST(BitVectorSignExtend(k)), f); }
+ { f = MK_EXPR(MK_CONST(BitVectorRotateRight(k)), f); }
/* BV rotate left */
| BVROTL_TOK LPAREN formula[f] COMMA k=numeral RPAREN
{ f = MK_EXPR(MK_CONST(BitVectorRotateLeft(k)), f); }
wiki.21.cvc \
queries0.cvc \
trim.cvc \
- print_lambda.cvc
+ print_lambda.cvc \
+ cvc3.userdoc.01.cvc \
+ cvc3.userdoc.02.cvc \
+ cvc3.userdoc.03.cvc \
+ cvc3.userdoc.04.cvc \
+ cvc3.userdoc.05.cvc \
+ cvc3.userdoc.06.cvc
# Regression tests for TPTP inputs
TPTP_TESTS =
--- /dev/null
+% COMMAND-LINE: --incremental
+
+% EXPECT: valid
+QUERY 0bin0000111101010000 = 0hex0f50;
+
+% EXPECT: valid
+QUERY 0bin01@0bin0 = 0bin010;
+
+% EXPECT: valid
+QUERY 0bin0011[3:1] = 0bin001;
+
+% EXPECT: valid
+QUERY 0bin0011 << 3 = 0bin0011000;
+
+% EXPECT: valid
+QUERY 0bin1000 >> 3 = 0bin0001;
+
+% EXPECT: valid
+QUERY SX(0bin100, 5) = 0bin11100;
+
+% EXPECT: valid
+QUERY BVZEROEXTEND(0bin1,3) = 0bin0001;
+
+% EXPECT: valid
+QUERY BVREPEAT(0bin10,3) = 0bin101010;
+
+% EXPECT: valid
+QUERY BVROTL(0bin101,1) = 0bin011;
+
+% EXPECT: valid
+QUERY BVROTR(0bin101,1) = 0bin110;
--- /dev/null
+x : BITVECTOR(5);
+y : BITVECTOR(4);
+yy : BITVECTOR(3);
+
+% EXPECT: valid
+QUERY
+ BVPLUS(9, x@0bin0000, (0bin000@(~y)@0bin11))[8:4] = BVPLUS(5, x, ~(y[3:2])) ;
--- /dev/null
+bv : BITVECTOR(10);
+a : BOOLEAN;
+
+% EXPECT: valid
+QUERY
+ 0bin01100000[5:3]=(0bin1111001@bv[0:0])[4:2]
+ AND
+ 0bin1@(IF a THEN 0bin0 ELSE 0bin1 ENDIF) = (IF a THEN 0bin110 ELSE 0bin011 ENDIF)[1:0] ;
--- /dev/null
+x, y, z, t, q : BITVECTOR(1024);
+
+ASSERT x = ~x;
+ASSERT x&y&t&z&q = x;
+ASSERT x|y = t;
+ASSERT BVXOR(x,~x) = t;
+
+% EXPECT: valid
+QUERY FALSE;
--- /dev/null
+x, y : BITVECTOR(4);
+
+ASSERT x = 0hex5;
+ASSERT y = 0bin0101;
+
+% EXPECT: valid
+QUERY
+ BVMULT(8,x,y)=BVMULT(8,y,x)
+ AND
+ NOT(BVLT(x,y))
+ AND
+ BVLE(BVSUB(8,x,y), BVPLUS(8, x, BVUMINUS(x)))
+ AND
+ x = BVSUB(4, BVUMINUS(x), BVPLUS(4, x,0hex1)) ;
--- /dev/null
+% COMMAND-LINE: --incremental
+
+x, y : BITVECTOR(8);
+z, t : BITVECTOR(12);
+
+ASSERT x = 0hexff;
+ASSERT z = 0hexff0;
+
+% EXPECT: valid
+QUERY z = x << 4;
+
+% EXPECT: valid
+QUERY (z >> 4)[7:0] = x;