diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-08-30 11:57:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 11:57:58 -0500 |
commit | bc0c0b8b9ea77e8e4e328dbe66a4582fa7883eda (patch) | |
tree | 4f43e20e294ade551676847668ceb424d44bab4f /src/theory/strings/theory_strings.cpp | |
parent | 3eac9d04c5d4bfba81142d4a5fe91b86590b32ae (diff) |
Add regular expression elimination module (#2400)
Diffstat (limited to 'src/theory/strings/theory_strings.cpp')
-rw-r--r-- | src/theory/strings/theory_strings.cpp | 14 |
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; |