summaryrefslogtreecommitdiff
path: root/src/options/options_handler.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-17 13:38:50 -0500
committerGitHub <noreply@github.com>2020-07-17 13:38:50 -0500
commitf99889b0c1260fccf28daac995e58312912bae9f (patch)
treec9bba127e62aedef587ee7da83950281a4c131f4 /src/options/options_handler.cpp
parente8df6f67cc2654f50d49995377a4b411668235e1 (diff)
Replace options listener infrastructure (#4764)
This replaces the old options listener infrastructure with the OptionsManager introduced in cb8d041. It eliminates a "beforeSearchListener", which was a custom way of some options throwing a modal exception if they were set after initialization. Now all options are consistent: no option can be set after initialization. It also moves managed ostream objects to the OptionsManager. @mpreiner The next step will be to remove the "notifies" field from the Options build system and then proceed with cleaning src/options/.
Diffstat (limited to 'src/options/options_handler.cpp')
-rw-r--r--src/options/options_handler.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/options/options_handler.cpp b/src/options/options_handler.cpp
index 40f9b898e..b752bfdda 100644
--- a/src/options/options_handler.cpp
+++ b/src/options/options_handler.cpp
@@ -69,17 +69,6 @@ void throwLazyBBUnsupported(options::SatSolverMode m)
OptionsHandler::OptionsHandler(Options* options) : d_options(options) { }
-void OptionsHandler::notifyBeforeSearch(const std::string& option)
-{
- try{
- d_options->d_beforeSearchListeners.notify();
- } catch (ModalException&){
- std::stringstream ss;
- ss << "cannot change option `" << option << "' after final initialization";
- throw ModalException(ss.str());
- }
-}
-
unsigned long OptionsHandler::limitHandler(std::string option,
std::string optarg)
{
@@ -92,12 +81,6 @@ unsigned long OptionsHandler::limitHandler(std::string option,
}
return ms;
}
-
-/* options/base_options_handlers.h */
-void OptionsHandler::notifyPrintSuccess(std::string option) {
- d_options->d_setPrintSuccessListeners.notify();
-}
-
// theory/quantifiers/options_handlers.h
void OptionsHandler::checkInstWhenMode(std::string option, InstWhenMode mode)
@@ -310,19 +293,6 @@ void OptionsHandler::LFSCEnabledBuild(std::string option, bool value) {
#endif /* CVC4_USE_LFSC */
}
-void OptionsHandler::notifyDumpToFile(std::string option) {
- d_options->d_dumpToFileListeners.notify();
-}
-
-
-void OptionsHandler::notifySetRegularOutputChannel(std::string option) {
- d_options->d_setRegularChannelListeners.notify();
-}
-
-void OptionsHandler::notifySetDiagnosticOutputChannel(std::string option) {
- d_options->d_setDiagnosticChannelListeners.notify();
-}
-
void OptionsHandler::statsEnabledBuild(std::string option, bool value)
{
#ifndef CVC4_STATISTICS_ON
@@ -338,12 +308,6 @@ void OptionsHandler::threadN(std::string option) {
throw OptionException(option + " is not a real option by itself. Use e.g. --thread0=\"--random-seed=10 --random-freq=0.02\" --thread1=\"--random-seed=20 --random-freq=0.05\"");
}
-void OptionsHandler::notifyDumpMode(std::string option)
-{
- d_options->d_setDumpModeListeners.notify();
-}
-
-
// expr/options_handlers.h
void OptionsHandler::setDefaultExprDepthPredicate(std::string option, int depth) {
if(depth < -1) {
@@ -357,19 +321,6 @@ void OptionsHandler::setDefaultDagThreshPredicate(std::string option, int dag) {
}
}
-void OptionsHandler::notifySetDefaultExprDepth(std::string option) {
- d_options->d_setDefaultExprDepthListeners.notify();
-}
-
-void OptionsHandler::notifySetDefaultDagThresh(std::string option) {
- d_options->d_setDefaultDagThreshListeners.notify();
-}
-
-void OptionsHandler::notifySetPrintExprTypes(std::string option) {
- d_options->d_setPrintExprTypesListeners.notify();
-}
-
-
// main/options_handlers.h
static void print_config (const char * str, std::string config) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback