namespace CVC4 {
namespace smt {
-void setDefaults(SmtEngine& smte, LogicInfo& logic)
+void setDefaults(LogicInfo& logic, bool isInternalSubsolver)
{
// implied options
if (options::debugCheckModels())
}
Notice() << "SmtEngine: setting bit-blast mode to lazy to support model"
<< "generation" << std::endl;
- smte.setOption("bitblastMode", SExpr("lazy"));
+ options::bitblastMode.set(options::BitblastMode::LAZY);
}
else if (!options::incrementalSolving())
{
}
// sygus inference may require datatypes
- if (!smte.isInternalSubsolver())
+ if (!isInternalSubsolver)
{
if (options::produceAbducts()
|| options::produceInterpols() != options::ProduceInterpols::NONE
{
Notice() << "SmtEngine: turning on produce-assertions to support "
<< "option requiring assertions." << std::endl;
- smte.setOption("produce-assertions", SExpr("true"));
+ options::produceAssertions.set(true);
}
// Disable options incompatible with incremental solving, unsat cores, and
}
}
-
if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF)
{
/**
Notice() << "SmtEngine: turning off pseudoboolean rewrites to support "
"unsat cores/proofs"
<< std::endl;
- smte.setOption("pb-rewrites", false);
+ options::pbRewrites.set(false);
}
if (options::sortInference())
Notice() << "SmtEngine: turning off bool-to-bv to support unsat "
"cores/proofs"
<< std::endl;
- smte.setOption("boolToBitvector", SExpr("off"));
+ options::boolToBitvector.set(options::BoolToBVMode::OFF);
}
if (options::bvIntroducePow2())
Notice() << "SmtEngine: turning off bv-intro-pow2 to support "
"unsat-cores/proofs"
<< std::endl;
- smte.setOption("bv-intro-pow2", false);
+ options::bvIntroducePow2.set(false);
}
if (options::repeatSimp())
Notice() << "SmtEngine: turning off repeat-simp to support unsat "
"cores/proofs"
<< std::endl;
- smte.setOption("repeat-simp", false);
+ options::repeatSimp.set(false);
}
if (options::globalNegate())
Notice() << "SmtEngine: turning off global-negate to support unsat "
"cores/proofs"
<< std::endl;
- smte.setOption("global-negate", false);
+ options::globalNegate.set(false);
}
if (options::bitvectorAig())
}
Notice() << "SmtEngine: turning off bool-to-bitvector to support CBQI BV"
<< std::endl;
- smte.setOption("boolToBitvector", SExpr("off"));
+ options::boolToBitvector.set(options::BoolToBVMode::OFF);
}
}
|| is_sygus))
{
Notice() << "SmtEngine: turning on produce-models" << std::endl;
- smte.setOption("produce-models", SExpr("true"));
+ options::produceModels.set(true);
}
/////////////////////////////////////////////////////////////////////////////
}
Notice() << "SmtEngine: turning off bool-to-bv for non-bv logic: "
<< logic.getLogicString() << std::endl;
- smte.setOption("boolToBitvector", SExpr("off"));
+ options::boolToBitvector.set(options::BoolToBVMode::OFF);
}
if (!options::bvEagerExplanations.wasSetByUser()
<< "SmtEngine: turning off incremental solving mode (not yet "
"supported with --proof, try --tear-down-incremental instead)"
<< std::endl;
- smte.setOption("incremental", SExpr("false"));
+ options::incrementalSolving.set(false);
}
if (logic > LogicInfo("QF_AUFBVLRA"))
{
}
Notice() << "SmtEngine: turning off produce-models to support "
<< sOptNoModel << std::endl;
- smte.setOption("produce-models", SExpr("false"));
+ options::produceModels.set(false);
}
if (options::produceAssignments())
{
}
Notice() << "SmtEngine: turning off produce-assignments to support "
<< sOptNoModel << std::endl;
- smte.setOption("produce-assignments", SExpr("false"));
+ options::produceAssignments.set(false);
}
if (options::checkModels())
{
}
Notice() << "SmtEngine: turning off check-models to support "
<< sOptNoModel << std::endl;
- smte.setOption("check-models", SExpr("false"));
+ options::checkModels.set(false);
}
}
#ifndef CVC4__SMT__SET_DEFAULTS_H
#define CVC4__SMT__SET_DEFAULTS_H
-#include "smt/smt_engine.h"
#include "theory/logic_info.h"
namespace CVC4 {
/**
* The purpose of this method is to set the default options and update the logic
- * info for SMT engine smte.
+ * info for an SMT engine.
*
- * The argument logic is a reference to the logic of SmtEngine, which can be
+ * @param logic A reference to the logic of SmtEngine, which can be
* updated by this method based on the current options and the logic itself.
- *
- * Note that currently, options are associated with the ExprManager. Thus, this
- * call updates the options associated with the current ExprManager.
- * If this designed is updated in the future so that SmtEngine has its own
- * copy of options, this method should be updated accordingly so that it
- * is responsible for updating this copy.
+ * @param isInternalSubsolver Whether we are setting the options for an
+ * internal subsolver (see SmtEngine::isInternalSubsolver).
+ *
+ * NOTE: we currently modify the current options in scope. This method
+ * can be further refactored to modify an options object provided as an
+ * explicit argument.
*/
-void setDefaults(SmtEngine& smte, LogicInfo& logic);
+void setDefaults(LogicInfo& logic, bool isInternalSubsolver);
} // namespace smt
} // namespace CVC4