diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-05-20 15:38:53 -0700 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2019-05-20 22:02:08 -0700 |
commit | bc30715c756112c0f47b4c1efc2fcb8e04aef936 (patch) | |
tree | e4dd836d1dd0ace8d76aed24e5238c2fc172569d | |
parent | 16ade2e20b6fd2afc49b8ea70d128ae665dff409 (diff) |
Change FlattenAssocCommut rewritechangeAssoc
-rw-r--r-- | src/theory/bv/theory_bv_rewrite_rules_normalization.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/theory/bv/theory_bv_rewrite_rules_normalization.h b/src/theory/bv/theory_bv_rewrite_rules_normalization.h index cada3d30c..a944efaa9 100644 --- a/src/theory/bv/theory_bv_rewrite_rules_normalization.h +++ b/src/theory/bv/theory_bv_rewrite_rules_normalization.h @@ -228,7 +228,7 @@ inline Node RewriteRule<FlattenAssocCommut>::apply(TNode node) std::vector<Node> children; Kind kind = node.getKind(); - while (!processingStack.empty()) + /*while (!processingStack.empty()) { TNode current = processingStack.back(); processingStack.pop_back(); @@ -245,7 +245,16 @@ inline Node RewriteRule<FlattenAssocCommut>::apply(TNode node) { children.push_back(current); } + }*/ + + for (const Node& n : node) { + if (n.getKind() == node.getKind()) { + children.insert(children.end(), n.begin(), n.end()); + } else { + children.push_back(n); + } } + if (node.getKind() == kind::BITVECTOR_PLUS || node.getKind() == kind::BITVECTOR_MULT) { |