summaryrefslogtreecommitdiff
path: root/src/theory/strings/theory_strings.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-30 11:57:58 -0500
committerGitHub <noreply@github.com>2018-08-30 11:57:58 -0500
commitbc0c0b8b9ea77e8e4e328dbe66a4582fa7883eda (patch)
tree4f43e20e294ade551676847668ceb424d44bab4f /src/theory/strings/theory_strings.cpp
parent3eac9d04c5d4bfba81142d4a5fe91b86590b32ae (diff)
Add regular expression elimination module (#2400)
Diffstat (limited to 'src/theory/strings/theory_strings.cpp')
-rw-r--r--src/theory/strings/theory_strings.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp
index 72e82edca..35835398c 100644
--- a/src/theory/strings/theory_strings.cpp
+++ b/src/theory/strings/theory_strings.cpp
@@ -793,7 +793,6 @@ Node TheoryStrings::expandDefinition(LogicRequest &logicRequest, Node node) {
return node;
}
-
void TheoryStrings::check(Effort e) {
if (done() && e<EFFORT_FULL) {
return;
@@ -4301,6 +4300,19 @@ Node TheoryStrings::getNextDecisionRequest( unsigned& priority ) {
Node TheoryStrings::ppRewrite(TNode atom) {
Trace("strings-ppr") << "TheoryStrings::ppRewrite " << atom << std::endl;
+ Node atomElim;
+ if (options::regExpElim() && atom.getKind() == STRING_IN_REGEXP)
+ {
+ // aggressive elimination of regular expression membership
+ atomElim = d_regexp_elim.eliminate(atom);
+ if (!atomElim.isNull())
+ {
+ Trace("strings-ppr") << " rewrote " << atom << " -> " << atomElim
+ << " via regular expression elimination."
+ << std::endl;
+ atom = atomElim;
+ }
+ }
if( !options::stringLazyPreproc() ){
//eager preprocess here
std::vector< Node > new_nodes;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback