summaryrefslogtreecommitdiff
path: root/src/theory/strings/regexp_operation.cpp
diff options
context:
space:
mode:
authorTianyi Liang <tianyi-liang@uiowa.edu>2015-02-25 10:49:14 -0600
committerTianyi Liang <tianyi-liang@uiowa.edu>2015-02-25 10:49:14 -0600
commit92e4099d9d2b313a521d2a015e604645e24617f4 (patch)
tree0e68f3f4d9d96f115f871cb5fa52c230023e71e4 /src/theory/strings/regexp_operation.cpp
parent57166b98acb6e226e385e6dd4aff9e45a0080aaf (diff)
Switch back to eager loop temporarily.
Diffstat (limited to 'src/theory/strings/regexp_operation.cpp')
-rw-r--r--src/theory/strings/regexp_operation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/theory/strings/regexp_operation.cpp b/src/theory/strings/regexp_operation.cpp
index 061b1adb5..8d107d36a 100644
--- a/src/theory/strings/regexp_operation.cpp
+++ b/src/theory/strings/regexp_operation.cpp
@@ -1131,11 +1131,13 @@ void RegExpOpr::simplifyPRegExp( Node s, Node r, std::vector< Node > &new_nodes
conc = s.eqNode( r[0] );
if(r[0] != r[1]) {
unsigned char a = r[0].getConst<String>().getFirstChar();
+ unsigned char b = r[1].getConst<String>().getFirstChar();
a += 1;
- Node tmp = NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s,
+ Node tmp = a!=b? NodeManager::currentNM()->mkNode(kind::STRING_IN_REGEXP, s,
NodeManager::currentNM()->mkNode(kind::REGEXP_RANGE,
NodeManager::currentNM()->mkConst( CVC4::String(a) ),
- r[1]));
+ r[1])) :
+ s.eqNode(r[1]);
conc = NodeManager::currentNM()->mkNode(kind::OR, conc, tmp);
}
/*
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback