new std::set<Node>(proofRecipe->getStep(0)->getAssertions()));
}
});
+ // cache of nodes we have already explained by some theory
+ std::unordered_set<Node, NodeHashFunction> cache;
while (i < explanationVector.size()) {
// Get the current literal to explain
continue;
}
}
-
+ // We must cache after checking the timestamp in the block of code above.
+ // Afterwards, we can ignore this timestamp, as well as caching the Node,
+ // since any theory's explanation will suffice.
+ if (cache.find(toExplain.d_node) != cache.end())
+ {
+ ++i;
+ continue;
+ }
+ cache.insert(toExplain.d_node);
// It was produced by the theory, so ask for an explanation
Node explanation;
if (toExplain.d_theory == THEORY_BUILTIN)