Leads to potential non-idempotent behavior in the rewriter.
The issue cannot be replicated on master, but this safe guards this case anyways.
Fixes #5278.
return ret;
}
-Node QuantifiersRewriter::computeExtendedRewrite(Node q)
+Node QuantifiersRewriter::computeExtendedRewrite(Node q, const QAttributes& qa)
{
+ // do not apply to recursive functions
+ if (qa.isFunDef())
+ {
+ return q;
+ }
Node body = q[1];
// apply extended rewriter
Node bodyr = Rewriter::callExtendedRewrite(body);
}
else if (computeOption == COMPUTE_EXT_REWRITE)
{
- return computeExtendedRewrite(f);
+ return computeExtendedRewrite(f, qa);
}
else if (computeOption == COMPUTE_PROCESS_TERMS)
{
/** compute extended rewrite
*
* This returns the result of applying the extended rewriter on the body
- * of quantified formula q.
+ * of quantified formula q with attributes qa.
*/
- static Node computeExtendedRewrite(Node q);
+ static Node computeExtendedRewrite(Node q, const QAttributes& qa);
//------------------------------------- end extended rewrite
/**
* Return true if we should do operation computeOption on quantified formula
regress1/quantifiers/issue4813-qe-quant.smt2
regress1/quantifiers/issue4849-nqe.smt2
regress1/quantifiers/issue5019-cegqi-i.smt2
+ regress1/quantifiers/issue5278-ext-rewrite-rec.smt2
regress1/quantifiers/issue5279-nqe.smt2
regress1/quantifiers/issue5288-vts-real-int.smt2
regress1/quantifiers/issue5365-nqe.smt2
--- /dev/null
+; COMMAND-LINE: --fmf-fun --ext-rewrite-quant -q
+; EXPECT: sat
+(set-logic ALL)
+(set-info :status sat)
+(declare-datatypes ((a 0)) (((b) (c))))
+(define-funs-rec ((d ((x a)) Bool)) ((is-b x)))
+(check-sat)