diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-07-17 17:37:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 17:37:03 +0200 |
commit | 0834e9e263b1ecd014ef347d0f080ac1505fdcb4 (patch) | |
tree | 60ab31a4769f75c1bd0e29590fe2ae9a30da0c9b /src/options/options_handler.cpp | |
parent | 20c1eb502d1b9f2b19419ec925e306744d9e53bf (diff) |
sygusComp2018: update policies for solution reconstruction (#2109)
Diffstat (limited to 'src/options/options_handler.cpp')
-rw-r--r-- | src/options/options_handler.cpp | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/src/options/options_handler.cpp b/src/options/options_handler.cpp index 2b1d72802..8f179531b 100644 --- a/src/options/options_handler.cpp +++ b/src/options/options_handler.cpp @@ -489,6 +489,30 @@ all \n\ \n\ "; +const std::string OptionsHandler::s_cegqiSingleInvRconsHelp = + "\ +Modes for reconstruction solutions while using single invocation techniques,\ +supported by --cegqi-si-rcons:\n\ +\n\ +none \n\ ++ Do not try to reconstruct solutions in the original (user-provided) grammar\ + when using single invocation techniques. In this mode, solutions produced by\ + CVC4 may violate grammar restrictions.\n\ +\n\ +try \n\ ++ Try to reconstruct solutions in the original grammar when using single\ + invocation techniques in an incomplete (fail-fast) manner.\n\ +\n\ +all-limit \n\ ++ Try to reconstruct solutions in the original grammar, but termintate if a\ + maximum number of rounds for reconstruction is exceeded.\n\ +\n\ +all \n\ ++ Try to reconstruct solutions in the original grammar. In this mode,\ + we do not terminate until a solution is successfully reconstructed. \n\ +\n\ +"; + const std::string OptionsHandler::s_cegisSampleHelp = "\ Modes for sampling with counterexample-guided inductive synthesis (CEGIS),\ @@ -878,8 +902,6 @@ OptionsHandler::stringToCegqiSingleInvMode(std::string option, return theory::quantifiers::CEGQI_SI_MODE_NONE; } else if(optarg == "use" || optarg == "default") { return theory::quantifiers::CEGQI_SI_MODE_USE; - } else if(optarg == "all-abort") { - return theory::quantifiers::CEGQI_SI_MODE_ALL_ABORT; } else if(optarg == "all") { return theory::quantifiers::CEGQI_SI_MODE_ALL; } else if(optarg == "help") { @@ -891,6 +913,38 @@ OptionsHandler::stringToCegqiSingleInvMode(std::string option, } } +theory::quantifiers::CegqiSingleInvRconsMode +OptionsHandler::stringToCegqiSingleInvRconsMode(std::string option, + std::string optarg) +{ + if (optarg == "none") + { + return theory::quantifiers::CEGQI_SI_RCONS_MODE_NONE; + } + else if (optarg == "try") + { + return theory::quantifiers::CEGQI_SI_RCONS_MODE_TRY; + } + else if (optarg == "all") + { + return theory::quantifiers::CEGQI_SI_RCONS_MODE_ALL; + } + else if (optarg == "all-limit") + { + return theory::quantifiers::CEGQI_SI_RCONS_MODE_ALL_LIMIT; + } + else if (optarg == "help") + { + puts(s_cegqiSingleInvRconsHelp.c_str()); + exit(1); + } + else + { + throw OptionException(std::string("unknown option for --cegqi-si-rcons: `") + + optarg + "'. Try --cegqi-si-rcons help."); + } +} + theory::quantifiers::CegisSampleMode OptionsHandler::stringToCegisSampleMode( std::string option, std::string optarg) { |