Node FactoringCheck::getFactorSkolem(Node n, CDProof* proof)
{
std::map<Node, Node>::iterator itf = d_factor_skolem.find(n);
+ Node k;
if (itf == d_factor_skolem.end())
{
NodeManager* nm = NodeManager::currentNM();
- Node k = nm->getSkolemManager()->mkPurifySkolem(n, "kf");
+ k = nm->getSkolemManager()->mkPurifySkolem(n, "kf");
Node k_eq = k.eqNode(n);
Trace("nl-ext-factor") << "...adding factor skolem " << k << " == " << n
<< std::endl;
- if (d_data->isProofEnabled())
- {
- proof->addStep(k_eq, PfRule::MACRO_SR_PRED_INTRO, {}, {k_eq});
- }
d_data->d_im.addPendingArithLemma(k_eq, InferenceId::NL_FACTOR, proof);
d_factor_skolem[n] = k;
- return k;
}
- return itf->second;
+ else
+ {
+ k = itf->second;
+ }
+ if (d_data->isProofEnabled())
+ {
+ Node k_eq = k.eqNode(n);
+ proof->addStep(k_eq, PfRule::MACRO_SR_PRED_INTRO, {}, {k_eq});
+ }
+ return k;
}
} // namespace nl
regress1/nl/sugar-ident-3.smt2
regress1/nl/sugar-ident.smt2
regress1/nl/tan-rewrite2.smt2
+ regress1/nl/ufnia-factor-open-proof.smt2
regress1/nl/zero-subset.smt2
regress1/non-fatal-errors.smt2
regress1/parsing_ringer.cvc
--- /dev/null
+(set-logic QF_UFNIA)
+(set-info :status unsat)
+(declare-fun pow2 (Int) Int)
+(define-fun intmax ((k Int)) Int (- (pow2 k) 1))
+(define-fun intmodtotal ((pow2 Int) (a Int) (b Int)) Int (mod a b))
+(define-fun intneg ((k Int) (a Int)) Int 1)
+(define-fun intmul ((k Int) (a Int) (b Int)) Int (mod (* a b) (pow2 k)))
+(declare-fun k () Int)
+(assert (> k 0))
+(assert (= 1 (pow2 1)))
+(declare-fun %x () Int)
+(assert (> %x 0))
+(assert (not (= (intmul k %x (intmax k)) (mod (- (pow2 k) %x) (pow2 k)))))
+(check-sat)