Fixes #6271.
This was triggered by recent fixes, this fixes solution soundness issues with symbolic regular expressions due to spuriously included antecedants, which made lemmas SAT-context dependent while being cached as user-context dependent.
// if so, do simple unrolling
Trace("strings-regexp") << "Simplify on " << atom << std::endl;
Node conc = d_regexp_opr.simplify(atom, polarity);
- Trace("strings-regexp") << "...finished" << std::endl;
+ Trace("strings-regexp") << "...finished, got " << conc << std::endl;
// if simplifying successfully generated a lemma
if (!conc.isNull())
{
- std::vector<Node> iexp = rnfexp;
+ std::vector<Node> iexp;
std::vector<Node> noExplain;
iexp.push_back(assertion);
noExplain.push_back(assertion);
regress1/strings/issue6191-replace-all.smt2
regress1/strings/issue6203-1-substr-ctn-strip.smt2
regress1/strings/issue6203-2-re-ccache.smt2
+ regress1/strings/issue6271-rnf.smt2
+ regress1/strings/issue6271-2-rnf.smt2
regress1/strings/kaluza-fl.smt2
regress1/strings/loop002.smt2
regress1/strings/loop003.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp
+; EXPECT: unsat
+(set-logic ALL)
+(declare-fun str4 () String)
+(declare-fun str5 () String)
+(assert (str.in_re str4 (re.+ (str.to_re str5))))
+(assert (= 1 (str.indexof str5 str4 0)))
+(check-sat)
--- /dev/null
+; COMMAND-LINE: --strings-exp --strings-fmf
+; EXPECT: sat
+(set-logic ALL)
+(set-option :strings-fmf true)
+(declare-fun str7 () String)
+(declare-fun str8 () String)
+(assert (str.in_re str8 (re.++ re.allchar re.allchar (str.to_re str7))))
+(check-sat)