diff options
Diffstat (limited to 'src/smt/set_defaults.cpp')
-rw-r--r-- | src/smt/set_defaults.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/smt/set_defaults.cpp b/src/smt/set_defaults.cpp index b9095c91b..31d14c569 100644 --- a/src/smt/set_defaults.cpp +++ b/src/smt/set_defaults.cpp @@ -163,15 +163,6 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver) } } - /* Only BVSolver::LAZY natively supports int2bv and nat2bv, for other solvers - * we need to eagerly eliminate the operators. */ - if (options::bvSolver() == options::BVSolver::SIMPLE - || options::bvSolver() == options::BVSolver::BITBLAST) - { - opts.bv.bvLazyReduceExtf = false; - opts.bv.bvLazyRewriteExtf = false; - } - /* Disable bit-level propagation by default for the BITBLAST solver. */ if (options::bvSolver() == options::BVSolver::BITBLAST) { @@ -198,6 +189,8 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver) if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF) { + // do not rewrite bv2nat eagerly + opts.bv.bvLazyRewriteExtf = true; if (options::boolToBitvector() != options::BoolToBVMode::OFF) { throw OptionException( @@ -222,6 +215,14 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver) logic.lock(); } } + else if (options::bvSolver() == options::BVSolver::SIMPLE + || options::bvSolver() == options::BVSolver::BITBLAST) + { + // Only BVSolver::LAZY natively supports int2bv and nat2bv, for other + // solvers we need to eagerly eliminate the operators. Note this is only + // applied if we are not eliminating BV (e.g. with solveBVAsInt). + opts.bv.bvLazyReduceExtf = false; + } // set options about ackermannization if (options::ackermann() && options::produceModels() |