Explicitly disallow `mkConst(Rational)` (#7818)
authorAndres Noetzli <andres.noetzli@gmail.com>
Thu, 16 Dec 2021 14:29:10 +0000 (06:29 -0800)
committerGitHub <noreply@github.com>
Thu, 16 Dec 2021 14:29:10 +0000 (14:29 +0000)
commite53d797fa042a7c466ca838ea21abbd3890a39ba
tree3b9b587fb8d500784f635af4f532ec0c747ef098
parent4a7c0c73f69aabb20be4c79c47047ce23d3358b0
Explicitly disallow `mkConst(Rational)` (#7818)

The Rational payload can be associated with two kinds (CONST_INTEGER
and CONST_RATIONAL), so we should never call
NodeManager::mkConst(Rational), but instead use
NodeManager::mkConstInt() and NodeManager::mkConstReal(). Currently,
calling NodeManager::mkConst(Rational) silently creates an integer
constant, which is dangerous. This commit makes it a compile-time error
instead.
src/expr/CMakeLists.txt
src/expr/mkmetakind
src/expr/node_manager.h [deleted file]
src/expr/node_manager_template.cpp
src/expr/node_manager_template.h [new file with mode: 0644]
src/theory/arith/kinds
src/theory/strings/sequences_rewriter.cpp