In bv-to-int, we first binarize the applications of associative-commutative operators (like bvadd etc.).
With this PR, we first check whether we already binarized a node, and only if we didn't, we perform binarization.
*/
Node BVToInt::makeBinary(Node n)
{
- for (TNode current : NodeDfsIterable(n, VisitOrder::POSTORDER))
+ for (TNode current : NodeDfsIterable(n,
+ VisitOrder::POSTORDER,
+ // skip visited nodes
+ [this](TNode tn) {
+ return d_binarizeCache.find(tn)
+ != d_binarizeCache.end();
+ }))
{
uint64_t numChildren = current.getNumChildren();
/*