From d5e67f7263cd0d44e6f15a64940431f385ef873b Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 18 Aug 2014 15:41:46 -0400 Subject: [PATCH] Revert a8e0ce67 and add test case (resolves bug #578). This reverts commit a8e0ce673ba00533a663804cf74500e4d9a3a5cb. --- src/parser/smt2/Smt2.g | 2 +- test/regress/regress0/Makefile.am | 3 ++- test/regress/regress0/bug578.smt2 | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 test/regress/regress0/bug578.smt2 diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index d512437af..085cc11c8 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -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))); } diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am index 55a588362..5e57e9b67 100644 --- a/test/regress/regress0/Makefile.am +++ b/test/regress/regress0/Makefile.am @@ -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 index 000000000..a4d53f8bf --- /dev/null +++ b/test/regress/regress0/bug578.smt2 @@ -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) -- 2.30.2