fi
fi
if test $cvc4_has_threads = no -a $cvc4_must_have_threads = yes; then
- AC_MSG_ERROR([user gave --with-threads but could not build with threads; maybe boost threading library is missing?])
+ AC_MSG_ERROR([user gave --with-portfolio but could not build with threads; maybe boost threading library is missing?])
fi
# Whether to build compatibility library
Command::Command() throw() : d_commandStatus(NULL) {
}
+Command::Command(const Command& cmd) {
+ d_commandStatus = (cmd.d_commandStatus == NULL) ? NULL : &cmd.d_commandStatus->clone();
+}
+
Command::~Command() throw() {
if(d_commandStatus != NULL && d_commandStatus != CommandSuccess::instance()) {
delete d_commandStatus;
virtual ~CommandStatus() throw() {}
void toStream(std::ostream& out,
OutputLanguage language = language::output::LANG_AST) const throw();
+ virtual CommandStatus& clone() const = 0;
};/* class CommandStatus */
class CVC4_PUBLIC CommandSuccess : public CommandStatus {
static const CommandSuccess* s_instance;
public:
static const CommandSuccess* instance() throw() { return s_instance; }
+ CommandStatus& clone() const { return const_cast<CommandSuccess&>(*this); }
};/* class CommandSuccess */
class CVC4_PUBLIC CommandUnsupported : public CommandStatus {
+public:
+ CommandStatus& clone() const { return *new CommandUnsupported(*this); }
};/* class CommandSuccess */
class CVC4_PUBLIC CommandFailure : public CommandStatus {
std::string d_message;
public:
CommandFailure(std::string message) throw() : d_message(message) {}
+ CommandFailure& clone() const { return *new CommandFailure(*this); }
~CommandFailure() throw() {}
std::string getMessage() const throw() { return d_message; }
};/* class CommandFailure */
class CVC4_PUBLIC Command {
- // intentionally not permitted
- Command(const Command&) CVC4_UNDEFINED;
- Command& operator=(const Command&) CVC4_UNDEFINED;
-
protected:
/**
* This field contains a command status if the command has been
typedef CommandPrintSuccess printsuccess;
Command() throw();
+ Command(const Command& cmd);
+
virtual ~Command() throw();
virtual void invoke(SmtEngine* smtEngine) throw() = 0;
if(Debug.isOn("paranoid:check_tableau")){ d_simplex.debugCheckTableau(); }
static CVC4_THREADLOCAL(unsigned) callCount = 0;
- Debug("arith::presolve") << "TheoryArith::presolve #" << (callCount++) << endl;
+ if(Debug.isOn("arith::presolve")) {
+ Debug("arith::presolve") << "TheoryArith::presolve #" << callCount << endl;
+ callCount = callCount + 1;
+ }
d_learner.clear();
check(FULL_EFFORT);