diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-04-17 10:26:46 -0500 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2019-04-17 08:26:46 -0700 |
commit | 5b00f8d6804bf9f71d6169634341011f99d59b8b (patch) | |
tree | 001bef3833e07195ce2119978f0098d681a2a5ef /test/regress | |
parent | 29a06b999c4637197282405df7040d6773bd3858 (diff) |
Fix extended function decomposition (#2960)
Fixes #2958.
The issue was: we had substr(x,0,2) in R, and the "derivable substitution" modifed this to substr(substr(x,0,2),0,2) in R, since substr(x,0,2) was the representative of x (which is a bad choice, but regardless is legal). Then decomposition inference asked "can i reduce substr(substr(x,0,2),0,2) in R"? It determines substr(substr(x,0,2),0,2) in R rewrites to substr(x,0,2) in R, which is already true. However, substr(x,0,2) in R was what we started with.
The fix makes things much more conservative: we never mark extended functions reduced based on decomposition, since there isnt a strong argument based on an ordering.
Diffstat (limited to 'test/regress')
-rw-r--r-- | test/regress/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/regress/regress0/strings/issue2958.smt2 | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 97ca9a1be..25c0e92aa 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -832,6 +832,7 @@ set(regress_0_tests regress0/strings/ilc-like.smt2 regress0/strings/indexof-sym-simp.smt2 regress0/strings/issue1189.smt2 + regress0/strings/issue2958.smt2 regress0/strings/itos-entail.smt2 regress0/strings/leadingzero001.smt2 regress0/strings/loop001.smt2 diff --git a/test/regress/regress0/strings/issue2958.smt2 b/test/regress/regress0/strings/issue2958.smt2 new file mode 100644 index 000000000..7ed5ef7f3 --- /dev/null +++ b/test/regress/regress0/strings/issue2958.smt2 @@ -0,0 +1,7 @@ +(set-info :smt-lib-version 2.5) +(set-logic QF_SLIA) +(set-info :status unsat) +(declare-const x String) +(assert (not (str.prefixof "ab" x))) +(assert (str.in.re (str.substr x 0 2) (re.++ (str.to.re "ab") (re.* (str.to.re "dcab"))))) +(check-sat) |