}
Node skolem;
SkolemManager* sm = nm->getSkolemManager();
- if (options().arith.arithNoPartialFun)
+ if (usePartialFunction(id))
{
- // partial function: division, where we treat the skolem function as
- // a constant
- skolem = sm->mkSkolemFunction(id, tn);
+ // partial function: division
+ skolem = sm->mkSkolemFunction(id, nm->mkFunctionType(tn, tn));
}
else
{
- // partial function: division
- skolem = sm->mkSkolemFunction(id, nm->mkFunctionType(tn, tn));
+ // partial function: division, where we treat the skolem function as
+ // a constant
+ skolem = sm->mkSkolemFunction(id, tn);
}
// cache it
d_arithSkolem[id] = skolem;
Node OperatorElim::getArithSkolemApp(Node n, SkolemFunId id)
{
Node skolem = getArithSkolem(id);
- if (!options().arith.arithNoPartialFun)
+ if (usePartialFunction(id))
{
skolem = NodeManager::currentNM()->mkNode(APPLY_UF, skolem, n);
}
return skolem;
}
+bool OperatorElim::usePartialFunction(SkolemFunId id) const
+{
+ // always use partial function for sqrt
+ return !options().arith.arithNoPartialFun || id == SkolemFunId::SQRT;
+}
+
Node OperatorElim::mkWitnessTerm(Node v,
Node pred,
const std::string& prefix,
regress1/nl/issue5660-mb-success.smt2
regress1/nl/issue5662-nl-tc.smt2
regress1/nl/issue5662-nl-tc-min.smt2
+ regress1/nl/issue7924-sqrt-partial.smt2
regress1/nl/metitarski-1025.smt2
regress1/nl/metitarski-3-4.smt2
regress1/nl/metitarski_3_4_2e.smt2