diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2021-03-31 15:23:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 22:23:17 +0000 |
commit | a1466978fbc328507406d4a121dab4d1a1047e1d (patch) | |
tree | 12b40f161bb4d7a6ee40c20c78a15d6cda3c1995 /src/main | |
parent | f9a9af855fb65804ff0b36e764ccd9d0fa9f87f8 (diff) |
Rename namespace CVC4 to CVC5. (#6249)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/command_executor.cpp | 6 | ||||
-rw-r--r-- | src/main/command_executor.h | 13 | ||||
-rw-r--r-- | src/main/driver_unified.cpp | 63 | ||||
-rw-r--r-- | src/main/interactive_shell.cpp | 4 | ||||
-rw-r--r-- | src/main/interactive_shell.h | 6 | ||||
-rw-r--r-- | src/main/main.cpp | 6 | ||||
-rw-r--r-- | src/main/main.h | 14 | ||||
-rw-r--r-- | src/main/signal_handlers.cpp | 6 | ||||
-rw-r--r-- | src/main/signal_handlers.h | 4 | ||||
-rw-r--r-- | src/main/time_limit.cpp | 4 | ||||
-rw-r--r-- | src/main/time_limit.h | 4 |
11 files changed, 65 insertions, 65 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp index 551880b98..ebe51f359 100644 --- a/src/main/command_executor.cpp +++ b/src/main/command_executor.cpp @@ -26,7 +26,7 @@ #include "main/main.h" #include "smt/command.h" -namespace CVC4 { +namespace CVC5 { namespace main { // Function to cancel any (externally-imposed) limit on CPU time. @@ -331,5 +331,5 @@ void CommandExecutor::flushOutputStreams() { d_options.flushErr(); } -}/* CVC4::main namespace */ -}/* CVC4 namespace */ +} // namespace main +} // namespace CVC5 diff --git a/src/main/command_executor.h b/src/main/command_executor.h index 0dea41383..a2dc4a4e9 100644 --- a/src/main/command_executor.h +++ b/src/main/command_executor.h @@ -24,7 +24,7 @@ #include "smt/smt_engine.h" #include "util/statistics_registry.h" -namespace CVC4 { +namespace CVC5 { class Command; @@ -65,9 +65,10 @@ class CommandExecutor * sequence. Eventually uses doCommandSingleton (which can be * overridden by a derived class). */ - bool doCommand(CVC4::Command* cmd); + bool doCommand(CVC5::Command* cmd); - bool doCommand(std::unique_ptr<CVC4::Command>& cmd) { + bool doCommand(std::unique_ptr<CVC5::Command>& cmd) + { return doCommand(cmd.get()); } @@ -100,7 +101,7 @@ class CommandExecutor protected: /** Executes treating cmd as a singleton */ - virtual bool doCommandSingleton(CVC4::Command* cmd); + virtual bool doCommandSingleton(CVC5::Command* cmd); private: CommandExecutor(); @@ -112,7 +113,7 @@ bool solverInvoke(api::Solver* solver, Command* cmd, std::ostream* out); -}/* CVC4::main namespace */ -}/* CVC4 namespace */ +} // namespace main +} // namespace CVC5 #endif /* CVC4__MAIN__COMMAND_EXECUTOR_H */ diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index 2bca01e08..40ed674c0 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -41,40 +41,39 @@ #include "util/result.h" using namespace std; -using namespace CVC4; -using namespace CVC4::parser; -using namespace CVC4::main; +using namespace CVC5; +using namespace CVC5::parser; +using namespace CVC5::main; -namespace CVC4 { - namespace main { - /** Global options variable */ - thread_local Options* pOptions; +namespace CVC5 { +namespace main { +/** Global options variable */ +thread_local Options* pOptions; - /** Full argv[0] */ - const char *progPath; +/** Full argv[0] */ +const char* progPath; - /** Just the basename component of argv[0] */ - const std::string *progName; +/** Just the basename component of argv[0] */ +const std::string* progName; - /** A pointer to the CommandExecutor (the signal handlers need it) */ - std::unique_ptr<CVC4::main::CommandExecutor> pExecutor; +/** A pointer to the CommandExecutor (the signal handlers need it) */ +std::unique_ptr<CVC5::main::CommandExecutor> pExecutor; - /** The time point the binary started, accessible to signal handlers */ - std::unique_ptr<TotalTimer> totalTime; +/** The time point the binary started, accessible to signal handlers */ +std::unique_ptr<TotalTimer> totalTime; - TotalTimer::~TotalTimer() - { - if (pExecutor != nullptr) - { - auto duration = std::chrono::steady_clock::now() - d_start; - pExecutor->getSmtEngine()->setTotalTimeStatistic( - std::chrono::duration<double>(duration).count()); - } +TotalTimer::~TotalTimer() +{ + if (pExecutor != nullptr) + { + auto duration = std::chrono::steady_clock::now() - d_start; + pExecutor->getSmtEngine()->setTotalTimeStatistic( + std::chrono::duration<double>(duration).count()); + } } - }/* CVC4::main namespace */ -}/* CVC4 namespace */ - + } // namespace main + } // namespace CVC5 void printUsage(Options& opts, bool full) { stringstream ss; @@ -176,12 +175,12 @@ int runCvc4(int argc, char* argv[], Options& opts) { // Determine which messages to show based on smtcomp_mode and verbosity if(Configuration::isMuzzledBuild()) { - DebugChannel.setStream(&CVC4::null_os); - TraceChannel.setStream(&CVC4::null_os); - NoticeChannel.setStream(&CVC4::null_os); - ChatChannel.setStream(&CVC4::null_os); - MessageChannel.setStream(&CVC4::null_os); - WarningChannel.setStream(&CVC4::null_os); + DebugChannel.setStream(&CVC5::null_os); + TraceChannel.setStream(&CVC5::null_os); + NoticeChannel.setStream(&CVC5::null_os); + ChatChannel.setStream(&CVC5::null_os); + MessageChannel.setStream(&CVC5::null_os); + WarningChannel.setStream(&CVC5::null_os); } // important even for muzzled builds (to get result output right) diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index 4fe8d4da9..91b3d53b3 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -49,7 +49,7 @@ using namespace std; -namespace CVC4 { +namespace CVC5 { using namespace parser; using namespace language; @@ -432,4 +432,4 @@ char* commandGenerator(const char* text, int state) { #endif /* HAVE_LIBEDITLINE */ -}/* CVC4 namespace */ +} // namespace CVC5 diff --git a/src/main/interactive_shell.h b/src/main/interactive_shell.h index b3c54f580..2c421d7b2 100644 --- a/src/main/interactive_shell.h +++ b/src/main/interactive_shell.h @@ -22,7 +22,7 @@ #include "options/options.h" #include "util/unsafe_interrupt_exception.h" -namespace CVC4 { +namespace CVC5 { class Command; class Options; @@ -33,7 +33,7 @@ class Solver; namespace parser { class Parser; -}/* CVC4::parser namespace */ + } // namespace parser class SymbolManager; @@ -72,6 +72,6 @@ public: };/* class InteractiveShell */ -}/* CVC4 namespace */ +} // namespace CVC5 #endif /* CVC4__INTERACTIVE_SHELL_H */ diff --git a/src/main/main.cpp b/src/main/main.cpp index 65b341a12..f880d5ee1 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -34,9 +34,9 @@ #include "util/result.h" using namespace std; -using namespace CVC4; -using namespace CVC4::main; -using namespace CVC4::language; +using namespace CVC5; +using namespace CVC5::main; +using namespace CVC5::language; /** * CVC4's main() routine is just an exception-safe wrapper around CVC4. diff --git a/src/main/main.h b/src/main/main.h index 518145577..47312c465 100644 --- a/src/main/main.h +++ b/src/main/main.h @@ -26,7 +26,7 @@ #ifndef CVC4__MAIN__MAIN_H #define CVC4__MAIN__MAIN_H -namespace CVC4 { +namespace CVC5 { namespace main { class CommandExecutor; @@ -38,7 +38,7 @@ extern const char* progPath; extern const std::string* progName; /** A reference for use by the signal handlers to print statistics */ -extern std::unique_ptr<CVC4::main::CommandExecutor> pExecutor; +extern std::unique_ptr<CVC5::main::CommandExecutor> pExecutor; /** Manages a custom timer for the total runtime in RAII-style. */ class TotalTimer @@ -64,18 +64,18 @@ extern bool segvSpin; extern thread_local Options* pOptions; /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. - * This can throw a CVC4::Exception. + * This can throw a CVC5::Exception. */ void cvc4_init(); /** Shutdown the driver. Frees memory for the signal handlers. */ void cvc4_shutdown() noexcept; -}/* CVC4::main namespace */ -}/* CVC4 namespace */ +} // namespace main +} // namespace CVC5 /** Actual Cvc4 driver functions **/ -int runCvc4(int argc, char* argv[], CVC4::Options&); -void printUsage(CVC4::Options&, bool full = false); +int runCvc4(int argc, char* argv[], CVC5::Options&); +void printUsage(CVC5::Options&, bool full = false); #endif /* CVC4__MAIN__MAIN_H */ diff --git a/src/main/signal_handlers.cpp b/src/main/signal_handlers.cpp index 93014b256..a7a3a073c 100644 --- a/src/main/signal_handlers.cpp +++ b/src/main/signal_handlers.cpp @@ -41,10 +41,10 @@ #include "smt/smt_engine.h" #include "util/safe_print.h" -using CVC4::Exception; +using CVC5::Exception; using namespace std; -namespace CVC4 { +namespace CVC5 { namespace main { /** @@ -343,4 +343,4 @@ void cleanup() noexcept } // namespace signal_handlers } // namespace main -} // namespace CVC4 +} // namespace CVC5 diff --git a/src/main/signal_handlers.h b/src/main/signal_handlers.h index c313b7747..1312ca27d 100644 --- a/src/main/signal_handlers.h +++ b/src/main/signal_handlers.h @@ -17,7 +17,7 @@ #ifndef CVC4__MAIN__SIGNAL_HANDLERS_H #define CVC4__MAIN__SIGNAL_HANDLERS_H -namespace CVC4 { +namespace CVC5 { namespace main { namespace signal_handlers { @@ -41,6 +41,6 @@ void cleanup(); } // namespace signal_handlers } // namespace main -} // namespace CVC4 +} // namespace CVC5 #endif /* CVC4__MAIN__SIGNAL_HANDLERS_H */ diff --git a/src/main/time_limit.cpp b/src/main/time_limit.cpp index fd7164d2c..7f2bc0c61 100644 --- a/src/main/time_limit.cpp +++ b/src/main/time_limit.cpp @@ -58,7 +58,7 @@ #include "signal_handlers.h" -namespace CVC4 { +namespace CVC5 { namespace main { #if HAVE_SETITIMER @@ -133,4 +133,4 @@ TimeLimit install_time_limit(const Options& opts) } } // namespace main -} // namespace CVC4 +} // namespace CVC5 diff --git a/src/main/time_limit.h b/src/main/time_limit.h index 4f7425839..62dc6a6a3 100644 --- a/src/main/time_limit.h +++ b/src/main/time_limit.h @@ -19,7 +19,7 @@ #include "options/options.h" -namespace CVC4 { +namespace CVC5 { namespace main { /** @@ -47,6 +47,6 @@ struct TimeLimit TimeLimit install_time_limit(const Options& opts); } // namespace main -} // namespace CVC4 +} // namespace CVC5 #endif /* CVC4__MAIN__TIME_LIMIT_H */ |