diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2021-05-20 17:41:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 00:41:50 +0000 |
commit | 9670dd43576cd21de82e22e76c57e783aa143d21 (patch) | |
tree | 7a5157afa203bbe0a8755bdb0e178fb993d7e262 /src/preprocessing/passes | |
parent | 9e5f2385b73d55f675fa3996a2dd6df0e8d7652b (diff) |
BV: Rename BITVECTOR_PLUS to BITVECTOR_ADD. (#6589)
Diffstat (limited to 'src/preprocessing/passes')
-rw-r--r-- | src/preprocessing/passes/bv_gauss.cpp | 19 | ||||
-rw-r--r-- | src/preprocessing/passes/bv_to_int.cpp | 6 | ||||
-rw-r--r-- | src/preprocessing/passes/int_to_bv.cpp | 2 | ||||
-rw-r--r-- | src/preprocessing/passes/unconstrained_simplifier.cpp | 2 |
4 files changed, 14 insertions, 15 deletions
diff --git a/src/preprocessing/passes/bv_gauss.cpp b/src/preprocessing/passes/bv_gauss.cpp index f34ebd02e..b3c34087d 100644 --- a/src/preprocessing/passes/bv_gauss.cpp +++ b/src/preprocessing/passes/bv_gauss.cpp @@ -192,7 +192,7 @@ unsigned BVGauss::getMinBwExpr(Node expr) break; } - case kind::BITVECTOR_PLUS: + case kind::BITVECTOR_ADD: { Integer maxval = Integer(0); for (const Node& nn : n) @@ -490,7 +490,7 @@ BVGauss::Result BVGauss::gaussElimRewriteForUrem( /* Split into matrix columns */ Kind k = n.getKind(); - if (k == kind::BITVECTOR_PLUS) + if (k == kind::BITVECTOR_ADD) { for (const Node& nn : n) { stack.push_back(nn); } } @@ -668,16 +668,15 @@ BVGauss::Result BVGauss::gaussElimRewriteForUrem( } else { - Node tmp = stack.size() == 1 - ? stack[0] - : nm->mkNode(kind::BITVECTOR_PLUS, stack); + Node tmp = stack.size() == 1 ? stack[0] + : nm->mkNode(kind::BITVECTOR_ADD, stack); if (rhs[prow] != 0) { - tmp = nm->mkNode(kind::BITVECTOR_PLUS, - bv::utils::mkConst( - bv::utils::getSize(vvars[pcol]), rhs[prow]), - tmp); + tmp = nm->mkNode( + kind::BITVECTOR_ADD, + bv::utils::mkConst(bv::utils::getSize(vvars[pcol]), rhs[prow]), + tmp); } Assert(!is_bv_const(tmp)); res[vvars[pcol]] = nm->mkNode(kind::BITVECTOR_UREM, tmp, prime); @@ -730,7 +729,7 @@ PreprocessingPassResult BVGauss::applyInternal( continue; } - if (urem[0].getKind() == kind::BITVECTOR_PLUS && is_bv_const(urem[1])) + if (urem[0].getKind() == kind::BITVECTOR_ADD && is_bv_const(urem[1])) { equations[urem[1]].push_back(a); } diff --git a/src/preprocessing/passes/bv_to_int.cpp b/src/preprocessing/passes/bv_to_int.cpp index c725081c2..8b5d2417b 100644 --- a/src/preprocessing/passes/bv_to_int.cpp +++ b/src/preprocessing/passes/bv_to_int.cpp @@ -100,7 +100,7 @@ Node BVToInt::makeBinary(Node n) */ kind::Kind_t k = current.getKind(); if ((numChildren > 2) - && (k == kind::BITVECTOR_PLUS || k == kind::BITVECTOR_MULT + && (k == kind::BITVECTOR_ADD || k == kind::BITVECTOR_MULT || k == kind::BITVECTOR_AND || k == kind::BITVECTOR_OR || k == kind::BITVECTOR_XOR || k == kind::BITVECTOR_CONCAT)) { @@ -159,7 +159,7 @@ Node BVToInt::eliminationPass(Node n) CVC5_UNUSED kind::Kind_t k = current.getKind(); uint64_t numChildren = current.getNumChildren(); Assert((numChildren == 2) - || !(k == kind::BITVECTOR_PLUS || k == kind::BITVECTOR_MULT + || !(k == kind::BITVECTOR_ADD || k == kind::BITVECTOR_MULT || k == kind::BITVECTOR_AND || k == kind::BITVECTOR_OR || k == kind::BITVECTOR_XOR || k == kind::BITVECTOR_CONCAT)); toVisit.pop_back(); @@ -347,7 +347,7 @@ Node BVToInt::translateWithChildren(Node original, Node returnNode; switch (oldKind) { - case kind::BITVECTOR_PLUS: + case kind::BITVECTOR_ADD: { Assert(originalNumChildren == 2); uint64_t bvsize = original[0].getType().getBitVectorSize(); diff --git a/src/preprocessing/passes/int_to_bv.cpp b/src/preprocessing/passes/int_to_bv.cpp index 2f9fd28e6..779e0a931 100644 --- a/src/preprocessing/passes/int_to_bv.cpp +++ b/src/preprocessing/passes/int_to_bv.cpp @@ -140,7 +140,7 @@ Node intToBV(TNode n, NodeMap& cache) { case kind::PLUS: Assert(children.size() == 2); - newKind = kind::BITVECTOR_PLUS; + newKind = kind::BITVECTOR_ADD; max = max + 1; break; case kind::MULT: diff --git a/src/preprocessing/passes/unconstrained_simplifier.cpp b/src/preprocessing/passes/unconstrained_simplifier.cpp index 0d4804310..54115bb54 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.cpp +++ b/src/preprocessing/passes/unconstrained_simplifier.cpp @@ -454,7 +454,7 @@ void UnconstrainedSimplifier::processUnconstrained() case kind::XOR: case kind::BITVECTOR_XOR: case kind::BITVECTOR_XNOR: - case kind::BITVECTOR_PLUS: + case kind::BITVECTOR_ADD: case kind::BITVECTOR_SUB: checkParent = true; break; // Multiplication/division: must be non-integer and other operand must |