}
InferenceId inf =
polarity ? InferenceId::STRINGS_RE_UNFOLD_POS : InferenceId::STRINGS_RE_UNFOLD_NEG;
- d_im.sendInference(iexp, noExplain, conc, inf);
- addedLemma = true;
- processed.push_back(assertion);
- if (e == 0)
+ // in very rare cases, we may find out that the unfolding lemma
+ // for a membership is equivalent to true, in spite of the RE
+ // not being rewritten to true.
+ if (d_im.sendInference(iexp, noExplain, conc, inf))
{
- // Remember that we have unfolded a membership for x
- // notice that we only do this here, after we have definitely
- // added a lemma.
- repUnfold.insert(rep);
+ addedLemma = true;
+ if (e == 0)
+ {
+ // Remember that we have unfolded a membership for x
+ // notice that we only do this here, after we have definitely
+ // added a lemma.
+ repUnfold.insert(rep);
+ }
}
+ processed.push_back(assertion);
}
else
{
regress0/strings/issue5771-eager-pp.smt2
regress0/strings/issue5816-re-kind.smt2
regress0/strings/issue5915-repl-ctn-rewrite.smt2
+ regress0/strings/issue6203-3-unfold-trivial-true.smt2
regress0/strings/itos-entail.smt2
regress0/strings/large-model.smt2
regress0/strings/leadingzero001.smt2
--- /dev/null
+; COMMAND-LINE: --strings-exp
+; EXPECT: sat
+(set-logic ALL)
+(declare-fun s () String)
+(assert (str.in_re s (re.* (re.union (str.to_re "A") (str.to_re s)))))
+(assert (not (str.in_re s (re.* (re.opt (re.comp (str.to_re "A")))))))
+(check-sat)