This PR removes the remaining usages of the Notice() macros and uses verbose() instead.
DebugC DebugChannel(&std::cout);
WarningC WarningChannel(&std::cerr);
MessageC MessageChannel(&std::cout);
-NoticeC NoticeChannel(&null_os);
TraceC TraceChannel(&std::cout);
std::ostream DumpOutC::dump_cout(std::cout.rdbuf()); // copy cout stream buffer
DumpOutC DumpOutChannel(&DumpOutC::dump_cout);
bool isOn() const { return d_os != &null_os; }
}; /* class MessageC */
-/** The notice output class */
-class NoticeC
-{
- std::ostream* d_os;
-
-public:
- explicit NoticeC(std::ostream* os) : d_os(os) {}
-
- Cvc5ostream operator()() const { return Cvc5ostream(d_os); }
-
- std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; }
- std::ostream& getStream() const { return *d_os; }
- std::ostream* getStreamPointer() const { return d_os; }
-
- bool isOn() const { return d_os != &null_os; }
-}; /* class NoticeC */
-
/** The trace output class */
class TraceC
{
extern WarningC WarningChannel CVC5_EXPORT;
/** The message output singleton */
extern MessageC MessageChannel CVC5_EXPORT;
-/** The notice output singleton */
-extern NoticeC NoticeChannel CVC5_EXPORT;
/** The trace output singleton */
extern TraceC TraceChannel CVC5_EXPORT;
/** The dump output singleton */
::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::WarningChannel
#define CVC5Message \
::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::MessageChannel
-#define Notice \
- ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::NoticeChannel
#define Trace ::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::TraceChannel
#define DumpOut \
::cvc5::__cvc5_true() ? ::cvc5::nullStream : ::cvc5::DumpOutChannel
: ::cvc5::WarningChannel
#define CVC5Message \
(!::cvc5::MessageChannel.isOn()) ? ::cvc5::nullStream : ::cvc5::MessageChannel
-#define Notice \
- (!::cvc5::NoticeChannel.isOn()) ? ::cvc5::nullStream : ::cvc5::NoticeChannel
#ifdef CVC5_TRACING
#define Trace ::cvc5::TraceChannel
#else /* CVC5_TRACING */
if(Configuration::isMuzzledBuild()) {
DebugChannel.setStream(&cvc5::null_os);
TraceChannel.setStream(&cvc5::null_os);
- NoticeChannel.setStream(&cvc5::null_os);
MessageChannel.setStream(&cvc5::null_os);
WarningChannel.setStream(&cvc5::null_os);
}
{
ParserBuilder parserBuilder(solver, sm, true);
/* Create parser with bogus input. */
- d_parser = parserBuilder.build();
+ d_parser.reset(parserBuilder.build());
if (d_solver->getOptionInfo("force-logic").setByUser)
{
LogicInfo tmp(d_solver->getOption("force-logic"));
d_usingEditline = true;
int err = ::read_history(d_historyFilename.c_str());
::stifle_history(s_historyLimit);
- if(Notice.isOn()) {
+ if (d_solver->getOptionInfo("verbosity").intValue() >= 1)
+ {
if(err == 0) {
- Notice() << "Read " << ::history_length << " lines of history from "
- << d_historyFilename << std::endl;
+ d_solver->getDriverOptions().err()
+ << "Read " << ::history_length << " lines of history from "
+ << d_historyFilename << std::endl;
} else {
- Notice() << "Could not read history from " << d_historyFilename
- << ": " << strerror(err) << std::endl;
+ d_solver->getDriverOptions().err()
+ << "Could not read history from " << d_historyFilename << ": "
+ << strerror(err) << std::endl;
}
}
}
InteractiveShell::~InteractiveShell() {
#if HAVE_LIBEDITLINE
int err = ::write_history(d_historyFilename.c_str());
- if(err == 0) {
- Notice() << "Wrote " << ::history_length << " lines of history to "
- << d_historyFilename << std::endl;
- } else {
- Notice() << "Could not write history to " << d_historyFilename
- << ": " << strerror(err) << std::endl;
+ if (d_solver->getOptionInfo("verbosity").intValue() >= 1)
+ {
+ if (err == 0)
+ {
+ d_solver->getDriverOptions().err()
+ << "Wrote " << ::history_length << " lines of history to "
+ << d_historyFilename << std::endl;
+ } else {
+ d_solver->getDriverOptions().err()
+ << "Could not write history to " << d_historyFilename << ": "
+ << strerror(err) << std::endl;
+ }
}
#endif /* HAVE_LIBEDITLINE */
- delete d_parser;
}
Command* InteractiveShell::readCommand()
#define CVC5__INTERACTIVE_SHELL_H
#include <iosfwd>
+#include <memory>
#include <string>
namespace cvc5 {
/**
* Return the internal parser being used.
*/
- parser::Parser* getParser() { return d_parser; }
+ parser::Parser* getParser() { return d_parser.get(); }
private:
api::Solver* d_solver;
std::istream& d_in;
std::ostream& d_out;
- parser::Parser* d_parser;
+ std::unique_ptr<parser::Parser> d_parser;
bool d_quit;
bool d_usingEditline;
Debug.setStream(me);
Warning.setStream(me);
CVC5Message.setStream(me);
- Notice.setStream(me);
Trace.setStream(me);
}
if(Configuration::isMuzzledBuild()) {
DebugChannel.setStream(&cvc5::null_os);
TraceChannel.setStream(&cvc5::null_os);
- NoticeChannel.setStream(&cvc5::null_os);
MessageChannel.setStream(&cvc5::null_os);
WarningChannel.setStream(&cvc5::null_os);
} else {
- if(value < 1) {
- NoticeChannel.setStream(&cvc5::null_os);
- } else {
- NoticeChannel.setStream(&std::cout);
- }
if(value < 0) {
MessageChannel.setStream(&cvc5::null_os);
WarningChannel.setStream(&cvc5::null_os);
{
Debug.getStream() << Command::printsuccess(value);
Trace.getStream() << Command::printsuccess(value);
- Notice.getStream() << Command::printsuccess(value);
CVC5Message.getStream() << Command::printsuccess(value);
Warning.getStream() << Command::printsuccess(value);
*d_options->base.out << Command::printsuccess(value);
{
Debug.getStream() << expr::ExprSetDepth(depth);
Trace.getStream() << expr::ExprSetDepth(depth);
- Notice.getStream() << expr::ExprSetDepth(depth);
CVC5Message.getStream() << expr::ExprSetDepth(depth);
Warning.getStream() << expr::ExprSetDepth(depth);
}
{
Debug.getStream() << expr::ExprDag(dag);
Trace.getStream() << expr::ExprDag(dag);
- Notice.getStream() << expr::ExprDag(dag);
CVC5Message.getStream() << expr::ExprDag(dag);
Warning.getStream() << expr::ExprDag(dag);
}
{
if (useTrustedChecker)
{
- Notice() << "ProofChecker::check: trusting PfRule " << id << std::endl;
+ out << "ProofChecker::check: trusting PfRule " << id << std::endl;
// trusted checker
return expected;
}
if (it != d_checker.end())
{
// checker is already provided
- Notice() << "ProofChecker::registerChecker: checker already exists for "
- << id << std::endl;
+ Trace("pfcheck")
+ << "ProofChecker::registerChecker: checker already exists for " << id
+ << std::endl;
return;
}
d_checker[id] = psc;
// overwrites if already there
if (d_plevel.find(id) != d_plevel.end())
{
- Notice() << "ProofChecker::registerTrustedRule: already provided pedantic "
- "level for "
- << id << std::endl;
+ Trace("proof-pedantic")
+ << "ProofChecker::registerTrustedRule: already provided pedantic "
+ "level for "
+ << id << std::endl;
}
d_plevel[id] = plevel;
}
{
if (acu.find(a) == acu.end())
{
- Notice() << "ProofNodeManager::mkScope: assumption " << a
- << " does not match a free assumption in proof" << std::endl;
+ Trace("pnm") << "ProofNodeManager::mkScope: assumption " << a
+ << " does not match a free assumption in proof"
+ << std::endl;
}
}
}
//// DPllMinisatSatSolver
-MinisatSatSolver::MinisatSatSolver(StatisticsRegistry& registry)
- : d_minisat(NULL), d_context(NULL), d_assumptions(), d_statistics(registry)
+MinisatSatSolver::MinisatSatSolver(Env& env, StatisticsRegistry& registry)
+ : EnvObj(env),
+ d_minisat(NULL),
+ d_context(NULL),
+ d_assumptions(),
+ d_statistics(registry)
{}
MinisatSatSolver::~MinisatSatSolver()
{
d_context = context;
- if (options::decisionMode() != options::DecisionMode::INTERNAL)
+ if (options().decision.decisionMode != options::DecisionMode::INTERNAL)
{
- Notice() << "minisat: Incremental solving is forced on (to avoid variable elimination)"
- << " unless using internal decision strategy." << std::endl;
+ verbose(1) << "minisat: Incremental solving is forced on (to avoid "
+ "variable elimination)"
+ << " unless using internal decision strategy." << std::endl;
}
// Create the solver
- d_minisat = new Minisat::SimpSolver(
- theoryProxy,
- d_context,
- userContext,
- pnm,
- options::incrementalSolving()
- || options::decisionMode() != options::DecisionMode::INTERNAL);
+ d_minisat =
+ new Minisat::SimpSolver(theoryProxy,
+ d_context,
+ userContext,
+ pnm,
+ options().base.incrementalSolving
+ || options().decision.decisionMode
+ != options::DecisionMode::INTERNAL);
d_statistics.init(d_minisat);
}
// Copy options from cvc5 options structure into minisat, as appropriate
// Set up the verbosity
- d_minisat->verbosity = (options::verbosity() > 0) ? 1 : -1;
+ d_minisat->verbosity = (options().base.verbosity > 0) ? 1 : -1;
// Set up the random decision parameters
- d_minisat->random_var_freq = options::satRandomFreq();
+ d_minisat->random_var_freq = options().prop.satRandomFreq;
// If 0, we use whatever we like (here, the Minisat default seed)
- if(options::satRandomSeed() != 0) {
- d_minisat->random_seed = double(options::satRandomSeed());
+ if (options().prop.satRandomSeed != 0)
+ {
+ d_minisat->random_seed = double(options().prop.satRandomSeed);
}
// Give access to all possible options in the sat solver
- d_minisat->var_decay = options::satVarDecay();
- d_minisat->clause_decay = options::satClauseDecay();
- d_minisat->restart_first = options::satRestartFirst();
- d_minisat->restart_inc = options::satRestartInc();
+ d_minisat->var_decay = options().prop.satVarDecay;
+ d_minisat->clause_decay = options().prop.satClauseDecay;
+ d_minisat->restart_first = options().prop.satRestartFirst;
+ d_minisat->restart_inc = options().prop.satRestartInc;
}
ClauseId MinisatSatSolver::addClause(SatClause& clause, bool removable) {
}
d_minisat->addClause(minisat_clause, removable, clause_id);
// FIXME: to be deleted when we kill old proof code for unsat cores
- Assert(!options::unsatCores() || options::produceProofs()
+ Assert(!options().smt.unsatCores || options().smt.produceProofs
|| clause_id != ClauseIdError);
return clause_id;
}
#pragma once
-#include "prop/sat_solver.h"
#include "prop/minisat/simp/SimpSolver.h"
+#include "prop/sat_solver.h"
+#include "smt/env_obj.h"
#include "util/statistics_registry.h"
namespace cvc5 {
namespace prop {
-class MinisatSatSolver : public CDCLTSatSolverInterface
+class MinisatSatSolver : public CDCLTSatSolverInterface, protected EnvObj
{
public:
- MinisatSatSolver(StatisticsRegistry& registry);
+ MinisatSatSolver(Env& env, StatisticsRegistry& registry);
~MinisatSatSolver() override;
static SatVariable toSatVariable(Minisat::Var var);
d_decisionEngine.reset(new decision::DecisionEngineEmpty(env));
}
- d_satSolver = SatSolverFactory::createCDCLTMinisat(smtStatisticsRegistry());
+ d_satSolver =
+ SatSolverFactory::createCDCLTMinisat(d_env, smtStatisticsRegistry());
// CNF stream and theory proxy required pointers to each other, make the
// theory proxy first
namespace prop {
MinisatSatSolver* SatSolverFactory::createCDCLTMinisat(
- StatisticsRegistry& registry)
+ Env& env, StatisticsRegistry& registry)
{
- return new MinisatSatSolver(registry);
+ return new MinisatSatSolver(env, registry);
}
SatSolver* SatSolverFactory::createCryptoMinisat(StatisticsRegistry& registry,
class SatSolverFactory
{
public:
- static MinisatSatSolver* createCDCLTMinisat(StatisticsRegistry& registry);
+ static MinisatSatSolver* createCDCLTMinisat(Env& env,
+ StatisticsRegistry& registry);
static SatSolver* createCryptoMinisat(StatisticsRegistry& registry,
const std::string& name = "");
const context::CDList<Node>& al,
bool hardFailure)
{
- // Throughout, we use Notice() to give diagnostic output.
+ // Throughout, we use verbose(1) to give diagnostic output.
//
// If this function is running, the user gave --check-model (or equivalent),
- // and if Notice() is on, the user gave --verbose (or equivalent).
+ // and if verbose(1) is on, the user gave --verbose (or equivalent).
// check-model is not guaranteed to succeed if approximate values were used.
// Thus, we intentionally abort here.
namespace cvc5 {
namespace smt {
-SetDefaults::SetDefaults(bool isInternalSubsolver)
- : d_isInternalSubsolver(isInternalSubsolver)
+SetDefaults::SetDefaults(Env& env, bool isInternalSubsolver)
+ : EnvObj(env), d_isInternalSubsolver(isInternalSubsolver)
{
}
{
if (opts.smt.unsatCoresModeWasSetByUser)
{
- Notice()
+ verbose(1)
<< "Overriding OFF unsat-core mode since cores were requested.\n";
}
opts.smt.unsatCoresMode = options::UnsatCoresMode::ASSUMPTIONS;
{
if (opts.smt.unsatCoresModeWasSetByUser)
{
- Notice() << "Forcing full-proof mode for unsat cores mode since proofs "
- "were requested.\n";
+ verbose(1) << "Forcing full-proof mode for unsat cores mode since proofs "
+ "were requested.\n";
}
// enable unsat cores, because they are available as a consequence of proofs
opts.smt.unsatCores = true;
{
if (opts.smt.produceProofsWasSetByUser)
{
- Notice()
+ verbose(1)
<< "Forcing proof production since new unsat cores were requested.\n";
}
opts.smt.produceProofs = true;
{
opts.smt.unsatCores = false;
opts.smt.unsatCoresMode = options::UnsatCoresMode::OFF;
- Notice() << "SolverEngine: turning off produce-proofs due to "
- << reasonNoProofs.str() << "." << std::endl;
+ verbose(1) << "SolverEngine: turning off produce-proofs due to "
+ << reasonNoProofs.str() << "." << std::endl;
opts.smt.produceProofs = false;
opts.smt.checkProofs = false;
}
"for the combination of bit-vectors with arrays or uinterpreted "
"functions. Try --bitblast=lazy"));
}
- Notice()
+ verbose(1)
<< "SolverEngine: setting bit-blast mode to lazy to support model"
<< "generation" << std::endl;
opts.bv.bitblastMode = options::BitblastMode::LAZY;
throw OptionException(std::string(
"Ackermannization currently does not support model generation."));
}
- Notice() << "SolverEngine: turn off ackermannization to support model"
- << "generation" << std::endl;
+ verbose(1) << "SolverEngine: turn off ackermannization to support model"
+ << "generation" << std::endl;
opts.smt.ackermann = false;
}
|| opts.smt.produceProofs)
&& !opts.smt.produceAssertions)
{
- Notice() << "SolverEngine: turning on produce-assertions to support "
- << "option requiring assertions." << std::endl;
+ verbose(1) << "SolverEngine: turning on produce-assertions to support "
+ << "option requiring assertions." << std::endl;
opts.smt.produceAssertions = true;
}
"bool-to-bv != off not supported with CBQI BV for quantified "
"logics");
}
- Notice()
+ verbose(1)
<< "SolverEngine: turning off bool-to-bitvector to support CBQI BV"
<< std::endl;
opts.bv.boolToBitvector = options::BoolToBVMode::OFF;
&& (opts.smt.produceAssignments || opts.quantifiers.sygusRewSynthCheck
|| usesSygus(opts)))
{
- Notice() << "SolverEngine: turning on produce-models" << std::endl;
+ verbose(1) << "SolverEngine: turning on produce-models" << std::endl;
opts.smt.produceModels = true;
}
throw OptionException(
"bool-to-bv=all not supported for non-bitvector logics.");
}
- Notice() << "SolverEngine: turning off bool-to-bv for non-bv logic: "
- << logic.getLogicString() << std::endl;
+ verbose(1) << "SolverEngine: turning off bool-to-bv for non-bv logic: "
+ << logic.getLogicString() << std::endl;
opts.bv.boolToBitvector = options::BoolToBVMode::OFF;
}
ss << "Cannot use " << sOptNoModel << " with model generation.";
throw OptionException(ss.str());
}
- Notice() << "SolverEngine: turning off produce-models to support "
- << sOptNoModel << std::endl;
+ verbose(1) << "SolverEngine: turning off produce-models to support "
+ << sOptNoModel << std::endl;
opts.smt.produceModels = false;
}
if (opts.smt.produceAssignments)
<< " with model generation (produce-assignments).";
throw OptionException(ss.str());
}
- Notice() << "SolverEngine: turning off produce-assignments to support "
- << sOptNoModel << std::endl;
+ verbose(1) << "SolverEngine: turning off produce-assignments to support "
+ << sOptNoModel << std::endl;
opts.smt.produceAssignments = false;
}
if (opts.smt.checkModels)
<< " with model generation (check-models).";
throw OptionException(ss.str());
}
- Notice() << "SolverEngine: turning off check-models to support "
- << sOptNoModel << std::endl;
+ verbose(1) << "SolverEngine: turning off check-models to support "
+ << sOptNoModel << std::endl;
opts.smt.checkModels = false;
}
}
}
else
{
- Notice() << "Cannot use --nl-cad without configuring with --poly."
- << std::endl;
+ verbose(1) << "Cannot use --nl-cad without configuring with --poly."
+ << std::endl;
opts.arith.nlCad = false;
opts.arith.nlExt = options::NlExtMode::FULL;
}
// options that are automatically set to support proofs
if (opts.bv.bvAssertInput)
{
- Notice()
+ verbose(1)
<< "Disabling bv-assert-input since it is incompatible with proofs."
<< std::endl;
opts.bv.bvAssertInput = false;
if (opts.bv.bvSolver != options::BVSolver::BITBLAST_INTERNAL
&& !opts.bv.bvSolverWasSetByUser)
{
- Notice() << "Forcing internal bit-vector solver due to proof production."
- << std::endl;
+ verbose(1) << "Forcing internal bit-vector solver due to proof production."
+ << std::endl;
opts.bv.bvSolver = options::BVSolver::BITBLAST_INTERNAL;
}
return false;
reason << "unconstrained simplification";
return true;
}
- Notice() << "SolverEngine: turning off unconstrained simplification to "
- "support incremental solving"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off unconstrained simplification to "
+ "support incremental solving"
+ << std::endl;
opts.smt.unconstrainedSimp = false;
}
if (opts.bv.bitblastMode == options::BitblastMode::EAGER
reason << "sygus inference";
return true;
}
- Notice() << "SolverEngine: turning off sygus inference to support "
- "incremental solving"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off sygus inference to support "
+ "incremental solving"
+ << std::endl;
opts.quantifiers.sygusInference = false;
}
if (opts.quantifiers.sygusInst)
reason << "sygus inst";
return true;
}
- Notice() << "SolverEngine: turning off sygus inst to support "
- "incremental solving"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off sygus inst to support "
+ "incremental solving"
+ << std::endl;
opts.quantifiers.sygusInst = false;
}
if (opts.smt.solveIntAsBV > 0)
reason << "simplification";
return true;
}
- Notice() << "SolverEngine: turning off simplification to support unsat "
- "cores"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off simplification to support unsat "
+ "cores"
+ << std::endl;
opts.smt.simplificationMode = options::SimplificationMode::NONE;
}
reason << "learned rewrites";
return true;
}
- Notice() << "SolverEngine: turning off learned rewrites to support "
- "unsat cores\n";
+ verbose(1) << "SolverEngine: turning off learned rewrites to support "
+ "unsat cores\n";
opts.smt.learnedRewrite = false;
}
reason << "pseudoboolean rewrites";
return true;
}
- Notice() << "SolverEngine: turning off pseudoboolean rewrites to support "
- "unsat cores\n";
+ verbose(1) << "SolverEngine: turning off pseudoboolean rewrites to support "
+ "unsat cores\n";
opts.arith.pbRewrites = false;
}
reason << "sort inference";
return true;
}
- Notice() << "SolverEngine: turning off sort inference to support unsat "
- "cores\n";
+ verbose(1) << "SolverEngine: turning off sort inference to support unsat "
+ "cores\n";
opts.smt.sortInference = false;
}
reason << "pre-skolemization";
return true;
}
- Notice() << "SolverEngine: turning off pre-skolemization to support "
- "unsat cores\n";
+ verbose(1) << "SolverEngine: turning off pre-skolemization to support "
+ "unsat cores\n";
opts.quantifiers.preSkolemQuant = false;
}
reason << "bv-to-bool";
return true;
}
- Notice() << "SolverEngine: turning off bitvector-to-bool to support "
- "unsat cores\n";
+ verbose(1) << "SolverEngine: turning off bitvector-to-bool to support "
+ "unsat cores\n";
opts.bv.bitvectorToBool = false;
}
reason << "bool-to-bv != off";
return true;
}
- Notice() << "SolverEngine: turning off bool-to-bv to support unsat cores\n";
+ verbose(1)
+ << "SolverEngine: turning off bool-to-bv to support unsat cores\n";
opts.bv.boolToBitvector = options::BoolToBVMode::OFF;
}
reason << "bv-intro-pow2";
return true;
}
- Notice()
+ verbose(1)
<< "SolverEngine: turning off bv-intro-pow2 to support unsat cores";
opts.bv.bvIntroducePow2 = false;
}
reason << "repeat-simp";
return true;
}
- Notice()
+ verbose(1)
<< "SolverEngine: turning off repeat-simp to support unsat cores\n";
opts.smt.repeatSimp = false;
}
reason << "global-negate";
return true;
}
- Notice() << "SolverEngine: turning off global-negate to support unsat "
- "cores\n";
+ verbose(1) << "SolverEngine: turning off global-negate to support unsat "
+ "cores\n";
opts.quantifiers.globalNegate = false;
}
reason << "unconstrained simplification";
return true;
}
- Notice() << "SolverEngine: turning off unconstrained simplification to "
- "support unsat cores"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off unconstrained simplification to "
+ "support unsat cores"
+ << std::endl;
opts.smt.unconstrainedSimp = false;
}
return false;
needsUf = true;
if (!logic.isTheoryEnabled(THEORY_ARITH) || logic.isDifferenceLogic())
{
- Notice()
+ verbose(1)
<< "Enabling linear integer arithmetic because strings are enabled"
<< std::endl;
log.enableTheory(THEORY_ARITH);
}
else if (!logic.areIntegersUsed())
{
- Notice() << "Enabling integer arithmetic because strings are enabled"
- << std::endl;
+ verbose(1) << "Enabling integer arithmetic because strings are enabled"
+ << std::endl;
log.enableIntegers();
}
logic = log;
{
// if pre-skolem nested is explictly set, then we require UF. If it is
// not explicitly set, it is disabled below if UF is not present.
- Notice() << "Enabling UF because preSkolemQuantNested requires it."
- << std::endl;
+ verbose(1) << "Enabling UF because preSkolemQuantNested requires it."
+ << std::endl;
needsUf = true;
}
if (needsUf
LogicInfo log(logic.getUnlockedCopy());
if (!needsUf)
{
- Notice() << "Enabling UF because " << logic << " requires it."
- << std::endl;
+ verbose(1) << "Enabling UF because " << logic << " requires it."
+ << std::endl;
}
log.enableTheory(THEORY_UF);
logic = log;
{
// enable integers
LogicInfo log(logic.getUnlockedCopy());
- Notice() << "Enabling integers because arithMLTrick requires it."
- << std::endl;
+ verbose(1) << "Enabling integers because arithMLTrick requires it."
+ << std::endl;
log.enableIntegers();
logic = log;
logic.lock();
if (opts.quantifiers.instMaxLevel != -1)
{
- Notice() << "SolverEngine: turning off cbqi to support instMaxLevel"
- << std::endl;
+ verbose(1) << "SolverEngine: turning off cbqi to support instMaxLevel"
+ << std::endl;
opts.quantifiers.cegqi = false;
}
#define CVC5__SMT__SET_DEFAULTS_H
#include "options/options.h"
+#include "smt/env_obj.h"
#include "theory/logic_info.h"
namespace cvc5 {
* Class responsible for setting default options, which includes managing
* implied options and dependencies between the options and the logic.
*/
-class SetDefaults
+class SetDefaults : protected EnvObj
{
public:
/**
* @param isInternalSubsolver Whether we are setting the options for an
* internal subsolver (see SolverEngine::isInternalSubsolver).
*/
- SetDefaults(bool isInternalSubsolver);
+ SetDefaults(Env& env, bool isInternalSubsolver);
/**
* The purpose of this method is to set the default options and update the
* logic info for an SMT engine.
// Call finish init on the set defaults module. This inializes the logic
// and the best default options based on our heuristics.
- SetDefaults sdefaults(d_isInternalSubsolver);
+ SetDefaults sdefaults(*d_env, d_isInternalSubsolver);
sdefaults.setDefaults(d_env->d_logic, getOptions());
if (d_env->getOptions().smt.produceProofs)
break;
default:
{
- Notice() << "Don't know how to handle Skolem ID " << id << std::endl;
+ Trace("skolem-cache")
+ << "Don't know how to handle Skolem ID " << id << std::endl;
Node v = nm->mkBoundVar(tn);
Node cond = nm->mkConst(true);
sk = sm->mkSkolem(v, cond, c, "string skolem");
std::cout << "Collected MIS: " << mis << std::endl;
Assert(!mis.empty()) << "Infeasible subset can not be empty";
Node lem = NodeManager::currentNM()->mkAnd(mis).negate();
- Notice() << "UNSAT with MIS: " << lem << std::endl;
+ std::cout << "UNSAT with MIS: " << lem << std::endl;
}
}
TestInternal::SetUp();
DebugChannel.setStream(&d_debugStream);
TraceChannel.setStream(&d_traceStream);
- NoticeChannel.setStream(&d_noticeStream);
MessageChannel.setStream(&d_messageStream);
WarningChannel.setStream(&d_warningStream);
d_debugStream.str("");
d_traceStream.str("");
- d_noticeStream.str("");
d_messageStream.str("");
d_warningStream.str("");
}
}
std::stringstream d_debugStream;
std::stringstream d_traceStream;
- std::stringstream d_noticeStream;
std::stringstream d_messageStream;
std::stringstream d_warningStream;
};
CVC5Message() << "a message";
Warning() << "bad warning!";
- Notice() << "note";
Trace.on("foo");
Trace("foo") << "tracing1";
ASSERT_EQ(d_debugStream.str(), "");
ASSERT_EQ(d_messageStream.str(), "");
ASSERT_EQ(d_warningStream.str(), "");
- ASSERT_EQ(d_noticeStream.str(), "");
ASSERT_EQ(d_traceStream.str(), "");
#else /* CVC5_MUZZLE */
ASSERT_EQ(d_messageStream.str(), "a message");
ASSERT_EQ(d_warningStream.str(), "bad warning!");
- ASSERT_EQ(d_noticeStream.str(), "note");
#ifdef CVC5_TRACING
ASSERT_EQ(d_traceStream.str(), "tracing1tracing3");
ASSERT_FALSE(Trace.isOn("foo"));
ASSERT_FALSE(Warning.isOn());
ASSERT_FALSE(CVC5Message.isOn());
- ASSERT_FALSE(Notice.isOn());
cout << "debug" << std::endl;
Debug("foo") << failure() << std::endl;
Warning() << failure() << std::endl;
cout << "message" << std::endl;
CVC5Message() << failure() << std::endl;
- cout << "notice" << std::endl;
- Notice() << failure() << std::endl;
#endif
}
ASSERT_EQ(d_messageStream.str(), std::string());
d_messageStream.str("");
- Notice() << "baz foo";
- ASSERT_EQ(d_noticeStream.str(), std::string());
- d_noticeStream.str("");
-
#else /* CVC5_MUZZLE */
Debug.off("yo");
ASSERT_EQ(d_messageStream.str(), std::string("baz foo"));
d_messageStream.str("");
- Notice() << "baz foo";
- ASSERT_EQ(d_noticeStream.str(), std::string("baz foo"));
- d_noticeStream.str("");
-
#endif /* CVC5_MUZZLE */
}
} // namespace test