Fixes #5780.
Issue was caused by reintroducing skolems during preprocessing that were already solved for.
{
// Simplify the literal we learned wrt previous substitutions
Node learnedLiteral = learned_literals[i].getNode();
+ Trace("non-clausal-simplify")
+ << "Process learnedLiteral : " << learnedLiteral;
Assert(rewrite(learnedLiteral) == learnedLiteral);
- Assert(top_level_substs.apply(learnedLiteral) == learnedLiteral);
+ Assert(top_level_substs.apply(learnedLiteral) == learnedLiteral)
+ << learnedLiteral << " after subs is "
+ << top_level_substs.apply(learnedLiteral);
// process the learned literal with substitutions and const propagations
learnedLiteral = processLearnedLit(
learnedLiteral, newSubstitutions.get(), constantPropagations.get());
if (!options().strings.stringLazyPreproc)
{
applyPass("strings-eager-pp", as);
+ // needed since strings eager preprocessing may reintroduce skolems that
+ // were already solved for in incremental mode
+ applyPass("apply-substs", as);
}
if (options().smt.sortInference || options().uf.ufssFairnessMonotone)
{
regress1/strings/issue5610-2-infer-proxy.smt2
regress1/strings/issue5611-deq-norm-emp.smt2
regress1/strings/issue5692-infer-proxy.smt2
+ regress1/strings/issue5780-repeat-skolem.smt2
regress1/strings/issue5940-skc-len-conc.smt2
regress1/strings/issue5940-2-skc-len-conc.smt2
regress1/strings/issue6057-replace-re.smt2
--- /dev/null
+; COMMAND-LINE: -i
+; EXPECT: sat
+(set-logic ALL)
+(set-option :strings-lazy-pp false)
+(set-info :status sat)
+(declare-fun s () String)
+(declare-fun t () String)
+(declare-fun r () String)
+(declare-fun u () String)
+(assert (= u (str.replace_re (str.++ t s) re.none r)))
+(push)
+(assert (= t (str.replace_re (str.++ t s) re.none r)))
+(push)
+(check-sat)