From eddacee2d28846089e6dd356f72e6d39a371ec0f Mon Sep 17 00:00:00 2001 From: yoni206 Date: Fri, 20 Apr 2018 15:07:55 -0700 Subject: Enforcing --no-bv-eq, --no-bv-algebraic and --no-bv-ineq when proofs are enabled (#1801) Currently, if the user enables proofs but does not disable the algebraic/equality/inequality bv-solvers, then we reach an internal error while printing the proof (unreachable code becomes reachable). This commit auto-disable these bv options when proofs are enabled, unless these options were set by the user. In such a case, an error message is given to the user. --- src/theory/bv/theory_bv.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/theory/bv') diff --git a/src/theory/bv/theory_bv.cpp b/src/theory/bv/theory_bv.cpp index 47f2b9245..1b1e83ae3 100644 --- a/src/theory/bv/theory_bv.cpp +++ b/src/theory/bv/theory_bv.cpp @@ -74,25 +74,27 @@ TheoryBV::TheoryBV(context::Context* c, context::UserContext* u, setupExtTheory(); getExtTheory()->addFunctionKind(kind::BITVECTOR_TO_NAT); getExtTheory()->addFunctionKind(kind::INT_TO_BITVECTOR); - if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER) { d_eagerSolver = new EagerBitblastSolver(this); return; } - if (options::bitvectorEqualitySolver()) { + if (options::bitvectorEqualitySolver() && !options::proof()) + { SubtheorySolver* core_solver = new CoreSolver(c, this); d_subtheories.push_back(core_solver); d_subtheoryMap[SUB_CORE] = core_solver; } - if (options::bitvectorInequalitySolver()) { + if (options::bitvectorInequalitySolver() && !options::proof()) + { SubtheorySolver* ineq_solver = new InequalitySolver(c, u, this); d_subtheories.push_back(ineq_solver); d_subtheoryMap[SUB_INEQUALITY] = ineq_solver; } - if (options::bitvectorAlgebraicSolver()) { + if (options::bitvectorAlgebraicSolver() && !options::proof()) + { SubtheorySolver* alg_solver = new AlgebraicSolver(c, this); d_subtheories.push_back(alg_solver); d_subtheoryMap[SUB_ALGEBRAIC] = alg_solver; -- cgit v1.2.3