From: Andrew Reynolds Date: Wed, 19 May 2021 22:50:43 +0000 (-0500) Subject: Pass empty vector when constructing re empty, fixes rewrite (#6576) X-Git-Tag: cvc5-1.0.0~1731 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc0fa2849b96d228bb5ab43d0497a7b077a00099;p=cvc5.git Pass empty vector when constructing re empty, fixes rewrite (#6576) Fixes #6567. --- diff --git a/src/theory/strings/sequences_rewriter.cpp b/src/theory/strings/sequences_rewriter.cpp index e827e87d3..bc77a9bc5 100644 --- a/src/theory/strings/sequences_rewriter.cpp +++ b/src/theory/strings/sequences_rewriter.cpp @@ -1151,7 +1151,8 @@ Node SequencesRewriter::rewriteRangeRegExp(TNode node) if (ch[0] > ch[1]) { // re.range( "B", "A" ) ---> re.none - Node retNode = nm->mkNode(REGEXP_EMPTY, {}); + std::vector emptyVec; + Node retNode = nm->mkNode(REGEXP_EMPTY, emptyVec); return returnRewrite(node, retNode, Rewrite::RE_RANGE_EMPTY); } return node; diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 1478ae072..fe034c519 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -2086,6 +2086,7 @@ set(regress_1_tests regress1/strings/issue6270.smt2 regress1/strings/issue6271-rnf.smt2 regress1/strings/issue6271-2-rnf.smt2 + regress1/strings/issue6567-empty-re-range.smt2 regress1/strings/kaluza-fl.smt2 regress1/strings/loop002.smt2 regress1/strings/loop003.smt2 diff --git a/test/regress/regress1/strings/issue6567-empty-re-range.smt2 b/test/regress/regress1/strings/issue6567-empty-re-range.smt2 new file mode 100644 index 000000000..abf2fd294 --- /dev/null +++ b/test/regress/regress1/strings/issue6567-empty-re-range.smt2 @@ -0,0 +1,4 @@ +(set-logic ALL) +(set-info :status sat) +(assert (str.in_re "" (re.* (re.range "b" "a")))) +(check-sat)