Revert a8e0ce67 and add test case (resolves bug #578).
authorMorgan Deters <mdeters@cs.nyu.edu>
Mon, 18 Aug 2014 19:41:46 +0000 (15:41 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Mon, 18 Aug 2014 19:52:55 +0000 (15:52 -0400)
This reverts commit a8e0ce673ba00533a663804cf74500e4d9a3a5cb.

src/parser/smt2/Smt2.g
test/regress/regress0/Makefile.am
test/regress/regress0/bug578.smt2 [new file with mode: 0644]

index d512437af6a0266a73c0ff5d1bdda2784b44fa97..085cc11c840ca532c6acfd428bb47c2008bdbe08 100644 (file)
@@ -1206,7 +1206,7 @@ indexedFunctionName[CVC4::Expr& op]
     ( 'extract' n1=INTEGER_LITERAL n2=INTEGER_LITERAL
       { op = MK_CONST(BitVectorExtract(AntlrInput::tokenToUnsigned($n1),
                                        AntlrInput::tokenToUnsigned($n2))); }
-    | ('repeat' INTEGER_LITERAL)=>'repeat' n=INTEGER_LITERAL
+    | 'repeat' n=INTEGER_LITERAL
       { op = MK_CONST(BitVectorRepeat(AntlrInput::tokenToUnsigned($n))); }
     | 'zero_extend' n=INTEGER_LITERAL
       { op = MK_CONST(BitVectorZeroExtend(AntlrInput::tokenToUnsigned($n))); }
index 55a5883624b453747f46ba15cca3cc7dacff0da1..5e57e9b6769dbfb55881278d9765643535f00d55 100644 (file)
@@ -162,7 +162,8 @@ BUG_TESTS = \
        bug548a.smt2 \
        bug567.smt2 \
        bug576.smt2 \
-       bug576a.smt2
+       bug576a.smt2 \
+       bug578.smt2
 
 TESTS =        $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS)
 
diff --git a/test/regress/regress0/bug578.smt2 b/test/regress/regress0/bug578.smt2
new file mode 100644 (file)
index 0000000..a4d53f8
--- /dev/null
@@ -0,0 +1,7 @@
+(set-info :smt-lib-version 2.0)
+(set-info :status sat)
+(set-logic QF_BV)
+(declare-fun v0 () (_ BitVec 1))
+(declare-fun v1 () (_ BitVec 10))
+(assert (= v1 ((_ repeat 10) v0)))
+(check-sat)