summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/theory/strings/options2
-rw-r--r--src/theory/strings/regexp_operation.cpp2
-rw-r--r--src/util/regexp.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/theory/strings/options b/src/theory/strings/options
index 5ac86dcae..139eca6ac 100644
--- a/src/theory/strings/options
+++ b/src/theory/strings/options
@@ -5,7 +5,7 @@
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
diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp
index 1f4e86846..e608a0533 100644
--- a/src/theory/strings/regexp_operation.cpp
+++ b/src/theory/strings/regexp_operation.cpp
@@ -702,7 +702,7 @@ void RegExpOpr::simplifyRegExp( Node s, Node r, std::vector< Node > &new_nodes )
for(unsigned i=0; i<r.getNumChildren(); ++i) {
if(r[i].getKind() == kind::STRING_TO_REGEXP) {
cc.push_back( r[i][0] );
- } if(r[i].getKind() == kind::STRING_TO_REGEXP) {
+ } else if(r[i].getKind() == kind::REGEXP_EMPTY) {
emptyflag = true;
break;
} else {
diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp
index 246f16243..684a480fb 100644
--- a/src/util/regexp.cpp
+++ b/src/util/regexp.cpp
@@ -17,6 +17,7 @@
#include "util/regexp.h"
#include <iostream>
+#include <iomanip>
using namespace std;
@@ -46,11 +47,10 @@ std::string String::toString() const {
case '\n': s = "\\n"; break;
case '\e': s = "\\e"; break;
default : {
- std::string s2 = static_cast<std::ostringstream*>( &(std::ostringstream() << (int)c) )->str();
- if(s2.size() == 1) {
- s2 = "0" + s2;
- }
- s = "\\x" + s2;
+ std::stringstream ss;
+ ss << std::setfill ('0') << std::setw(2) << std::hex << ((int)c);
+ s = "\\x" + ss.str();
+ //std::string s2 = static_cast<std::ostringstream*>( &(std::ostringstream() << (int)c) )->str();
}
}
str += s;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback