From: Andrew Reynolds Date: Tue, 30 Jun 2020 23:08:54 +0000 (-0500) Subject: Fix normal form for re.comp (#4676) X-Git-Tag: cvc5-1.0.0~3159 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ffed5a43764641d4808aa77bb0e393623fd4442d;p=cvc5.git Fix normal form for re.comp (#4676) Fixes #4674. --- diff --git a/src/theory/strings/regexp_solver.cpp b/src/theory/strings/regexp_solver.cpp index 627258a4c..53c6c9acc 100644 --- a/src/theory/strings/regexp_solver.cpp +++ b/src/theory/strings/regexp_solver.cpp @@ -672,6 +672,7 @@ Node RegExpSolver::getNormalSymRegExp(Node r, std::vector& nf_exp) case REGEXP_UNION: case REGEXP_INTER: case REGEXP_STAR: + case REGEXP_COMPLEMENT: { std::vector vec_nodes; for (const Node& cr : r) diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 9a58457e6..10e2f414e 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -967,6 +967,7 @@ set(regress_0_tests regress0/strings/issue4070.smt2 regress0/strings/issue4376.smt2 regress0/strings/issue4662-consume-nterm.smt2 + regress0/strings/issue4674-recomp-nf.smt2 regress0/strings/itos-entail.smt2 regress0/strings/large-model.smt2 regress0/strings/leadingzero001.smt2 diff --git a/test/regress/regress0/strings/issue4674-recomp-nf.smt2 b/test/regress/regress0/strings/issue4674-recomp-nf.smt2 new file mode 100644 index 000000000..2096d51ef --- /dev/null +++ b/test/regress/regress0/strings/issue4674-recomp-nf.smt2 @@ -0,0 +1,5 @@ +(set-logic QF_S) +(set-info :status sat) +(declare-fun a () String) +(assert (str.in_re "" (re.++ (str.to_re a) (re.comp re.allchar)))) +(check-sat)