diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2021-04-02 11:43:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 16:43:53 +0000 |
commit | c6c40d12c38fb30d0c4f503353532b93f03e745a (patch) | |
tree | 366ad9f9af8144e4259a39bbce7379d7bd2ce944 /test/regress/regress0/strings | |
parent | ed1e21df4c7364e9d78f1a5c0605c45640d9ccca (diff) |
Fix case where RE unfolding generates a trivially true lemma (#6267)
An RE unfolding lemma may rewrite to true for tautological RE memberships that our rewriter does not rewrite the membership to true.
An example is (str.in_re x (re.* (re.union (str.to_re "A") (str.to_re x))).
This PR ensures we are robust to these cases.
This fixes benchmarks 3-5 from #6203. Benchmark 3 is added here, 4-5 time out.
Diffstat (limited to 'test/regress/regress0/strings')
-rw-r--r-- | test/regress/regress0/strings/issue6203-3-unfold-trivial-true.smt2 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/regress/regress0/strings/issue6203-3-unfold-trivial-true.smt2 b/test/regress/regress0/strings/issue6203-3-unfold-trivial-true.smt2 new file mode 100644 index 000000000..1ef762df3 --- /dev/null +++ b/test/regress/regress0/strings/issue6203-3-unfold-trivial-true.smt2 @@ -0,0 +1,7 @@ +; COMMAND-LINE: --strings-exp +; EXPECT: sat +(set-logic ALL) +(declare-fun s () String) +(assert (str.in_re s (re.* (re.union (str.to_re "A") (str.to_re s))))) +(assert (not (str.in_re s (re.* (re.opt (re.comp (str.to_re "A"))))))) +(check-sat) |