Previously, we could introduce multiple purifications for the same sin term.
case SkolemFunId::INT_DIV_BY_ZERO: return "INT_DIV_BY_ZERO";
case SkolemFunId::MOD_BY_ZERO: return "MOD_BY_ZERO";
case SkolemFunId::SQRT: return "SQRT";
+ case SkolemFunId::TRANSCENDENTAL_PURIFY_ARG:
+ return "TRANSCENDENTAL_PURIFY_ARG";
case SkolemFunId::SELECTOR_WRONG: return "SELECTOR_WRONG";
case SkolemFunId::SHARED_SELECTOR: return "SHARED_SELECTOR";
case SkolemFunId::SEQ_NTH_OOB: return "SEQ_NTH_OOB";
MOD_BY_ZERO,
/** an uninterpreted function f s.t. f(x) = sqrt(x) */
SQRT,
+ /**
+ * Argument used to purify trancendental function app f(x).
+ * For sin(x), this is a variable that is assumed to be in phase with x that
+ * is between -pi and pi
+ */
+ TRANSCENDENTAL_PURIFY_ARG,
/** a wrongly applied selector */
SELECTOR_WRONG,
/** a shared selector */
Assert(d_tstate.d_trMaster.find(a) == d_tstate.d_trMaster.end());
Kind k = a.getKind();
Assert(k == Kind::SINE || k == Kind::EXPONENTIAL);
- Node y = sm->mkDummySkolem(
- "y", nm->realType(), "phase shifted trigonometric arg");
+ Node y = sm->mkSkolemFunction(
+ SkolemFunId::TRANSCENDENTAL_PURIFY_ARG, nm->realType(), a);
Node new_a = nm->mkNode(k, y);
d_tstate.d_trSlaves[new_a].insert(new_a);
d_tstate.d_trSlaves[new_a].insert(a);