The RE derive inference was not designed to handle re.comp. This makes the application of this inference more conservative.
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;
regress1/strings/issue3357.smt2
regress1/strings/issue3657-unexpectedUnsatCVC4.smt2
regress1/strings/issue4379.smt2
+ regress1/strings/issue4608-re-derive.smt2
regress1/strings/kaluza-fl.smt2
regress1/strings/loop002.smt2
regress1/strings/loop003.smt2
--- /dev/null
+(set-logic QF_S)
+(set-info :status sat)
+(declare-fun a () String)
+(assert (str.in_re (str.++ "AB" a) (re.inter (re.comp (str.to_re "AB"))
+(re.* (re.diff (str.to_re "AB") (str.to_re ""))))))
+(check-sat)