From fa99334bf3c8ef2b833a48cd1141d84723716d80 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 3 Oct 2017 22:39:36 -0500 Subject: [PATCH] Add regression from #50 regarding "as" parsing in smt2 (#1188) * Add regression from pull request #50, which was fixed separately in pull request #1162. * Improve comment in regression --- test/regress/regress0/parser/Makefile.am | 3 ++- test/regress/regress0/parser/as.smt2 | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/regress/regress0/parser/as.smt2 diff --git a/test/regress/regress0/parser/Makefile.am b/test/regress/regress0/parser/Makefile.am index ab9167943..c1b80b5ff 100644 --- a/test/regress/regress0/parser/Makefile.am +++ b/test/regress/regress0/parser/Makefile.am @@ -22,7 +22,8 @@ TESTS = \ declarefun-emptyset-uf.smt2 \ constraint.smt2 \ strings20.smt2 \ - strings25.smt2 + strings25.smt2 \ + as.smt2 EXTRA_DIST = $(TESTS) diff --git a/test/regress/regress0/parser/as.smt2 b/test/regress/regress0/parser/as.smt2 new file mode 100644 index 000000000..2ba689541 --- /dev/null +++ b/test/regress/regress0/parser/as.smt2 @@ -0,0 +1,14 @@ +(set-logic QF_UF) +(set-info :smt-lib-version 2.0) +(set-info :category "crafted") +(set-info :status sat) +(declare-sort I 0) +(declare-fun e0 () I) + +;; below we type cast e0 to its type +;; in other words, this just affirms that e0 has type I +;; previously, this was not handled correctly in the smt2 parser +(assert (= (as e0 I) (as e0 I))) + +(check-sat) +(exit) -- 2.30.2