summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2020-08-31 21:59:39 +0200
committerGitHub <noreply@github.com>2020-08-31 14:59:39 -0500
commit52bab1414d41a4beb301f3c8a4165fa972f71a93 (patch)
treee6bd08cedfc0e73af9a046e3a91c8dad46b19251 /test/regress
parent7b3b19f73ceb2168ced48d07a590c0f3be82a8d4 (diff)
Fix --ackermann in the presence on syntactically different but possibly equal selects (#4981)
The implementation of --ackermann mishandled selects in a subtle way: If select is applied to two syntactically different arrays (that may be semantically equal), the ackermann preprocessing failed to generate the "all arguments equal implies terms equal" lemmas. The problem is that we used the first argument (that is: the array) as lookup to identify terms that need to be considered for these lemmas. Instead we now use their operator (select) just like for uninterpreted function applications. Fixes #4957 . Also adds a regression.
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/arrays/bug4957.smt26
2 files changed, 7 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 0caeafb36..4de32a426 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -59,6 +59,7 @@ set(regress_0_tests
regress0/arrays/bug272.minimized.smtv1.smt2
regress0/arrays/bug272.smtv1.smt2
regress0/arrays/bug3020.smt2
+ regress0/arrays/bug4957.smt2
regress0/arrays/bug637.delta.smt2
regress0/arrays/constarr.cvc
regress0/arrays/constarr.smt2
diff --git a/test/regress/regress0/arrays/bug4957.smt2 b/test/regress/regress0/arrays/bug4957.smt2
new file mode 100644
index 000000000..f82ae1932
--- /dev/null
+++ b/test/regress/regress0/arrays/bug4957.smt2
@@ -0,0 +1,6 @@
+; COMMAND-LINE: --ackermann --no-check-unsat-cores
+; EXPECT: unsat
+(set-logic QF_ALIA)
+(declare-fun a () (Array Int Int))
+(assert (distinct (select a 0) (select (ite false a a) 0)))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback