if (opts.smt.solveIntAsBV > 0)
{
- // not compatible with incremental
- if (opts.base.incrementalSolving)
- {
- throw OptionException(
- "solving integers as bitvectors is currently not supported "
- "when solving incrementally.");
- }
// Int to BV currently always eliminates arithmetic completely (or otherwise
// fails). Thus, it is safe to eliminate arithmetic. Also, bit-vectors
// are required.
if (opts.smt.ackermann)
{
- if (opts.base.incrementalSolving)
- {
- throw OptionException(
- "Incremental Ackermannization is currently not supported.");
- }
-
- if (logic.isQuantified())
- {
- throw LogicException("Cannot use Ackermannization on quantified formula");
- }
-
if (logic.isTheoryEnabled(THEORY_UF))
{
logic = logic.getUnlockedCopy();
opts.smt.produceAssertions = true;
}
- if (opts.bv.bvAssertInput && opts.smt.produceProofs)
- {
- Notice() << "Disabling bv-assert-input since it is incompatible with proofs."
- << std::endl;
- opts.bv.bvAssertInput = false;
- }
-
- // If proofs are required and the user did not specify a specific BV solver,
- // we make sure to use the proof producing BITBLAST_INTERNAL solver.
- if (opts.smt.produceProofs
- && opts.bv.bvSolver != options::BVSolver::BITBLAST_INTERNAL
- && !opts.bv.bvSolverWasSetByUser
- && opts.bv.bvSatSolver == options::SatSolverMode::MINISAT)
- {
- Notice() << "Forcing internal bit-vector solver due to proof production."
- << std::endl;
- opts.bv.bvSolver = options::BVSolver::BITBLAST_INTERNAL;
- }
-
if (opts.smt.solveBVAsInt != options::SolveBVAsIntMode::OFF)
{
/**
// widen the logic
widenLogic(logic, opts);
+
+ // check if we have any options that are not supported with quantified logics
+ if (logic.isQuantified())
+ {
+ std::stringstream reasonNoQuant;
+ if (incompatibleWithQuantifiers(opts, reasonNoQuant))
+ {
+ std::stringstream ss;
+ ss << reasonNoQuant.str() << " not supported in quantified logics.";
+ throw OptionException(ss.str());
+ }
+ }
}
void SetDefaults::setDefaultsPost(const LogicInfo& logic, Options& opts) const
return false;
}
-bool SetDefaults::incompatibleWithProofs(const Options& opts,
+bool SetDefaults::incompatibleWithProofs(Options& opts,
std::ostream& reason) const
{
if (opts.quantifiers.globalNegate)
reason << "sygus";
return true;
}
+ // options that are automatically set to support proofs
+ if (opts.bv.bvAssertInput)
+ {
+ Notice()
+ << "Disabling bv-assert-input since it is incompatible with proofs."
+ << std::endl;
+ opts.bv.bvAssertInput = false;
+ }
+ // If proofs are required and the user did not specify a specific BV solver,
+ // we make sure to use the proof producing BITBLAST_INTERNAL solver.
+ if (opts.bv.bvSolver != options::BVSolver::BITBLAST_INTERNAL
+ && !opts.bv.bvSolverWasSetByUser
+ && opts.bv.bvSatSolver == options::SatSolverMode::MINISAT)
+ {
+ Notice() << "Forcing internal bit-vector solver due to proof production."
+ << std::endl;
+ opts.bv.bvSolver = options::BVSolver::BITBLAST_INTERNAL;
+ }
return false;
}
std::ostream& reason,
std::ostream& suggest) const
{
+ if (opts.smt.ackermann)
+ {
+ reason << "ackermann";
+ return true;
+ }
if (opts.smt.unconstrainedSimp)
{
if (opts.smt.unconstrainedSimpWasSetByUser)
<< std::endl;
opts.quantifiers.sygusInference = false;
}
+ if (opts.smt.solveIntAsBV > 0)
+ {
+ reason << "solveIntAsBV";
+ return true;
+ }
return false;
}
return opts.smt.unsatCoresMode == options::UnsatCoresMode::ASSUMPTIONS;
}
+bool SetDefaults::incompatibleWithQuantifiers(Options& opts,
+ std::ostream& reason) const
+{
+ if (opts.smt.ackermann)
+ {
+ reason << "ackermann";
+ return true;
+ }
+ if (opts.arith.nlRlvMode != options::NlRlvMode::NONE)
+ {
+ // Theory relevance is incompatible with CEGQI and SyQI, since there is no
+ // appropriate policy for the relevance of counterexample lemmas (when their
+ // guard is entailed to be false, the entire lemma is relevant, not just the
+ // guard). Hence, we throw an option exception if quantifiers are enabled.
+ reason << "--nl-ext-rlv";
+ return true;
+ }
+ return false;
+}
+
void SetDefaults::widenLogic(LogicInfo& logic, Options& opts) const
{
bool needsUf = false;
* Return true if proofs must be disabled. This is the case for any technique
* that answers "unsat" without showing a proof of unsatisfiabilty. The output
* stream reason is similar to above.
+ *
+ * Notice this method may modify the options to ensure that we are compatible
+ * with proofs.
*/
- bool incompatibleWithProofs(const Options& opts, std::ostream& reason) const;
+ bool incompatibleWithProofs(Options& opts, std::ostream& reason) const;
/**
* Check whether we should disable models. The output stream reason is similar
* to above.
* techniques that may interfere with producing correct unsat cores.
*/
bool safeUnsatCores(const Options& opts) const;
+ /**
+ * Check if incompatible with quantified formulas. Notice this method may
+ * modify the options to ensure that we are compatible with quantified logics.
+ * The output stream reason is similar to above.
+ */
+ bool incompatibleWithQuantifiers(Options& opts, std::ostream& reason) const;
//------------------------- options setting, prior finalization of logic
/**
* Set defaults pre, which sets all options prior to finalizing the logic.
regress1/sygus/issue3634.smt2
regress1/sygus/issue3635.smt2
regress1/sygus/issue3644.smt2
- regress1/sygus/issue3648.smt2
regress1/sygus/issue3649.sy
regress1/sygus/issue3802-default-consts.sy
regress1/sygus/issue3839-cond-rewrite.smt2
regress1/sygus/interpol_from_pono_3.smt2
regress1/sygus/interpol_dt.smt2
regress1/sygus/inv_gen_fig8.sy
+ # timeout since nl-rlv is required; however it cannot be used with quantifiers
+ regress1/sygus/issue3648.smt2
# new reconstruct algorithm is slow at reconstructing random constants (see wishue #82)
regress0/sygus/c100.sy
# For the six regressions below, solution terms require rewrites not in