bool InferenceManager::assertInference(TNode atom,
bool polarity,
+ InferenceId id,
TNode reason,
- PfRule id)
+ PfRule pfr)
{
Trace("arrays-infer") << "TheoryArrays::assertInference: "
<< (polarity ? Node(atom) : atom.notNode()) << " by "
std::vector<Node> children;
std::vector<Node> args;
// convert to proof rule application
- convert(id, fact, reason, children, args);
- return assertInternalFact(atom, polarity, InferenceId::UNKNOWN, id, children, args);
+ convert(pfr, fact, reason, children, args);
+ return assertInternalFact(atom, polarity, id, pfr, children, args);
}
- return assertInternalFact(atom, polarity, InferenceId::UNKNOWN, reason);
+ return assertInternalFact(atom, polarity, id, reason);
}
bool InferenceManager::arrayLemma(
- Node conc, Node exp, PfRule id, LemmaProperty p, bool doCache)
+ Node conc, InferenceId id, Node exp, PfRule pfr, LemmaProperty p, bool doCache)
{
Trace("arrays-infer") << "TheoryArrays::arrayLemma: " << conc << " by " << exp
<< "; " << id << std::endl;
std::vector<Node> children;
std::vector<Node> args;
// convert to proof rule application
- convert(id, conc, exp, children, args);
+ convert(pfr, conc, exp, children, args);
// make the trusted lemma based on the eager proof generator and send
- TrustNode tlem = d_lemmaPg->mkTrustNode(conc, id, children, args);
- return trustedLemma(tlem, InferenceId::UNKNOWN, p, doCache);
+ TrustNode tlem = d_lemmaPg->mkTrustNode(conc, pfr, children, args);
+ return trustedLemma(tlem, id, p, doCache);
}
// send lemma without proofs
Node lem = nm->mkNode(IMPLIES, exp, conc);
- return lemma(lem, InferenceId::UNKNOWN, p, doCache);
+ return lemma(lem, id, p, doCache);
}
void InferenceManager::convert(PfRule& id,
preRegisterTermInternal(ni);
}
// Apply RIntro1 Rule
- d_im.assertInference(
- ni.eqNode(v), true, d_true, PfRule::ARRAYS_READ_OVER_WRITE_1);
+ d_im.assertInference(ni.eqNode(v),
+ true,
+ InferenceId::ARRAYS_READ_OVER_WRITE_1,
+ d_true,
+ PfRule::ARRAYS_READ_OVER_WRITE_1);
d_infoMap.addStore(node, node);
d_infoMap.addInStore(a, node);
Debug("pf::array") << "Asserting to the equality engine:" << std::endl
<< "\teq = " << eq << std::endl
<< "\treason = " << fact << std::endl;
- d_im.assertInference(eq, false, fact, PfRule::ARRAYS_EXT);
+ d_im.assertInference(eq, false, InferenceId::ARRAYS_EXT, fact, PfRule::ARRAYS_EXT);
++d_numProp;
}
// If this is the solution pass, generate the lemma. Otherwise, don't
// generate it - as this is the lemma that we're reproving...
Trace("arrays-lem") << "Arrays::addExtLemma " << lemma << "\n";
- d_im.arrayLemma(eq.notNode(), fact, PfRule::ARRAYS_EXT);
+ d_im.arrayLemma(eq.notNode(), InferenceId::ARRAYS_EXT, fact, PfRule::ARRAYS_EXT);
++d_numExt;
}
else
{
preRegisterTermInternal(selConst);
}
- d_im.assertInference(
- selConst.eqNode(defValue), true, d_true, PfRule::ARRAYS_TRUST);
+ d_im.assertInference(selConst.eqNode(defValue),
+ true,
+ InferenceId::UNKNOWN,
+ d_true,
+ PfRule::ARRAYS_TRUST);
}
const CTNodeList* stores = d_infoMap.getStores(a);
preRegisterTermInternal(bj);
}
d_im.assertInference(
- aj_eq_bj, true, reason, PfRule::ARRAYS_READ_OVER_WRITE);
+ aj_eq_bj, true, InferenceId::ARRAYS_READ_OVER_WRITE, reason, PfRule::ARRAYS_READ_OVER_WRITE);
++d_numProp;
return;
}
(aj.isConst() && bj.isConst()) ? d_true : aj.eqNode(bj).notNode();
Node j_eq_i = j.eqNode(i);
d_im.assertInference(
- j_eq_i, true, reason, PfRule::ARRAYS_READ_OVER_WRITE_CONTRA);
+ j_eq_i, true, InferenceId::ARRAYS_READ_OVER_WRITE_CONTRA, reason, PfRule::ARRAYS_READ_OVER_WRITE_CONTRA);
++d_numProp;
return;
}
preRegisterTermInternal(aj2);
}
d_im.assertInference(
- aj.eqNode(aj2), true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ aj.eqNode(aj2), true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
}
Node bj2 = Rewriter::rewrite(bj);
if (bj != bj2) {
preRegisterTermInternal(bj2);
}
d_im.assertInference(
- bj.eqNode(bj2), true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ bj.eqNode(bj2), true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
}
if (aj2 == bj2) {
return;
{
preRegisterTermInternal(bj2);
}
- d_im.assertInference(eq1, true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ d_im.assertInference(eq1, true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
return;
}
Node eq2 = i.eqNode(j);
Node eq2_r = Rewriter::rewrite(eq2);
if (eq2_r == d_true) {
- d_im.assertInference(eq2, true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ d_im.assertInference(eq2, true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
return;
}
d_RowAlreadyAdded.insert(lem);
// use non-rewritten nodes
d_im.arrayLemma(
- aj.eqNode(bj), eq2.notNode(), PfRule::ARRAYS_READ_OVER_WRITE);
+ aj.eqNode(bj), InferenceId::ARRAYS_READ_OVER_WRITE, eq2.notNode(), PfRule::ARRAYS_READ_OVER_WRITE);
++d_numRow;
}
else {
preRegisterTermInternal(aj2);
}
d_im.assertInference(
- aj.eqNode(aj2), true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ aj.eqNode(aj2), true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
}
Node bj2 = Rewriter::rewrite(bj);
if (bj != bj2) {
preRegisterTermInternal(bj2);
}
d_im.assertInference(
- bj.eqNode(bj2), true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ bj.eqNode(bj2), true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
}
if (aj2 == bj2) {
continue;
{
preRegisterTermInternal(bj2);
}
- d_im.assertInference(eq1, true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ d_im.assertInference(eq1, true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
continue;
}
Node eq2 = i.eqNode(j);
Node eq2_r = Rewriter::rewrite(eq2);
if (eq2_r == d_true) {
- d_im.assertInference(eq2, true, d_true, PfRule::MACRO_SR_PRED_INTRO);
+ d_im.assertInference(eq2, true, InferenceId::UNKNOWN, d_true, PfRule::MACRO_SR_PRED_INTRO);
continue;
}
d_RowAlreadyAdded.insert(l);
// use non-rewritten nodes, theory preprocessing will rewrite
d_im.arrayLemma(
- aj.eqNode(bj), eq2.notNode(), PfRule::ARRAYS_READ_OVER_WRITE);
+ aj.eqNode(bj), InferenceId::ARRAYS_READ_OVER_WRITE, eq2.notNode(), PfRule::ARRAYS_READ_OVER_WRITE);
++d_numRow;
lemmasAdded = true;
if (options::arraysReduceSharing()) {