This PR passes the symbol manager to Command::invoke.
There are no behavior changes in this PR. This is in preparation for reimplementing several features in the parser related to symbols.
{
bool status = true;
if(d_options.getVerbosity() >= -1) {
- status = solverInvoke(d_solver.get(), cmd, d_options.getOut());
+ status =
+ solverInvoke(d_solver.get(), d_symman.get(), cmd, d_options.getOut());
} else {
- status = solverInvoke(d_solver.get(), cmd, nullptr);
+ status = solverInvoke(d_solver.get(), d_symman.get(), cmd, nullptr);
}
api::Result res;
return status;
}
-bool solverInvoke(api::Solver* solver, Command* cmd, std::ostream* out)
+bool solverInvoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ Command* cmd,
+ std::ostream* out)
{
if (out == NULL)
{
- cmd->invoke(solver);
+ cmd->invoke(solver, sm);
}
else
{
- cmd->invoke(solver, *out);
+ cmd->invoke(solver, sm, *out);
}
// ignore the error if the command-verbosity is 0 for this command
std::string commandName =
}; /* class CommandExecutor */
-bool solverInvoke(api::Solver* solver, Command* cmd, std::ostream* out);
+bool solverInvoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ Command* cmd,
+ std::ostream* out);
}/* CVC4::main namespace */
}/* CVC4 namespace */
#include "expr/type.h"
#include "options/options.h"
#include "options/smt_options.h"
+#include "parser/symbol_manager.h"
#include "printer/printer.h"
#include "proof/unsat_core.h"
#include "smt/dump.h"
&& dynamic_cast<const CommandInterrupted*>(d_commandStatus) != NULL;
}
-void Command::invoke(api::Solver* solver, std::ostream& out)
+void Command::invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out)
{
- invoke(solver);
+ invoke(solver, sm);
if (!(isMuted() && ok()))
{
printResult(
EmptyCommand::EmptyCommand(std::string name) : d_name(name) {}
std::string EmptyCommand::getName() const { return d_name; }
-void EmptyCommand::invoke(api::Solver* solver)
+void EmptyCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
/* empty commands have no implementation */
d_commandStatus = CommandSuccess::instance();
void EmptyCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
EchoCommand::EchoCommand(std::string output) : d_output(output) {}
std::string EchoCommand::getOutput() const { return d_output; }
-void EchoCommand::invoke(api::Solver* solver)
+void EchoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
/* we don't have an output stream here, nothing to do */
d_commandStatus = CommandSuccess::instance();
}
-void EchoCommand::invoke(api::Solver* solver, std::ostream& out)
+void EchoCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out)
{
out << d_output << std::endl;
Trace("dtview::command") << "* ~COMMAND: echo |" << d_output << "|~"
void EchoCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
api::Term AssertCommand::getTerm() const { return d_term; }
-void AssertCommand::invoke(api::Solver* solver)
+void AssertCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void AssertCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class PushCommand */
/* -------------------------------------------------------------------------- */
-void PushCommand::invoke(api::Solver* solver)
+void PushCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void PushCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class PopCommand */
/* -------------------------------------------------------------------------- */
-void PopCommand::invoke(api::Solver* solver)
+void PopCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void PopCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
CheckSatCommand::CheckSatCommand(const api::Term& term) : d_term(term) {}
api::Term CheckSatCommand::getTerm() const { return d_term; }
-void CheckSatCommand::invoke(api::Solver* solver)
+void CheckSatCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
Trace("dtview::command") << "* ~COMMAND: " << getCommandName() << "~"
<< std::endl;
void CheckSatCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
return d_terms;
}
-void CheckSatAssumingCommand::invoke(api::Solver* solver)
+void CheckSatAssumingCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
Trace("dtview::command") << "* ~COMMAND: (check-sat-assuming ( " << d_terms
<< " )~" << std::endl;
void CheckSatAssumingCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
api::Term QueryCommand::getTerm() const { return d_term; }
-void QueryCommand::invoke(api::Solver* solver)
+void QueryCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void QueryCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
api::Term DeclareSygusVarCommand::getVar() const { return d_var; }
api::Sort DeclareSygusVarCommand::getSort() const { return d_sort; }
-void DeclareSygusVarCommand::invoke(api::Solver* solver)
+void DeclareSygusVarCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void DeclareSygusVarCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
const api::Grammar* SynthFunCommand::getGrammar() const { return d_grammar; }
-void SynthFunCommand::invoke(api::Solver* solver)
+void SynthFunCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void SynthFunCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
}
-void SygusConstraintCommand::invoke(api::Solver* solver)
+void SygusConstraintCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void SygusConstraintCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
}
-void SygusInvConstraintCommand::invoke(api::Solver* solver)
+void SygusInvConstraintCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void SygusInvConstraintCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class CheckSynthCommand */
/* -------------------------------------------------------------------------- */
-void CheckSynthCommand::invoke(api::Solver* solver)
+void CheckSynthCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void CheckSynthCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class ResetCommand */
/* -------------------------------------------------------------------------- */
-void ResetCommand::invoke(api::Solver* solver)
+void ResetCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void ResetCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class ResetAssertionsCommand */
/* -------------------------------------------------------------------------- */
-void ResetAssertionsCommand::invoke(api::Solver* solver)
+void ResetAssertionsCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void ResetAssertionsCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* class QuitCommand */
/* -------------------------------------------------------------------------- */
-void QuitCommand::invoke(api::Solver* solver)
+void QuitCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
Dump("benchmark") << *this;
d_commandStatus = CommandSuccess::instance();
void QuitCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
CommentCommand::CommentCommand(std::string comment) : d_comment(comment) {}
std::string CommentCommand::getComment() const { return d_comment; }
-void CommentCommand::invoke(api::Solver* solver)
+void CommentCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
Dump("benchmark") << *this;
d_commandStatus = CommandSuccess::instance();
void CommentCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
void CommandSequence::clear() { d_commandSequence.clear(); }
-void CommandSequence::invoke(api::Solver* solver)
+void CommandSequence::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
for (; d_index < d_commandSequence.size(); ++d_index)
{
- d_commandSequence[d_index]->invoke(solver);
+ d_commandSequence[d_index]->invoke(solver, sm);
if (!d_commandSequence[d_index]->ok())
{
// abort execution
d_commandStatus = CommandSuccess::instance();
}
-void CommandSequence::invoke(api::Solver* solver, std::ostream& out)
+void CommandSequence::invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out)
{
for (; d_index < d_commandSequence.size(); ++d_index)
{
- d_commandSequence[d_index]->invoke(solver, out);
+ d_commandSequence[d_index]->invoke(solver, sm, out);
if (!d_commandSequence[d_index]->ok())
{
// abort execution
void CommandSequence::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
void DeclarationSequence::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
d_printInModelSetByUser = true;
}
-void DeclareFunctionCommand::invoke(api::Solver* solver)
+void DeclareFunctionCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void DeclareFunctionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
size_t DeclareSortCommand::getArity() const { return d_arity; }
api::Sort DeclareSortCommand::getSort() const { return d_sort; }
-void DeclareSortCommand::invoke(api::Solver* solver)
+void DeclareSortCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void DeclareSortCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
api::Sort DefineSortCommand::getSort() const { return d_sort; }
-void DefineSortCommand::invoke(api::Solver* solver)
+void DefineSortCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void DefineSortCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
api::Term DefineFunctionCommand::getFormula() const { return d_formula; }
-void DefineFunctionCommand::invoke(api::Solver* solver)
+void DefineFunctionCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void DefineFunctionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
}
-void DefineNamedFunctionCommand::invoke(api::Solver* solver)
+void DefineNamedFunctionCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
- this->DefineFunctionCommand::invoke(solver);
+ this->DefineFunctionCommand::invoke(solver, sm);
if (!d_func.isNull() && d_func.getSort().isBoolean())
{
solver->getSmtEngine()->addToAssignment(d_func.getExpr());
void DefineNamedFunctionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
return d_formulas;
}
-void DefineFunctionRecCommand::invoke(api::Solver* solver)
+void DefineFunctionRecCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void DefineFunctionRecCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
api::Sort DeclareHeapCommand::getLocationSort() const { return d_locSort; }
api::Sort DeclareHeapCommand::getDataSort() const { return d_dataSort; }
-void DeclareHeapCommand::invoke(api::Solver* solver)
+void DeclareHeapCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
solver->declareSeparationHeap(d_locSort, d_dataSort);
}
{
}
-void SetUserAttributeCommand::invoke(api::Solver* solver)
+void SetUserAttributeCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void SetUserAttributeCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
SimplifyCommand::SimplifyCommand(api::Term term) : d_term(term) {}
api::Term SimplifyCommand::getTerm() const { return d_term; }
-void SimplifyCommand::invoke(api::Solver* solver)
+void SimplifyCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void SimplifyCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
return d_terms;
}
-void GetValueCommand::invoke(api::Solver* solver)
+void GetValueCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetValueCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetAssignmentCommand::GetAssignmentCommand() {}
-void GetAssignmentCommand::invoke(api::Solver* solver)
+void GetAssignmentCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetAssignmentCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetModelCommand::GetModelCommand() : d_result(nullptr) {}
-void GetModelCommand::invoke(api::Solver* solver)
+void GetModelCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetModelCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
BlockModelCommand::BlockModelCommand() {}
-void BlockModelCommand::invoke(api::Solver* solver)
+void BlockModelCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void BlockModelCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
return d_terms;
}
-void BlockModelValuesCommand::invoke(api::Solver* solver)
+void BlockModelValuesCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void BlockModelValuesCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetProofCommand::GetProofCommand() {}
-void GetProofCommand::invoke(api::Solver* solver)
+void GetProofCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
Unimplemented() << "Unimplemented get-proof\n";
}
void GetProofCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetInstantiationsCommand::GetInstantiationsCommand() : d_solver(nullptr) {}
-void GetInstantiationsCommand::invoke(api::Solver* solver)
+void GetInstantiationsCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetInstantiationsCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetSynthSolutionCommand::GetSynthSolutionCommand() : d_solver(nullptr) {}
-void GetSynthSolutionCommand::invoke(api::Solver* solver)
+void GetSynthSolutionCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetSynthSolutionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
api::Term GetInterpolCommand::getResult() const { return d_result; }
-void GetInterpolCommand::invoke(api::Solver* solver)
+void GetInterpolCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetInterpolCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
std::string GetAbductCommand::getAbductName() const { return d_name; }
api::Term GetAbductCommand::getResult() const { return d_result; }
-void GetAbductCommand::invoke(api::Solver* solver)
+void GetAbductCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetAbductCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
api::Term GetQuantifierEliminationCommand::getTerm() const { return d_term; }
bool GetQuantifierEliminationCommand::getDoFull() const { return d_doFull; }
-void GetQuantifierEliminationCommand::invoke(api::Solver* solver)
+void GetQuantifierEliminationCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetQuantifierEliminationCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
GetUnsatAssumptionsCommand::GetUnsatAssumptionsCommand() {}
-void GetUnsatAssumptionsCommand::invoke(api::Solver* solver)
+void GetUnsatAssumptionsCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetUnsatAssumptionsCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetUnsatCoreCommand::GetUnsatCoreCommand() {}
-void GetUnsatCoreCommand::invoke(api::Solver* solver)
+void GetUnsatCoreCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetUnsatCoreCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
/* -------------------------------------------------------------------------- */
GetAssertionsCommand::GetAssertionsCommand() {}
-void GetAssertionsCommand::invoke(api::Solver* solver)
+void GetAssertionsCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void GetAssertionsCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
return d_status;
}
-void SetBenchmarkStatusCommand::invoke(api::Solver* solver)
+void SetBenchmarkStatusCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void SetBenchmarkStatusCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
}
std::string SetBenchmarkLogicCommand::getLogic() const { return d_logic; }
-void SetBenchmarkLogicCommand::invoke(api::Solver* solver)
+void SetBenchmarkLogicCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
try
{
void SetBenchmarkLogicCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
std::string SetInfoCommand::getFlag() const { return d_flag; }
SExpr SetInfoCommand::getSExpr() const { return d_sexpr; }
-void SetInfoCommand::invoke(api::Solver* solver)
+void SetInfoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void SetInfoCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
GetInfoCommand::GetInfoCommand(std::string flag) : d_flag(flag) {}
std::string GetInfoCommand::getFlag() const { return d_flag; }
-void GetInfoCommand::invoke(api::Solver* solver)
+void GetInfoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetInfoCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
std::string SetOptionCommand::getFlag() const { return d_flag; }
SExpr SetOptionCommand::getSExpr() const { return d_sexpr; }
-void SetOptionCommand::invoke(api::Solver* solver)
+void SetOptionCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void SetOptionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
GetOptionCommand::GetOptionCommand(std::string flag) : d_flag(flag) {}
std::string GetOptionCommand::getFlag() const { return d_flag; }
-void GetOptionCommand::invoke(api::Solver* solver)
+void GetOptionCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
{
try
{
void GetOptionCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
{
}
-void SetExpressionNameCommand::invoke(api::Solver* solver)
+void SetExpressionNameCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
solver->getSmtEngine()->setExpressionName(d_term.getExpr(), d_name);
d_commandStatus = CommandSuccess::instance();
void SetExpressionNameCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
return d_datatypes;
}
-void DatatypeDeclarationCommand::invoke(api::Solver* solver)
+void DatatypeDeclarationCommand::invoke(api::Solver* solver,
+ parser::SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
void DatatypeDeclarationCommand::toStream(std::ostream& out,
int toDepth,
-
size_t dag,
OutputLanguage language) const
{
class Term;
} // namespace api
+namespace parser {
+class SymbolManager;
+}
+
class UnsatCore;
class SmtEngine;
class Command;
virtual ~Command();
- virtual void invoke(api::Solver* solver) = 0;
- virtual void invoke(api::Solver* solver, std::ostream& out);
+ /**
+ * Invoke the command on the solver and symbol manager sm.
+ */
+ virtual void invoke(api::Solver* solver, parser::SymbolManager* sm) = 0;
+ /**
+ * Same as above, and prints the result to output stream out.
+ */
+ virtual void invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out);
virtual void toStream(
std::ostream& out,
public:
EmptyCommand(std::string name = "");
std::string getName() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
std::string getOutput() const;
- void invoke(api::Solver* solver) override;
- void invoke(api::Solver* solver, std::ostream& out) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
api::Term getTerm() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class AssertCommand */
class CVC4_PUBLIC PushCommand : public Command
{
public:
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class PushCommand */
class CVC4_PUBLIC PopCommand : public Command
{
public:
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class PopCommand */
public:
DeclarationDefinitionCommand(const std::string& id);
- void invoke(api::Solver* solver) override = 0;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override = 0;
std::string getSymbol() const;
}; /* class DeclarationDefinitionCommand */
bool getPrintInModelSetByUser() const;
void setPrintInModel(bool p);
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class DeclareFunctionCommand */
size_t getArity() const;
api::Sort getSort() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class DeclareSortCommand */
const std::vector<api::Sort>& getParameters() const;
api::Sort getSort() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class DefineSortCommand */
const std::vector<api::Term>& getFormals() const;
api::Term getFormula() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
const std::vector<api::Term>& formals,
api::Term formula,
bool global);
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
void toStream(
std::ostream& out,
const std::vector<std::vector<api::Term> >& getFormals() const;
const std::vector<api::Term>& getFormulas() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
DeclareHeapCommand(api::Sort locSort, api::Sort dataSort);
api::Sort getLocationSort() const;
api::Sort getDataSort() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
api::Term term,
const std::string& value);
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
api::Term getTerm() const;
api::Result getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
const std::vector<api::Term>& getTerms() const;
api::Result getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
api::Term getTerm() const;
api::Result getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class QueryCommand */
* The declared sygus variable is communicated to the SMT engine in case a
* synthesis conjecture is built later on.
*/
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
* The declared function-to-synthesize is communicated to the SMT engine in
* case a synthesis conjecture is built later on.
*/
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
* The declared constraint is communicated to the SMT engine in case a
* synthesis conjecture is built later on.
*/
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
* invariant constraint is built, in case an actual synthesis conjecture is
* built later on.
*/
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
* and then perform a satisfiability check, whose result is stored in
* d_result.
*/
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
api::Term getTerm() const;
api::Term getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class SimplifyCommand */
const std::vector<api::Term>& getTerms() const;
api::Term getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class GetValueCommand */
GetAssignmentCommand();
SExpr getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class GetAssignmentCommand */
// Model is private to the library -- for now
// Model* getResult() const ;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
public:
BlockModelCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class BlockModelCommand */
BlockModelValuesCommand(const std::vector<api::Term>& terms);
const std::vector<api::Term>& getTerms() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
public:
GetProofCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class GetProofCommand */
public:
GetInstantiationsCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
public:
GetSynthSolutionCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
* query. */
api::Term getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
*/
api::Term getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
api::Term getTerm() const;
bool getDoFull() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
api::Term getResult() const;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class GetQuantifierEliminationCommand */
{
public:
GetUnsatAssumptionsCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
std::vector<api::Term> getResult() const;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
GetUnsatCoreCommand();
const std::vector<api::Term>& getUnsatCore() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
public:
GetAssertionsCommand();
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
std::string getResult() const;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
BenchmarkStatus getStatus() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
SetBenchmarkLogicCommand(std::string logic);
std::string getLogic() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::string getFlag() const;
SExpr getSExpr() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::string getFlag() const;
std::string getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
std::string getFlag() const;
SExpr getSExpr() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class SetOptionCommand */
std::string getFlag() const;
std::string getResult() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class GetOptionCommand */
public:
SetExpressionNameCommand(api::Term term, std::string name);
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class SetExpressionNameCommand */
DatatypeDeclarationCommand(const std::vector<api::Sort>& datatypes);
const std::vector<api::Sort>& getDatatypes() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class DatatypeDeclarationCommand */
{
public:
ResetCommand() {}
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class ResetCommand */
{
public:
ResetAssertionsCommand() {}
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class ResetAssertionsCommand */
{
public:
QuitCommand() {}
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class QuitCommand */
std::string getComment() const;
- void invoke(api::Solver* solver) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class CommentCommand */
void addCommand(Command* cmd);
void clear();
- void invoke(api::Solver* solver) override;
- void invoke(api::Solver* solver, std::ostream& out) override;
+ void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver,
+ parser::SymbolManager* sm,
+ std::ostream& out) override;
typedef std::vector<Command*>::iterator iterator;
typedef std::vector<Command*>::const_iterator const_iterator;
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
}; /* class CommandSequence */
void toStream(
std::ostream& out,
int toDepth = -1,
-
size_t dag = 1,
OutputLanguage language = language::output::LANG_AUTO) const override;
};
assert(c != NULL);
cout << c << endl;
stringstream ss;
- c->invoke(solver, ss);
+ c->invoke(solver, symman.get(), ss);
assert(p->nextCommand() == NULL);
delete p;
delete c;