operator REGEXP_OPT 1 "regexp ?"
operator REGEXP_RANGE 2 "regexp range"
-constant REGEXP_EMPTY \
- ::CVC4::RegExpEmpty \
- ::CVC4::RegExpHashFunction \
- "util/regexp.h" \
- "a regexp contains nothing"
-
-constant REGEXP_SIGMA \
- ::CVC4::RegExpSigma \
- ::CVC4::RegExpHashFunction \
- "util/regexp.h" \
- "a regexp contains an arbitrary charactor"
-
-#constant REGEXP_ALL \
-# ::CVC4::RegExp \
-# ::CVC4::RegExpHashFunction \
-# "util/string.h" \
-# "a regexp contains all strings"
+operator REGEXP_EMPTY 0 "regexp empty"
+operator REGEXP_SIGMA 0 "regexp all charactors"
typerule REGEXP_CONCAT ::CVC4::theory::strings::RegExpConcatTypeRule
typerule REGEXP_UNION ::CVC4::theory::strings::RegExpUnionTypeRule
d_emptyString = NodeManager::currentNM()->mkConst( ::CVC4::String("") );\r
d_true = NodeManager::currentNM()->mkConst( true );\r
d_false = NodeManager::currentNM()->mkConst( false );\r
- d_emptyRegexp = NodeManager::currentNM()->mkConst( kind::REGEXP_EMPTY );\r
d_zero = NodeManager::currentNM()->mkConst( ::CVC4::Rational(0) );\r
d_one = NodeManager::currentNM()->mkConst( ::CVC4::Rational(1) );\r
+ std::vector< Node > nvec;\r
+ d_emptyRegexp = NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec );\r
// All Charactors = all printable ones 32-126\r
- d_char_start = 'a';//' ';\r
- d_char_end = 'c';//'~';\r
- d_sigma = mkAllExceptOne( '\0' );\r
- //d_sigma = NodeManager::currentNM()->mkConst( kind::REGEXP_SIGMA );\r
+ //d_char_start = 'a';//' ';\r
+ //d_char_end = 'c';//'~';\r
+ //d_sigma = mkAllExceptOne( '\0' );\r
+ d_sigma = NodeManager::currentNM()->mkNode( kind::REGEXP_SIGMA, nvec );\r
d_sigma_star = NodeManager::currentNM()->mkNode( kind::REGEXP_STAR, d_sigma );\r
}\r
\r
d_zero = NodeManager::currentNM()->mkConst( Rational( 0 ) );
d_one = NodeManager::currentNM()->mkConst( Rational( 1 ) );
d_emptyString = NodeManager::currentNM()->mkConst( ::CVC4::String("") );
- d_emptyRegexp = NodeManager::currentNM()->mkConst( kind::REGEXP_EMPTY );
+ std::vector< Node > nvec;
+ d_emptyRegexp = NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec );
d_true = NodeManager::currentNM()->mkConst( true );
d_false = NodeManager::currentNM()->mkConst( false );
flag = false;
d_regexp_deriv_processed[atom] = true;
}
- } /*else if(splitRegExp( x, r, atom )) {
+ } else if(splitRegExp( x, r, atom )) {
addedLemma = true; flag = false;
d_regexp_deriv_processed[ atom ] = true;
- }*/
+ }
}
} else {
- //TODO
+ //TODO: will be removed soon. keep it for consistence
if(! options::stringExp()) {
is_unk = true;
break;
}
}
if(emptyflag) {
- retNode = NodeManager::currentNM()->mkConst( kind::REGEXP_EMPTY );
+ std::vector< Node > nvec;
+ retNode = NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec );
} else {
if(!preNode.isNull()) {
node_vec.push_back( NodeManager::currentNM()->mkNode( kind::STRING_TO_REGEXP, preNode ) );
}
}
if(flag) {
- retNode = node_vec.size() == 0 ? NodeManager::currentNM()->mkConst( kind::REGEXP_EMPTY ) :
+ std::vector< Node > nvec;
+ retNode = node_vec.size() == 0 ? NodeManager::currentNM()->mkNode( kind::REGEXP_EMPTY, nvec ) :
node_vec.size() == 1 ? node_vec[0] : NodeManager::currentNM()->mkNode(kind::REGEXP_UNION, node_vec);
}
Trace("strings-prerewrite") << "Strings::prerewriteOrRegExp end " << retNode << std::endl;