{
if (opts.smt.unsatCoresModeWasSetByUser)
{
- verbose(1)
- << "Overriding OFF unsat-core mode since cores were requested.\n";
+ notifyModifyOption(
+ "unsatCoresMode", "assumptions", "enabling unsat cores");
}
opts.smt.unsatCoresMode = options::UnsatCoresMode::ASSUMPTIONS;
}
{
if (opts.smt.unsatCoresModeWasSetByUser)
{
- verbose(1) << "Forcing full-proof mode for unsat cores mode since proofs "
- "were requested.\n";
+ notifyModifyOption("unsatCoresMode", "full-proof", "enabling proofs");
}
// enable unsat cores, because they are available as a consequence of proofs
opts.smt.unsatCores = true;
{
if (opts.smt.produceProofsWasSetByUser)
{
- verbose(1)
- << "Forcing proof production since new unsat cores were requested.\n";
+ notifyModifyOption("produceProofs", "true", "enabling unsat cores");
}
opts.smt.produceProofs = true;
}
{
opts.smt.unsatCores = false;
opts.smt.unsatCoresMode = options::UnsatCoresMode::OFF;
- verbose(1) << "SolverEngine: turning off produce-proofs due to "
- << reasonNoProofs.str() << "." << std::endl;
+ notifyModifyOption(
+ "produceProofs and unsatCores", "false", reasonNoProofs.str());
opts.smt.produceProofs = false;
opts.smt.checkProofs = false;
}
"for the combination of bit-vectors with arrays or uinterpreted "
"functions. Try --bitblast=lazy"));
}
- verbose(1)
- << "SolverEngine: setting bit-blast mode to lazy to support model"
- << "generation" << std::endl;
+ notifyModifyOption("bitblastMode", "lazy", "model generation");
opts.bv.bitblastMode = options::BitblastMode::LAZY;
}
else if (!opts.base.incrementalSolving)
throw OptionException(std::string(
"Ackermannization currently does not support model generation."));
}
- verbose(1) << "SolverEngine: turn off ackermannization to support model"
- << "generation" << std::endl;
+ notifyModifyOption("ackermann", "false", "model generation");
opts.smt.ackermann = false;
}
reason << "unconstrained simplification";
return true;
}
- verbose(1) << "SolverEngine: turning off unconstrained simplification to "
- "support incremental solving"
- << std::endl;
+ notifyModifyOption("unconstrainedSimp", "false", "incremental solving");
opts.smt.unconstrainedSimp = false;
}
if (opts.bv.bitblastMode == options::BitblastMode::EAGER
reason << "sygus inference";
return true;
}
- verbose(1) << "SolverEngine: turning off sygus inference to support "
- "incremental solving"
- << std::endl;
+ notifyModifyOption("sygusInference", "false", "incremental solving");
opts.quantifiers.sygusInference = false;
}
if (opts.quantifiers.sygusInst)
reason << "sygus inst";
return true;
}
- verbose(1) << "SolverEngine: turning off sygus inst to support "
- "incremental solving"
- << std::endl;
+ notifyModifyOption("sygusInst", "false", "incremental solving");
opts.quantifiers.sygusInst = false;
}
if (opts.smt.solveIntAsBV > 0)
}
// disable modes not supported by incremental
+ notifyModifyOption("sortInference", "false", "incremental solving");
opts.smt.sortInference = false;
opts.uf.ufssFairnessMonotone = false;
+ notifyModifyOption("globalNegate", "false", "incremental solving");
opts.quantifiers.globalNegate = false;
+ notifyModifyOption("cegqiNestedQE", "false", "incremental solving");
opts.quantifiers.cegqiNestedQE = false;
opts.arith.arithMLTrick = false;
reason << "simplification";
return true;
}
- verbose(1) << "SolverEngine: turning off simplification to support unsat "
- "cores"
- << std::endl;
+ notifyModifyOption("simplificationMode", "none", "unsat cores");
opts.smt.simplificationMode = options::SimplificationMode::NONE;
}
reason << "learned rewrites";
return true;
}
- verbose(1) << "SolverEngine: turning off learned rewrites to support "
- "unsat cores\n";
+ notifyModifyOption("learnedRewrite", "false", "unsat cores");
opts.smt.learnedRewrite = false;
}
reason << "pseudoboolean rewrites";
return true;
}
- verbose(1) << "SolverEngine: turning off pseudoboolean rewrites to support "
- "unsat cores\n";
+ notifyModifyOption("pbRewrites", "false", "unsat cores");
opts.arith.pbRewrites = false;
}
reason << "sort inference";
return true;
}
- verbose(1) << "SolverEngine: turning off sort inference to support unsat "
- "cores\n";
+ notifyModifyOption("sortInference", "false", "unsat cores");
opts.smt.sortInference = false;
}
reason << "pre-skolemization";
return true;
}
- verbose(1) << "SolverEngine: turning off pre-skolemization to support "
- "unsat cores\n";
+ notifyModifyOption("preSkolemQuant", "false", "unsat cores");
opts.quantifiers.preSkolemQuant = false;
}
reason << "bv-to-bool";
return true;
}
- verbose(1) << "SolverEngine: turning off bitvector-to-bool to support "
- "unsat cores\n";
+ notifyModifyOption("bitvectorToBool", "false", "unsat cores");
opts.bv.bitvectorToBool = false;
}
reason << "bool-to-bv != off";
return true;
}
- verbose(1)
- << "SolverEngine: turning off bool-to-bv to support unsat cores\n";
+ notifyModifyOption("boolToBitvector", "off", "unsat cores");
opts.bv.boolToBitvector = options::BoolToBVMode::OFF;
}
reason << "bv-intro-pow2";
return true;
}
- verbose(1)
- << "SolverEngine: turning off bv-intro-pow2 to support unsat cores";
+ notifyModifyOption("bvIntroducePow2", "false", "unsat cores");
opts.bv.bvIntroducePow2 = false;
}
reason << "repeat-simp";
return true;
}
- verbose(1)
- << "SolverEngine: turning off repeat-simp to support unsat cores\n";
+ notifyModifyOption("repeatSimp", "false", "unsat cores");
opts.smt.repeatSimp = false;
}
reason << "global-negate";
return true;
}
- verbose(1) << "SolverEngine: turning off global-negate to support unsat "
- "cores\n";
+ notifyModifyOption("globalNegate", "false", "unsat cores");
opts.quantifiers.globalNegate = false;
}
reason << "unconstrained simplification";
return true;
}
- verbose(1) << "SolverEngine: turning off unconstrained simplification to "
- "support unsat cores"
- << std::endl;
+ notifyModifyOption("unconstrainedSimp", "false", "unsat cores");
opts.smt.unconstrainedSimp = false;
}
return false;
// Allows to answer sat more often by default.
if (!opts.quantifiers.fmfBoundWasSetByUser)
{
+ notifyModifyOption("fmfBound", "true", "arrays-exp");
opts.quantifiers.fmfBound = true;
- Trace("smt") << "turning on fmf-bound, for arrays-exp" << std::endl;
}
}
if (logic.hasCardinalityConstraints())
{
if (!opts.quantifiers.sygus)
{
- Trace("smt") << "turning on sygus" << std::endl;
+ notifyModifyOption("sygus", "true", "");
+ opts.quantifiers.sygus = true;
}
- opts.quantifiers.sygus = true;
// must use Ferrante/Rackoff for real arithmetic
if (!opts.quantifiers.cegqiMidpointWasSetByUser)
{
<< std::endl;
}
+void SetDefaults::notifyModifyOption(const std::string& x,
+ const std::string& val,
+ const std::string& reason) const
+{
+ verbose(1) << "SetDefaults: setting " << x << " to " << val;
+ if (!reason.empty())
+ {
+ verbose(1) << " due to " << reason;
+ }
+ verbose(1) << std::endl;
+}
+
} // namespace smt
} // namespace cvc5