This is required since symbol manager will use context dependent data structures (in its cpp).
This is required since classes in src/parser/ are not allowed to include private headers.
expr/expr_iomanip.h
expr/record.h
expr/sequence.h
+ expr/symbol_manager.h
expr/symbol_table.h
expr/type.h
expr/uninterpreted_constant.h
parser/parser_builder.h
parser/parser_exception.h
parser/parse_op.h
- parser/symbol_manager.h
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/cvc4/parser)
install(FILES
proof_step_buffer.h
skolem_manager.cpp
skolem_manager.h
+ symbol_manager.cpp
+ symbol_manager.h
symbol_table.cpp
symbol_table.h
tconv_seq_proof_generator.cpp
--- /dev/null
+/********************* */
+/*! \file symbol_manager.cpp
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Andrew Reynolds
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
+ ** in the top-level source directory and their institutional affiliations.
+ ** All rights reserved. See the file COPYING in the top-level source
+ ** directory for licensing information.\endverbatim
+ **
+ ** \brief The symbol manager
+ **/
+
+#include "expr/symbol_manager.h"
+
+namespace CVC4 {
+
+SymbolManager::SymbolManager(api::Solver* s) : d_solver(s) {}
+
+SymbolTable* SymbolManager::getSymbolTable() { return &d_symtabAllocated; }
+
+bool SymbolManager::setExpressionName(api::Term t,
+ const std::string& name,
+ bool isAssertion)
+{
+ if (d_names.find(t) != d_names.end())
+ {
+ // already named assertion
+ return false;
+ }
+ if (isAssertion)
+ {
+ d_namedAsserts.insert(t);
+ }
+ d_names[t] = name;
+ return true;
+}
+
+bool SymbolManager::getExpressionName(api::Term t,
+ std::string& name,
+ bool isAssertion) const
+{
+ std::map<api::Term, std::string>::const_iterator it = d_names.find(t);
+ if (it == d_names.end())
+ {
+ return false;
+ }
+ if (isAssertion)
+ {
+ // must be an assertion name
+ if (d_namedAsserts.find(t) == d_namedAsserts.end())
+ {
+ return false;
+ }
+ }
+ name = it->second;
+ return true;
+}
+
+void SymbolManager::getExpressionNames(const std::vector<api::Term>& ts,
+ std::vector<std::string>& names,
+ bool areAssertions) const
+{
+ for (const api::Term& t : ts)
+ {
+ std::string name;
+ if (getExpressionName(t, name, areAssertions))
+ {
+ names.push_back(name);
+ }
+ }
+}
+
+} // namespace CVC4
--- /dev/null
+/********************* */
+/*! \file symbol_manager.h
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Andrew Reynolds
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
+ ** in the top-level source directory and their institutional affiliations.
+ ** All rights reserved. See the file COPYING in the top-level source
+ ** directory for licensing information.\endverbatim
+ **
+ ** \brief The symbol manager
+ **/
+
+#include "cvc4_public.h"
+
+#ifndef CVC4__EXPR__SYMBOL_MANAGER_H
+#define CVC4__EXPR__SYMBOL_MANAGER_H
+
+#include <map>
+#include <set>
+#include <string>
+
+#include "api/cvc4cpp.h"
+#include "expr/symbol_table.h"
+
+namespace CVC4 {
+
+/**
+ * Symbol manager, which manages:
+ * (1) The symbol table used by the parser,
+ * (2) Information related to the (! ... :named s) feature in SMT-LIB version 2.
+ *
+ * Like SymbolTable, this class currently lives in src/expr/ since it uses
+ * context-dependent data structures.
+ */
+class CVC4_PUBLIC SymbolManager
+{
+ public:
+ SymbolManager(api::Solver* s);
+ ~SymbolManager() {}
+ /** Get the underlying symbol table */
+ SymbolTable* getSymbolTable();
+ //---------------------------- named expressions
+ /** Set name of term t to name
+ *
+ * @param t The term to name
+ * @param name The given name
+ * @param isAssertion Whether t is being given a name in an assertion
+ * context. In particular, this is true if and only if there was an assertion
+ * command of the form (assert (! t :named name)).
+ * @return true if the name was set. This method may return false if t
+ * already has a name.
+ */
+ bool setExpressionName(api::Term t,
+ const std::string& name,
+ bool isAssertion = false);
+ /** Get name for term t
+ *
+ * @param t The term
+ * @param name The argument to update with the name of t
+ * @param isAssertion Whether we only wish to get the assertion name of t
+ * @return true if t has a name. If so, name is updated to that name.
+ * Otherwise, name is unchanged.
+ */
+ bool getExpressionName(api::Term t,
+ std::string& name,
+ bool isAssertion = false) const;
+ /**
+ * Convert list of terms to list of names. This adds to names the names of
+ * all terms in ts that has names. Terms that do not have names are not
+ * included.
+ *
+ * Notice that we do not distinguish what terms among those in ts have names.
+ * If the caller of this method wants more fine-grained information about what
+ * specific terms had names, then use the more fine grained interface above,
+ * per term.
+ *
+ * @param ts The terms
+ * @param names The name list
+ * @param areAssertions Whether we only wish to include assertion names
+ */
+ void getExpressionNames(const std::vector<api::Term>& ts,
+ std::vector<std::string>& names,
+ bool areAssertions = false) const;
+ //---------------------------- end named expressions
+
+ private:
+ /** The API Solver object. */
+ api::Solver* d_solver;
+ /**
+ * The declaration scope that is "owned" by this symbol manager.
+ */
+ SymbolTable d_symtabAllocated;
+ /** Map terms to names */
+ std::map<api::Term, std::string> d_names;
+ /** The set of terms with assertion names */
+ std::set<api::Term> d_namedAsserts;
+};
+
+} // namespace CVC4
+
+#endif /* CVC4__EXPR__SYMBOL_MANAGER_H */
CommandExecutor::CommandExecutor(Options& options)
: d_solver(new api::Solver(&options)),
- d_symman(new parser::SymbolManager(d_solver.get())),
+ d_symman(new SymbolManager(d_solver.get())),
d_smtEngine(d_solver->getSmtEngine()),
d_options(options),
d_stats("driver"),
}
bool solverInvoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
Command* cmd,
std::ostream* out)
{
#include "api/cvc4cpp.h"
#include "expr/expr_manager.h"
+#include "expr/symbol_manager.h"
#include "options/options.h"
-#include "parser/symbol_manager.h"
#include "smt/smt_engine.h"
#include "util/statistics_registry.h"
* Certain commands (e.g. reset-assertions) have a specific impact on the
* symbol manager.
*/
- std::unique_ptr<parser::SymbolManager> d_symman;
+ std::unique_ptr<SymbolManager> d_symman;
SmtEngine* d_smtEngine;
Options& d_options;
StatisticsRegistry d_stats;
api::Solver* getSolver() { return d_solver.get(); }
/** Get a pointer to the symbol manager owned by this CommandExecutor */
- parser::SymbolManager* getSymbolManager() { return d_symman.get(); }
+ SymbolManager* getSymbolManager() { return d_symman.get(); }
api::Result getResult() const { return d_result; }
void reset();
}; /* class CommandExecutor */
bool solverInvoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
Command* cmd,
std::ostream* out);
#include "api/cvc4cpp.h"
#include "base/output.h"
+#include "expr/symbol_manager.h"
#include "options/language.h"
#include "options/options.h"
#include "parser/input.h"
#include "parser/parser.h"
#include "parser/parser_builder.h"
-#include "parser/symbol_manager.h"
#include "smt/command.h"
#include "theory/logic_info.h"
#endif /* HAVE_LIBEDITLINE */
-InteractiveShell::InteractiveShell(api::Solver* solver,
- parser::SymbolManager* sm)
+InteractiveShell::InteractiveShell(api::Solver* solver, SymbolManager* sm)
: d_options(solver->getOptions()),
d_in(*d_options.getIn()),
d_out(*d_options.getOutConst()),
namespace parser {
class Parser;
- class SymbolManager;
}/* CVC4::parser namespace */
+class SymbolManager;
+
class CVC4_PUBLIC InteractiveShell
{
const Options& d_options;
static const unsigned s_historyLimit = 500;
public:
- InteractiveShell(api::Solver* solver, parser::SymbolManager* sm);
+ InteractiveShell(api::Solver* solver, SymbolManager* sm);
/**
* Close out the interactive session.
smt2/smt2_input.h
smt2/sygus_input.cpp
smt2/sygus_input.h
- symbol_manager.cpp
- symbol_manager.h
tptp/TptpLexer.c
tptp/TptpParser.c
tptp/tptp.cpp
#include "api/cvc4cpp.h"
#include "expr/kind.h"
+#include "expr/symbol_manager.h"
#include "expr/symbol_table.h"
#include "parser/input.h"
#include "parser/parse_op.h"
#include "parser/parser_exception.h"
-#include "parser/symbol_manager.h"
#include "util/unsafe_interrupt_exception.h"
namespace CVC4 {
namespace CVC4 {
-class Options;
-
namespace api {
class Solver;
}
+class Options;
+class SymbolManager;
+
namespace parser {
class Parser;
-class SymbolManager;
/**
* A builder for input language parsers. <code>build()</code> can be
+++ /dev/null
-/********************* */
-/*! \file symbol_manager.cpp
- ** \verbatim
- ** Top contributors (to current version):
- ** Andrew Reynolds
- ** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
- ** in the top-level source directory and their institutional affiliations.
- ** All rights reserved. See the file COPYING in the top-level source
- ** directory for licensing information.\endverbatim
- **
- ** \brief The symbol manager
- **/
-
-#include "parser/symbol_manager.h"
-
-namespace CVC4 {
-namespace parser {
-
-SymbolManager::SymbolManager(api::Solver* s) : d_solver(s) {}
-
-SymbolTable* SymbolManager::getSymbolTable() { return &d_symtabAllocated; }
-
-bool SymbolManager::setExpressionName(api::Term t,
- const std::string& name,
- bool isAssertion)
-{
- if (d_names.find(t) != d_names.end())
- {
- // already named assertion
- return false;
- }
- if (isAssertion)
- {
- d_namedAsserts.insert(t);
- }
- d_names[t] = name;
- return true;
-}
-
-bool SymbolManager::getExpressionName(api::Term t,
- std::string& name,
- bool isAssertion) const
-{
- std::map<api::Term, std::string>::const_iterator it = d_names.find(t);
- if (it == d_names.end())
- {
- return false;
- }
- if (isAssertion)
- {
- // must be an assertion name
- if (d_namedAsserts.find(t) == d_namedAsserts.end())
- {
- return false;
- }
- }
- name = it->second;
- return true;
-}
-
-void SymbolManager::getExpressionNames(const std::vector<api::Term>& ts,
- std::vector<std::string>& names,
- bool areAssertions) const
-{
- for (const api::Term& t : ts)
- {
- std::string name;
- if (getExpressionName(t, name, areAssertions))
- {
- names.push_back(name);
- }
- }
-}
-
-} // namespace parser
-} // namespace CVC4
+++ /dev/null
-/********************* */
-/*! \file symbol_manager.h
- ** \verbatim
- ** Top contributors (to current version):
- ** Andrew Reynolds
- ** This file is part of the CVC4 project.
- ** Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
- ** in the top-level source directory and their institutional affiliations.
- ** All rights reserved. See the file COPYING in the top-level source
- ** directory for licensing information.\endverbatim
- **
- ** \brief The symbol manager
- **/
-
-#include "cvc4parser_public.h"
-
-#ifndef CVC4__PARSER__SYMBOL_MANAGER_H
-#define CVC4__PARSER__SYMBOL_MANAGER_H
-
-#include <map>
-#include <set>
-#include <string>
-
-#include "api/cvc4cpp.h"
-#include "expr/symbol_table.h"
-
-namespace CVC4 {
-namespace parser {
-
-/**
- * Symbol manager, which manages:
- * (1) The symbol table used by the parser,
- * (2) Information related to the (! ... :named s) feature in SMT-LIB version 2.
- */
-class CVC4_PUBLIC SymbolManager
-{
- public:
- SymbolManager(api::Solver* s);
- ~SymbolManager() {}
- /** Get the underlying symbol table */
- SymbolTable* getSymbolTable();
- //---------------------------- named expressions
- /** Set name of term t to name
- *
- * @param t The term to name
- * @param name The given name
- * @param isAssertion Whether t is being given a name in an assertion
- * context. In particular, this is true if and only if there was an assertion
- * command of the form (assert (! t :named name)).
- * @return true if the name was set. This method may return false if t
- * already has a name.
- */
- bool setExpressionName(api::Term t,
- const std::string& name,
- bool isAssertion = false);
- /** Get name for term t
- *
- * @param t The term
- * @param name The argument to update with the name of t
- * @param isAssertion Whether we only wish to get the assertion name of t
- * @return true if t has a name. If so, name is updated to that name.
- * Otherwise, name is unchanged.
- */
- bool getExpressionName(api::Term t,
- std::string& name,
- bool isAssertion = false) const;
- /**
- * Convert list of terms to list of names. This adds to names the names of
- * all terms in ts that has names. Terms that do not have names are not
- * included.
- *
- * Notice that we do not distinguish what terms among those in ts have names.
- * If the caller of this method wants more fine-grained information about what
- * specific terms had names, then use the more fine grained interface above,
- * per term.
- *
- * @param ts The terms
- * @param names The name list
- * @param areAssertions Whether we only wish to include assertion names
- */
- void getExpressionNames(const std::vector<api::Term>& ts,
- std::vector<std::string>& names,
- bool areAssertions = false) const;
- //---------------------------- end named expressions
-
- private:
- /** The API Solver object. */
- api::Solver* d_solver;
- /**
- * The declaration scope that is "owned" by this symbol manager.
- */
- SymbolTable d_symtabAllocated;
- /** Map terms to names */
- std::map<api::Term, std::string> d_names;
- /** The set of terms with assertion names */
- std::set<api::Term> d_namedAsserts;
-};
-
-} // namespace parser
-} // namespace CVC4
-
-#endif /* CVC4__PARSER__SYMBOL_MANAGER_H */
#include "base/output.h"
#include "expr/expr_iomanip.h"
#include "expr/node.h"
+#include "expr/symbol_manager.h"
#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,
- parser::SymbolManager* sm,
- std::ostream& out)
+void Command::invoke(api::Solver* solver, SymbolManager* sm, std::ostream& out)
{
invoke(solver, sm);
if (!(isMuted() && ok()))
EmptyCommand::EmptyCommand(std::string name) : d_name(name) {}
std::string EmptyCommand::getName() const { return d_name; }
-void EmptyCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void EmptyCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
/* empty commands have no implementation */
d_commandStatus = CommandSuccess::instance();
EchoCommand::EchoCommand(std::string output) : d_output(output) {}
std::string EchoCommand::getOutput() const { return d_output; }
-void EchoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void EchoCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
/* we don't have an output stream here, nothing to do */
d_commandStatus = CommandSuccess::instance();
}
void EchoCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
std::ostream& out)
{
out << d_output << std::endl;
}
api::Term AssertCommand::getTerm() const { return d_term; }
-void AssertCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void AssertCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class PushCommand */
/* -------------------------------------------------------------------------- */
-void PushCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void PushCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class PopCommand */
/* -------------------------------------------------------------------------- */
-void PopCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void PopCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
CheckSatCommand::CheckSatCommand(const api::Term& term) : d_term(term) {}
api::Term CheckSatCommand::getTerm() const { return d_term; }
-void CheckSatCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void CheckSatCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
Trace("dtview::command") << "* ~COMMAND: " << getCommandName() << "~"
<< std::endl;
return d_terms;
}
-void CheckSatAssumingCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void CheckSatAssumingCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
Trace("dtview::command") << "* ~COMMAND: (check-sat-assuming ( " << d_terms
<< " )~" << std::endl;
}
api::Term QueryCommand::getTerm() const { return d_term; }
-void QueryCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void QueryCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
api::Term DeclareSygusVarCommand::getVar() const { return d_var; }
api::Sort DeclareSygusVarCommand::getSort() const { return d_sort; }
-void DeclareSygusVarCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DeclareSygusVarCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
const api::Grammar* SynthFunCommand::getGrammar() const { return d_grammar; }
-void SynthFunCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void SynthFunCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
{
}
-void SygusConstraintCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SygusConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
{
}
-void SygusInvConstraintCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SygusInvConstraintCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class CheckSynthCommand */
/* -------------------------------------------------------------------------- */
-void CheckSynthCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void CheckSynthCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class ResetCommand */
/* -------------------------------------------------------------------------- */
-void ResetCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void ResetCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class ResetAssertionsCommand */
/* -------------------------------------------------------------------------- */
-void ResetAssertionsCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void ResetAssertionsCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* class QuitCommand */
/* -------------------------------------------------------------------------- */
-void QuitCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void QuitCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
Dump("benchmark") << *this;
d_commandStatus = CommandSuccess::instance();
CommentCommand::CommentCommand(std::string comment) : d_comment(comment) {}
std::string CommentCommand::getComment() const { return d_comment; }
-void CommentCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void CommentCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
Dump("benchmark") << *this;
d_commandStatus = CommandSuccess::instance();
}
void CommandSequence::clear() { d_commandSequence.clear(); }
-void CommandSequence::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void CommandSequence::invoke(api::Solver* solver, SymbolManager* sm)
{
for (; d_index < d_commandSequence.size(); ++d_index)
{
}
void CommandSequence::invoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
std::ostream& out)
{
for (; d_index < d_commandSequence.size(); ++d_index)
d_printInModelSetByUser = true;
}
-void DeclareFunctionCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DeclareFunctionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
size_t DeclareSortCommand::getArity() const { return d_arity; }
api::Sort DeclareSortCommand::getSort() const { return d_sort; }
-void DeclareSortCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void DeclareSortCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
}
api::Sort DefineSortCommand::getSort() const { return d_sort; }
-void DefineSortCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void DefineSortCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
}
api::Term DefineFunctionCommand::getFormula() const { return d_formula; }
-void DefineFunctionCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DefineFunctionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
{
}
-void DefineNamedFunctionCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DefineNamedFunctionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
this->DefineFunctionCommand::invoke(solver, sm);
if (!d_func.isNull() && d_func.getSort().isBoolean())
return d_formulas;
}
-void DefineFunctionRecCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DefineFunctionRecCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
api::Sort DeclareHeapCommand::getLocationSort() const { return d_locSort; }
api::Sort DeclareHeapCommand::getDataSort() const { return d_dataSort; }
-void DeclareHeapCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void DeclareHeapCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
solver->declareSeparationHeap(d_locSort, d_dataSort);
}
{
}
-void SetUserAttributeCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SetUserAttributeCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
SimplifyCommand::SimplifyCommand(api::Term term) : d_term(term) {}
api::Term SimplifyCommand::getTerm() const { return d_term; }
-void SimplifyCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void SimplifyCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
{
return d_terms;
}
-void GetValueCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetValueCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetAssignmentCommand::GetAssignmentCommand() {}
-void GetAssignmentCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void GetAssignmentCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetModelCommand::GetModelCommand() : d_result(nullptr) {}
-void GetModelCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetModelCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
BlockModelCommand::BlockModelCommand() {}
-void BlockModelCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void BlockModelCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
{
return d_terms;
}
-void BlockModelValuesCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void BlockModelValuesCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetProofCommand::GetProofCommand() {}
-void GetProofCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetProofCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
Unimplemented() << "Unimplemented get-proof\n";
}
/* -------------------------------------------------------------------------- */
GetInstantiationsCommand::GetInstantiationsCommand() : d_solver(nullptr) {}
-void GetInstantiationsCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void GetInstantiationsCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetSynthSolutionCommand::GetSynthSolutionCommand() : d_solver(nullptr) {}
-void GetSynthSolutionCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void GetSynthSolutionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
api::Term GetInterpolCommand::getResult() const { return d_result; }
-void GetInterpolCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetInterpolCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
std::string GetAbductCommand::getAbductName() const { return d_name; }
api::Term GetAbductCommand::getResult() const { return d_result; }
-void GetAbductCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetAbductCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
api::Term GetQuantifierEliminationCommand::getTerm() const { return d_term; }
bool GetQuantifierEliminationCommand::getDoFull() const { return d_doFull; }
void GetQuantifierEliminationCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+ SymbolManager* sm)
{
try
{
GetUnsatAssumptionsCommand::GetUnsatAssumptionsCommand() {}
-void GetUnsatAssumptionsCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void GetUnsatAssumptionsCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetUnsatCoreCommand::GetUnsatCoreCommand() {}
-void GetUnsatCoreCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetUnsatCoreCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
/* -------------------------------------------------------------------------- */
GetAssertionsCommand::GetAssertionsCommand() {}
-void GetAssertionsCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void GetAssertionsCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
return d_status;
}
-void SetBenchmarkStatusCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SetBenchmarkStatusCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
}
std::string SetBenchmarkLogicCommand::getLogic() const { return d_logic; }
-void SetBenchmarkLogicCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SetBenchmarkLogicCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
std::string SetInfoCommand::getFlag() const { return d_flag; }
SExpr SetInfoCommand::getSExpr() const { return d_sexpr; }
-void SetInfoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void SetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
GetInfoCommand::GetInfoCommand(std::string flag) : d_flag(flag) {}
std::string GetInfoCommand::getFlag() const { return d_flag; }
-void GetInfoCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetInfoCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
std::string SetOptionCommand::getFlag() const { return d_flag; }
SExpr SetOptionCommand::getSExpr() const { return d_sexpr; }
-void SetOptionCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void SetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
GetOptionCommand::GetOptionCommand(std::string flag) : d_flag(flag) {}
std::string GetOptionCommand::getFlag() const { return d_flag; }
-void GetOptionCommand::invoke(api::Solver* solver, parser::SymbolManager* sm)
+void GetOptionCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
{
{
}
-void SetExpressionNameCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void SetExpressionNameCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
solver->getSmtEngine()->setExpressionName(d_term.getExpr(), d_name);
d_commandStatus = CommandSuccess::instance();
return d_datatypes;
}
-void DatatypeDeclarationCommand::invoke(api::Solver* solver,
- parser::SymbolManager* sm)
+void DatatypeDeclarationCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
d_commandStatus = CommandSuccess::instance();
}
class Term;
} // namespace api
-namespace parser {
class SymbolManager;
-}
-
class UnsatCore;
class SmtEngine;
class Command;
/**
* Invoke the command on the solver and symbol manager sm.
*/
- virtual void invoke(api::Solver* solver, parser::SymbolManager* sm) = 0;
+ virtual void invoke(api::Solver* solver, SymbolManager* sm) = 0;
/**
* Same as above, and prints the result to output stream out.
*/
virtual void invoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
std::ostream& out);
virtual void toStream(
public:
EmptyCommand(std::string name = "");
std::string getName() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::string getOutput() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void invoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
std::ostream& out) override;
Command* clone() const override;
api::Term getTerm() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
class CVC4_PUBLIC PushCommand : public Command
{
public:
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
class CVC4_PUBLIC PopCommand : public Command
{
public:
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
public:
DeclarationDefinitionCommand(const std::string& id);
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override = 0;
+ void invoke(api::Solver* solver, SymbolManager* sm) override = 0;
std::string getSymbol() const;
}; /* class DeclarationDefinitionCommand */
bool getPrintInModelSetByUser() const;
void setPrintInModel(bool p);
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
size_t getArity() const;
api::Sort getSort() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
const std::vector<api::Sort>& getParameters() const;
api::Sort getSort() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
const std::vector<api::Term>& getFormals() const;
api::Term getFormula() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
const std::vector<api::Term>& formals,
api::Term formula,
bool global);
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
DeclareHeapCommand(api::Sort locSort, api::Sort dataSort);
api::Sort getLocationSort() const;
api::Sort getDataSort() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
api::Term getTerm() const;
api::Result getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
const std::vector<api::Term>& getTerms() const;
api::Result getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
api::Term getTerm() const;
api::Result getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
* The declared sygus variable is communicated to the SMT engine in case a
* synthesis conjecture is built later on.
*/
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
* 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
* The declared constraint is communicated to the SMT engine in case a
* synthesis conjecture is built later on.
*/
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
* invariant constraint is built, in case an actual synthesis conjecture is
* built later on.
*/
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
* and then perform a satisfiability check, whose result is stored in
* d_result.
*/
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
/** creates a copy of this command */
Command* clone() const override;
/** returns this command's name */
api::Term getTerm() const;
api::Term getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
const std::vector<api::Term>& getTerms() const;
api::Term getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
GetAssignmentCommand();
SExpr getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
// Model is private to the library -- for now
// Model* getResult() const ;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
public:
BlockModelCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
BlockModelValuesCommand(const std::vector<api::Term>& terms);
const std::vector<api::Term>& getTerms() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
public:
GetProofCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
public:
GetInstantiationsCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
public:
GetSynthSolutionCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
* query. */
api::Term getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
*/
api::Term getResult() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
api::Term getTerm() const;
bool getDoFull() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
api::Term getResult() const;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
{
public:
GetUnsatAssumptionsCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
std::vector<api::Term> getResult() const;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
GetUnsatCoreCommand();
const std::vector<api::Term>& getUnsatCore() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
public:
GetAssertionsCommand();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, 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, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;
std::string getCommandName() const override;
public:
SetExpressionNameCommand(api::Term term, std::string name);
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
DatatypeDeclarationCommand(const std::vector<api::Sort>& datatypes);
const std::vector<api::Sort>& getDatatypes() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
{
public:
ResetCommand() {}
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
{
public:
ResetAssertionsCommand() {}
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
{
public:
QuitCommand() {}
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
std::string getComment() const;
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
Command* clone() const override;
std::string getCommandName() const override;
void toStream(
void addCommand(Command* cmd);
void clear();
- void invoke(api::Solver* solver, parser::SymbolManager* sm) override;
+ void invoke(api::Solver* solver, SymbolManager* sm) override;
void invoke(api::Solver* solver,
- parser::SymbolManager* sm,
+ SymbolManager* sm,
std::ostream& out) override;
typedef std::vector<Command*>::iterator iterator;
int runTest() {
std::unique_ptr<api::Solver> solver =
std::unique_ptr<api::Solver>(new api::Solver());
- std::unique_ptr<parser::SymbolManager> symman(
- new parser::SymbolManager(solver.get()));
+ std::unique_ptr<SymbolManager> symman(new SymbolManager(solver.get()));
psr = ParserBuilder(solver.get(), symman.get(), "internal-buffer")
.withStringInput(declarations)
.withInputLanguage(input::LANG_SMTLIB_V2)
void testGetInfo(api::Solver* solver, const char* s)
{
- std::unique_ptr<parser::SymbolManager> symman(
- new parser::SymbolManager(solver));
+ std::unique_ptr<SymbolManager> symman(new SymbolManager(solver));
ParserBuilder pb(solver, symman.get(), "<internal>", solver->getOptions());
Parser* p = pb.withStringInput(string("(get-info ") + s + ")").build();
#include "api/cvc4cpp.h"
#include "expr/expr_manager.h"
+#include "expr/symbol_manager.h"
#include "main/interactive_shell.h"
#include "options/base_options.h"
#include "options/language.h"
#include "options/options.h"
#include "parser/parser_builder.h"
-#include "parser/symbol_manager.h"
#include "smt/command.h"
using namespace CVC4;
d_options.set(options::inputLanguage, language::input::LANG_CVC4);
d_symman.reset(nullptr);
d_solver.reset(new api::Solver(&d_options));
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
}
void tearDown() override
private:
std::unique_ptr<api::Solver> d_solver;
- std::unique_ptr<parser::SymbolManager> d_symman;
+ std::unique_ptr<SymbolManager> d_symman;
Options d_options;
stringstream* d_sin;
stringstream* d_sout;
#include "base/output.h"
#include "expr/expr.h"
#include "expr/expr_manager.h"
+#include "expr/symbol_manager.h"
#include "options/base_options.h"
#include "options/language.h"
#include "options/options.h"
#include "parser/parser.h"
#include "parser/parser_builder.h"
#include "parser/smt2/smt2.h"
-#include "parser/symbol_manager.h"
#include "smt/command.h"
using namespace CVC4;
// Debug.on("parser-extra");
// cerr << "Testing good input: <<" << goodInput << ">>" << endl;
// istringstream stream(goodInputs[i]);
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
Parser* parser = ParserBuilder(d_solver.get(), d_symman.get(), "test")
.withStringInput(goodInput)
.withOptions(d_options)
// cerr << "Testing bad input: '" << badInput << "'\n";
// Debug.on("parser");
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
Parser* parser = ParserBuilder(d_solver.get(), d_symman.get(), "test")
.withStringInput(badInput)
.withOptions(d_options)
// Debug.on("parser");
// istringstream stream(context + goodBooleanExprs[i]);
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
Parser* parser = ParserBuilder(d_solver.get(), d_symman.get(), "test")
.withStringInput(goodExpr)
.withOptions(d_options)
// Debug.on("parser-extra");
// cout << "Testing bad expr: '" << badExpr << "'\n";
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
Parser* parser = ParserBuilder(d_solver.get(), d_symman.get(), "test")
.withStringInput(badExpr)
.withOptions(d_options)
private:
InputLanguage d_lang;
std::unique_ptr<api::Solver> d_solver;
- std::unique_ptr<parser::SymbolManager> d_symman;
+ std::unique_ptr<SymbolManager> d_symman;
}; /* class ParserBlack */
#include <iostream>
#include "api/cvc4cpp.h"
+#include "expr/symbol_manager.h"
#include "options/language.h"
#include "parser/parser.h"
#include "parser/parser_builder.h"
-#include "parser/symbol_manager.h"
using namespace CVC4;
using namespace CVC4::parser;
// ensure the old symbol manager is deleted
d_symman.reset(nullptr);
d_solver.reset(new api::Solver());
- d_symman.reset(new parser::SymbolManager(d_solver.get()));
+ d_symman.reset(new SymbolManager(d_solver.get()));
}
void tearDown() override {}
}
std::unique_ptr<api::Solver> d_solver;
- std::unique_ptr<parser::SymbolManager> d_symman;
+ std::unique_ptr<SymbolManager> d_symman;
}; // class ParserBuilderBlack