diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-11-12 06:14:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 08:14:49 -0600 |
commit | ad340126a7adbb9840cca1d082c57b43995987a4 (patch) | |
tree | da06599c2691f063b770b2b1ba7e2ccf87f26cc6 /test/unit/theory/arith_poly_white.cpp | |
parent | 5cfbb67e228daf76835b7fd0a95d214859be030e (diff) |
Remove `ConstantMap<Rational>` (#7635)
This is in preparation of having two different kinds (CONST_RATIONAL
and CONST_INT) share the same payload. To do so, we cannot rely on
ConstantMap<Rational> anymore to map the payload type to a kind. This
commit extends support in the mkmetakind script to deal with such
payloads by adding a + suffix to the type. The commit also does some
minor refactoring of NodeManager::mkConst() and
NodeManager::mkConstInternal() to support setting the kind explicitly.
Finally, the commit addresses all instances where mkConst<Rational>()
is used, including the API.
Diffstat (limited to 'test/unit/theory/arith_poly_white.cpp')
-rw-r--r-- | test/unit/theory/arith_poly_white.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/theory/arith_poly_white.cpp b/test/unit/theory/arith_poly_white.cpp index 3e0bb6c17..9127fadff 100644 --- a/test/unit/theory/arith_poly_white.cpp +++ b/test/unit/theory/arith_poly_white.cpp @@ -40,9 +40,9 @@ class TestTheoryWhiteArithPolyNorm : public TestSmt TEST_F(TestTheoryWhiteArithPolyNorm, check_poly_norm_int) { TypeNode intType = d_nodeManager->integerType(); - Node zero = d_nodeManager->mkConst(Rational(0)); - Node one = d_nodeManager->mkConst(Rational(1)); - Node two = d_nodeManager->mkConst(Rational(2)); + Node zero = d_nodeManager->mkConst(CONST_RATIONAL, Rational(0)); + Node one = d_nodeManager->mkConst(CONST_RATIONAL, Rational(1)); + Node two = d_nodeManager->mkConst(CONST_RATIONAL, Rational(2)); Node x = d_nodeManager->mkVar("x", intType); Node y = d_nodeManager->mkVar("y", intType); Node z = d_nodeManager->mkVar("z", intType); @@ -101,10 +101,10 @@ TEST_F(TestTheoryWhiteArithPolyNorm, check_poly_norm_int) TEST_F(TestTheoryWhiteArithPolyNorm, check_poly_norm_real) { TypeNode realType = d_nodeManager->realType(); - Node zero = d_nodeManager->mkConst(Rational(0)); - Node one = d_nodeManager->mkConst(Rational(1)); - Node half = d_nodeManager->mkConst(Rational(1) / Rational(2)); - Node two = d_nodeManager->mkConst(Rational(2)); + Node zero = d_nodeManager->mkConst(CONST_RATIONAL, Rational(0)); + Node one = d_nodeManager->mkConst(CONST_RATIONAL, Rational(1)); + Node half = d_nodeManager->mkConst(CONST_RATIONAL, Rational(1) / Rational(2)); + Node two = d_nodeManager->mkConst(CONST_RATIONAL, Rational(2)); Node x = d_nodeManager->mkVar("x", realType); Node y = d_nodeManager->mkVar("y", realType); |