summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-06-15 09:40:34 -0500
committerGitHub <noreply@github.com>2020-06-15 07:40:34 -0700
commit5de97c3efe8794bf7e39774686dca81a1982a8ed (patch)
tree092aca5e779a1a719e88a78ff4755df88210cad9 /src
parent60ed666d657bfcd69f48821c78a34696796df5fb (diff)
Do RE derivation inference only for concrete constant RE (#4609)
The RE derive inference was not designed to handle re.comp. This makes the application of this inference more conservative.
Diffstat (limited to 'src')
-rw-r--r--src/theory/strings/regexp_solver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/theory/strings/regexp_solver.cpp b/src/theory/strings/regexp_solver.cpp
index db7e2d836..c9cee97a0 100644
--- a/src/theory/strings/regexp_solver.cpp
+++ b/src/theory/strings/regexp_solver.cpp
@@ -599,7 +599,8 @@ bool RegExpSolver::deriveRegExp(Node x,
Trace("regexp-derive") << "RegExpSolver::deriveRegExp: x=" << x
<< ", r= " << r << std::endl;
CVC4::String s = getHeadConst(x);
- if (!s.empty() && d_regexp_opr.checkConstRegExp(r))
+ // only allow RE_DERIVE for concrete constant regular expressions
+ if (!s.empty() && d_regexp_opr.getRegExpConstType(r) == RE_C_CONRETE_CONSTANT)
{
Node conc = Node::null();
Node dc = r;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback