str.in.re( x, re.++( str.to.re(y), str.to.re(z) ) ) ---> x = str.++( y, z ) is not necessary since
re.++( str.to.re(y), str.to.re(z) ) -> str.to.re( str.++( y, z ) )
str.in.re( x, str.to.re( str.++(y, z) ) ) ---> x = str.++( y, z )
This PR removes the above rewrite, which was implemented incorrectly and was dead code.
bool allSigma = true;
bool allSigmaStrict = true;
unsigned allSigmaMinSize = 0;
- bool allString = true;
- std::vector< Node > cc;
for (const Node& rc : r)
{
Assert(rc.getKind() != kind::REGEXP_EMPTY);
else
{
allSigma = false;
- }
- if (rc.getKind() != kind::STRING_TO_REGEXP)
- {
- allString = false;
- }
- else
- {
- cc.push_back(rc);
+ break;
}
}
if (allSigma)
retNode = nm->mkNode(allSigmaStrict ? EQUAL : GEQ, lenx, num);
return returnRewrite(node, retNode, "re-concat-pure-allchar");
}
- else if (allString)
- {
- retNode = x.eqNode(mkConcat(STRING_CONCAT, cc));
- return returnRewrite(node, retNode, "re-concat-pure-str");
- }
}else if( r.getKind()==kind::REGEXP_INTER || r.getKind()==kind::REGEXP_UNION ){
std::vector< Node > mvec;
for( unsigned i=0; i<r.getNumChildren(); i++ ){