*/
#include "main/main.h"
-#include <stdio.h>
-#include <unistd.h>
-
-#include <cstdlib>
-#include <cstring>
-#include <fstream>
#include <iostream>
#include "api/cpp/cvc5.h"
#include "base/configuration.h"
-#include "base/output.h"
#include "main/command_executor.h"
-#include "main/interactive_shell.h"
-#include "options/base_options.h"
-#include "options/language.h"
#include "options/option_exception.h"
-#include "options/options.h"
-#include "parser/parser.h"
-#include "parser/parser_builder.h"
-#include "parser/parser_exception.h"
-#include "util/result.h"
-using namespace std;
using namespace cvc5;
-using namespace cvc5::main;
-using namespace cvc5::language;
/**
- * cvc5's main() routine is just an exception-safe wrapper around cvc5.
- * Please don't construct anything here. Even if the constructor is
- * inside the try { }, an exception during destruction can cause
- * problems. That's why main() wraps runCvc5() in the first place.
- * Put everything in runCvc5().
+ * cvc5's main() routine is just an exception-safe wrapper around runCvc5.
*/
int main(int argc, char* argv[])
{
- std::unique_ptr<api::Solver> solver;
+ std::unique_ptr<api::Solver> solver = std::make_unique<api::Solver>();
try
{
- solver = std::make_unique<api::Solver>();
return runCvc5(argc, argv, solver);
}
catch (cvc5::api::CVC5ApiOptionException& e)
#ifdef CVC5_COMPETITION_MODE
solver->getDriverOptions().out() << "unknown" << std::endl;
#endif
- cerr << "(error \"" << e.getMessage() << "\")" << endl
- << endl
- << "Please use --help to get help on command-line options." << endl;
+ std::cerr << "(error \"" << e.getMessage() << "\")" << std::endl
+ << std::endl
+ << "Please use --help to get help on command-line options."
+ << std::endl;
}
catch (OptionException& e)
{
#ifdef CVC5_COMPETITION_MODE
solver->getDriverOptions().out() << "unknown" << std::endl;
#endif
- cerr << "(error \"" << e.getMessage() << "\")" << endl
- << endl
- << "Please use --help to get help on command-line options." << endl;
+ std::cerr << "(error \"" << e.getMessage() << "\")" << std::endl
+ << std::endl
+ << "Please use --help to get help on command-line options."
+ << std::endl;
}
catch (Exception& e)
{
if (solver->getOptionInfo("stats").boolValue()
&& main::pExecutor != nullptr)
{
- pExecutor->printStatistics(solver->getDriverOptions().err());
+ main::pExecutor->printStatistics(solver->getDriverOptions().err());
}
}
exit(1);
### Allowed attributes for module/option
MODULE_ATTR_REQ = ['id', 'name']
-MODULE_ATTR_ALL = MODULE_ATTR_REQ + ['option', 'public']
+MODULE_ATTR_ALL = MODULE_ATTR_REQ + ['option']
OPTION_ATTR_REQ = ['category', 'type']
OPTION_ATTR_ALL = OPTION_ATTR_REQ + [
help=help_mode_format(option),
long=option.long.split('=')[0]))
- if module.public:
- visibility_include = '#include "cvc5_public.h"'
- else:
- visibility_include = '#include "cvc5_private.h"'
-
data = {
- 'visibility_include': visibility_include,
'id_cap': module.id_cap,
'id': module.id,
'includes': '\n'.join(sorted(list(includes))),