{
Trace("arith::infman") << "Add " << lemma->d_inference << " " << lemma->d_node
<< (isWaiting ? " as waiting" : "") << std::endl;
- lemma->d_node = Rewriter::rewrite(lemma->d_node);
if (hasCachedLemma(lemma->d_node, lemma->d_property))
{
return;
bool InferenceManager::hasCachedLemma(TNode lem, LemmaProperty p)
{
+ Node rewritten = Rewriter::rewrite(lem);
if (isLemmaPropertyPreprocess(p))
{
- return d_lemmasPp.find(lem) != d_lemmasPp.end();
+ return d_lemmasPp.find(rewritten) != d_lemmasPp.end();
}
- return TheoryInferenceManager::hasCachedLemma(lem, p);
+ return TheoryInferenceManager::hasCachedLemma(rewritten, p);
}
bool InferenceManager::cacheLemma(TNode lem, LemmaProperty p)
{
+ Node rewritten = Rewriter::rewrite(lem);
if (isLemmaPropertyPreprocess(p))
{
- if (d_lemmasPp.find(lem) != d_lemmasPp.end())
+ if (d_lemmasPp.find(rewritten) != d_lemmasPp.end())
{
return false;
}
- d_lemmasPp.insert(lem);
+ d_lemmasPp.insert(rewritten);
return true;
}
- return TheoryInferenceManager::cacheLemma(lem, p);
+ return TheoryInferenceManager::cacheLemma(rewritten, p);
}
bool InferenceManager::isEntailedFalse(const ArithLemma& lem)
bool TheoryInferenceManager::hasCachedLemma(TNode lem, LemmaProperty p)
{
- return d_lemmasSent.find(lem) != d_lemmasSent.end();
+ Node rewritten = Rewriter::rewrite(lem);
+ return d_lemmasSent.find(rewritten) != d_lemmasSent.end();
}
uint32_t TheoryInferenceManager::numSentLemmas() const
bool TheoryInferenceManager::cacheLemma(TNode lem, LemmaProperty p)
{
- if (d_lemmasSent.find(lem) != d_lemmasSent.end())
+ Node rewritten = Rewriter::rewrite(lem);
+ if (d_lemmasSent.find(rewritten) != d_lemmasSent.end())
{
return false;
}
- d_lemmasSent.insert(lem);
+ d_lemmasSent.insert(rewritten);
return true;
}