| STRCON_TOK { $kind = CVC4::kind::STRING_CONCAT; }
| STRLEN_TOK { $kind = CVC4::kind::STRING_LENGTH; }
| STRSUB_TOK { $kind = CVC4::kind::STRING_SUBSTR; }
-// | STRCTN_TOK { $kind = CVC4::kind::STRING_STRCTN; }
-// | STRCAT_TOK { $kind = CVC4::kind::STRING_CHARAT; }
+ | STRCTN_TOK { $kind = CVC4::kind::STRING_STRCTN; }
+ | STRCAT_TOK { $kind = CVC4::kind::STRING_CHARAT; }
| STRINRE_TOK { $kind = CVC4::kind::STRING_IN_REGEXP; }
| STRTORE_TOK { $kind = CVC4::kind::STRING_TO_REGEXP; }
| RECON_TOK { $kind = CVC4::kind::REGEXP_CONCAT; }
std::vector< Node > or_vec;
or_vec.push_back( w.eqNode(y) );
Node x1 = NodeManager::currentNM()->mkBoundVar( t[0].getType() );
- Node c1 = NodeManager::currentNM()->mkNode( kind::EXISTS, NodeManager::currentNM()->mkNode( kind::AND,
+ Node b1 = NodeManager::currentNM()->mkNode( kind::BOUND_VAR_LIST, x1 );
+ Node c1 = NodeManager::currentNM()->mkNode( kind::EXISTS, b1, NodeManager::currentNM()->mkNode( kind::AND,
x1.eqNode( emptyString ).negate(),
w.eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, x1, y ) )));
or_vec.push_back( c1 );
Node z2 = NodeManager::currentNM()->mkBoundVar( t[0].getType() );
- Node c2 = NodeManager::currentNM()->mkNode( kind::EXISTS, NodeManager::currentNM()->mkNode( kind::AND,
+ Node b2 = NodeManager::currentNM()->mkNode( kind::BOUND_VAR_LIST, z2 );
+ Node c2 = NodeManager::currentNM()->mkNode( kind::EXISTS, b2, NodeManager::currentNM()->mkNode( kind::AND,
z2.eqNode( emptyString ).negate(),
w.eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, y, z2 ) )));
or_vec.push_back( c2 );
Node x3 = NodeManager::currentNM()->mkBoundVar( t[0].getType() );
Node z3 = NodeManager::currentNM()->mkBoundVar( t[0].getType() );
- Node c3 = NodeManager::currentNM()->mkNode( kind::EXISTS, NodeManager::currentNM()->mkNode( kind::AND,
+ Node b3 = NodeManager::currentNM()->mkNode( kind::BOUND_VAR_LIST, x3, z3 );
+ Node c3 = NodeManager::currentNM()->mkNode( kind::EXISTS, b3, NodeManager::currentNM()->mkNode( kind::AND,
x3.eqNode( emptyString ).negate(), z3.eqNode( emptyString ).negate(),
w.eqNode( NodeManager::currentNM()->mkNode( kind::STRING_CONCAT, x3, y, z3 ) )));
or_vec.push_back( c3 );
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
if( check ){
- if(n.getNumChildren() != 1) {
- throw TypeCheckingExceptionPrivate(n, "expecting 1 term in string length");
- }
TypeNode t = n[0].getType(check);
if (!t.isString()) {
throw TypeCheckingExceptionPrivate(n, "expecting string terms in string length");
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
if( check ){
- if(n.getNumChildren() != 3) {
- throw TypeCheckingExceptionPrivate(n, "expecting 3 terms in substr");
- }
TypeNode t = n[0].getType(check);
if (!t.isString()) {
throw TypeCheckingExceptionPrivate(n, "expecting a string term in substr");
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
if( check ){
- if(n.getNumChildren() != 2) {
- throw TypeCheckingExceptionPrivate(n, "expecting 2 terms in string contain");
- }
TypeNode t = n[0].getType(check);
if (!t.isString()) {
throw TypeCheckingExceptionPrivate(n, "expecting an orginal string term in string contain");
throw TypeCheckingExceptionPrivate(n, "expecting a target string term in string contain");
}
}
- return nodeManager->stringType();
+ return nodeManager->booleanType();
}
};
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
throw (TypeCheckingExceptionPrivate, AssertionException) {
if( check ){
- if(n.getNumChildren() != 2) {
- throw TypeCheckingExceptionPrivate(n, "expecting 2 terms in string char at");
- }
TypeNode t = n[0].getType(check);
if (!t.isString()) {
throw TypeCheckingExceptionPrivate(n, "expecting a string term in string char at");