summaryrefslogtreecommitdiff
path: root/src/preprocessing/passes/bool_to_bv.cpp
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2019-12-17 13:43:44 -0800
committerGitHub <noreply@github.com>2019-12-17 13:43:44 -0800
commite9499c41f405df8b42fd9ae10004b1b91a869106 (patch)
treefa1475f43a3e61b8f6ffdcb903b65919eba28661 /src/preprocessing/passes/bool_to_bv.cpp
parent9b2914ed9f7b14ecf535ffe9e1328d0fa042e072 (diff)
Generate code for options with modes. (#3561)
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
Diffstat (limited to 'src/preprocessing/passes/bool_to_bv.cpp')
-rw-r--r--src/preprocessing/passes/bool_to_bv.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/preprocessing/passes/bool_to_bv.cpp b/src/preprocessing/passes/bool_to_bv.cpp
index 520e9f2a7..7787d7631 100644
--- a/src/preprocessing/passes/bool_to_bv.cpp
+++ b/src/preprocessing/passes/bool_to_bv.cpp
@@ -72,7 +72,7 @@ bool BoolToBV::needToRebuild(TNode n) const
Node BoolToBV::lowerAssertion(const TNode& a)
{
- bool optionITE = options::boolToBitvector() == BOOL_TO_BV_ITE;
+ bool optionITE = options::boolToBitvector() == options::BoolToBVMode::ITE;
NodeManager* nm = NodeManager::currentNM();
std::vector<TNode> visit;
visit.push_back(a);
@@ -166,7 +166,7 @@ void BoolToBV::lowerNode(const TNode& n)
if (!all_bv || (n.getNumChildren() == 0))
{
- if ((options::boolToBitvector() == BOOL_TO_BV_ALL)
+ if ((options::boolToBitvector() == options::BoolToBVMode::ALL)
&& n.getType().isBoolean())
{
if (k == kind::CONST_BOOLEAN)
@@ -222,7 +222,8 @@ void BoolToBV::lowerNode(const TNode& n)
}
NodeBuilder<> builder(new_kind);
- if ((options::boolToBitvector() == BOOL_TO_BV_ALL) && (new_kind != k))
+ if ((options::boolToBitvector() == options::BoolToBVMode::ALL)
+ && (new_kind != k))
{
++(d_statistics.d_numTermsLowered);
}
@@ -259,7 +260,7 @@ BoolToBV::Statistics::Statistics()
"preprocessing::passes::BoolToBV::NumTermsForcedLowered", 0)
{
smtStatisticsRegistry()->registerStat(&d_numIteToBvite);
- if (options::boolToBitvector() == BOOL_TO_BV_ALL)
+ if (options::boolToBitvector() == options::BoolToBVMode::ALL)
{
// these statistics wouldn't be correct in the ITE mode,
// because it might discard rebuilt nodes if it fails to
@@ -272,7 +273,7 @@ BoolToBV::Statistics::Statistics()
BoolToBV::Statistics::~Statistics()
{
smtStatisticsRegistry()->unregisterStat(&d_numIteToBvite);
- if (options::boolToBitvector() == BOOL_TO_BV_ALL)
+ if (options::boolToBitvector() == options::BoolToBVMode::ALL)
{
smtStatisticsRegistry()->unregisterStat(&d_numTermsLowered);
smtStatisticsRegistry()->unregisterStat(&d_numTermsForcedLowered);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback