module STRINGS "theory/strings/options.h" Strings theory
-option stringCharCardinality strings-alphabet-card --strings-alphabet-card=N int16_t :default 256 :predicate CVC4::smt::beforeSearch :predicate-include "smt/smt_engine.h"
+expert-option stringCharCardinality strings-alphabet-card --strings-alphabet-card=N int16_t :default 256 :predicate CVC4::smt::beforeSearch :predicate-include "smt/smt_engine.h"
the cardinality of the characters used by the theory of strings, default 256
option stringRegExpUnrollDepth strings-regexp-depth --strings-regexp-depth=N int16_t :default 10 :read-write
for(unsigned i=0; i<r.getNumChildren(); ++i) {\r
if(r[i].getKind() == kind::STRING_TO_REGEXP) {\r
cc.push_back( r[i][0] );\r
- } if(r[i].getKind() == kind::STRING_TO_REGEXP) {\r
+ } else if(r[i].getKind() == kind::REGEXP_EMPTY) {\r
emptyflag = true;\r
break;\r
} else {\r
\r
#include "util/regexp.h"\r
#include <iostream>\r
+#include <iomanip>\r
\r
using namespace std;\r
\r
case '\n': s = "\\n"; break;\r
case '\e': s = "\\e"; break;\r
default : {\r
- std::string s2 = static_cast<std::ostringstream*>( &(std::ostringstream() << (int)c) )->str();\r
- if(s2.size() == 1) {\r
- s2 = "0" + s2;\r
- }\r
- s = "\\x" + s2;\r
+ std::stringstream ss;\r
+ ss << std::setfill ('0') << std::setw(2) << std::hex << ((int)c);\r
+ s = "\\x" + ss.str();\r
+ //std::string s2 = static_cast<std::ostringstream*>( &(std::ostringstream() << (int)c) )->str();\r
}\r
}\r
str += s;\r
TESTS = \
at001.smt2 \
cardinality.smt2 \
+ escchar.smt2 \
str001.smt2 \
str002.smt2 \
str003.smt2 \
(set-logic QF_S)
(set-info :status unsat)
-
+;this option for experts only
(set-option :strings-alphabet-card 2)
(declare-fun x () String)