diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2014-10-23 03:11:18 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2014-10-23 19:40:41 -0400 |
commit | c6436566dec99c0ed6794fa34b9b67a7e47918b0 (patch) | |
tree | 5555462cd38a49a9b6bed760d7af728d59371ee4 /src/options | |
parent | 1c8d1d7c5831baebc0a59a7dcf36f942504e5556 (diff) |
Parsing and infrastructure support for SMT-LIBv2.5 input and output languages.
* support for new commands meta-info, declare-const, echo, get-model,
reset, and reset-assertions
* support for set-option :global-declarations
* support for set-option :produce-assertions
* support for set-option :reproducible-resource-limit
* support for get-info :assertion-stack-levels
* support for set-info :smt-lib-version 2.5
* ascribe types for abstract values (the new 2.5 standard clarifies that
this is required)
* SMT-LIB v2.5 string literals (we still support 2.0 string literals when
in 2.0 mode)
What's still to do:
* check-sat-assumptions/get-unsat-assumptions (still being hotly debated).
Also set-option :produce-unsat-assumptions.
* define-fun-rec doesn't allow mutual recursion
* All options should be restored to defaults with (reset) command.
(Currently :incremental and maybe others get "stuck" due to late driver
integration.)
Diffstat (limited to 'src/options')
-rw-r--r-- | src/options/options.h | 2 | ||||
-rw-r--r-- | src/options/options_template.cpp | 24 |
2 files changed, 20 insertions, 6 deletions
diff --git a/src/options/options.h b/src/options/options.h index b41c9a66e..092fbe507 100644 --- a/src/options/options.h +++ b/src/options/options.h @@ -69,6 +69,8 @@ public: Options(const Options& options); ~Options(); + Options& operator=(const Options& options); + /** * Set the value of the given option. Use of this default * implementation causes a compile-time error; write-able diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index bd723e380..f6c6846e5 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -226,6 +226,14 @@ Options::~Options() { delete d_holder; } +Options& Options::operator=(const Options& options) { + if(this != &options) { + delete d_holder; + d_holder = new options::OptionsHolder(*options.d_holder); + } + return *this; +} + options::OptionsHolder::OptionsHolder() : ${all_modules_defaults} { } @@ -253,7 +261,9 @@ Languages currently supported as arguments to the -L / --lang option:\n\ auto attempt to automatically determine language\n\ cvc4 | presentation | pl CVC4 presentation language\n\ smt1 | smtlib1 SMT-LIB format 1.2\n\ - smt | smtlib | smt2 | smtlib2 SMT-LIB format 2.0\n\ + smt | smtlib | smt2 |\n\ + smt2.0 | smtlib2 | smtlib2.0 SMT-LIB format 2.0\n\ + smt2.5 | smtlib2.5 SMT-LIB format 2.5\n\ tptp TPTP format (cnf and fof)\n\ \n\ Languages currently supported as arguments to the --output-lang option:\n\ @@ -261,7 +271,9 @@ Languages currently supported as arguments to the --output-lang option:\n\ cvc4 | presentation | pl CVC4 presentation language\n\ cvc3 CVC3 presentation language\n\ smt1 | smtlib1 SMT-LIB format 1.2\n\ - smt | smtlib | smt2 | smtlib2 SMT-LIB format 2.0\n\ + smt | smtlib | smt2 |\n\ + smt2.0 | smtlib2.0 | smtlib2 SMT-LIB format 2.0\n\ + smt2.5 | smtlib2.5 SMT-LIB format 2.5\n\ z3str SMT-LIB 2.0 with Z3-str string constraints\n\ tptp TPTP format\n\ ast internal format (simple syntax trees)\n\ @@ -314,7 +326,7 @@ static struct option cmdlineOptions[] = {${all_modules_long_options} { NULL, no_argument, NULL, '\0' } };/* cmdlineOptions */ -#line 318 "${template}" +#line 322 "${template}" static void preemptGetopt(int& argc, char**& argv, const char* opt) { const size_t maxoptlen = 128; @@ -507,7 +519,7 @@ std::vector<std::string> Options::parseOptions(int argc, char* main_argv[]) thro switch(c) { ${all_modules_option_handlers} -#line 511 "${template}" +#line 515 "${template}" case ':': // This can be a long or short option, and the way to get at the @@ -576,7 +588,7 @@ std::string Options::suggestCommandLineOptions(const std::string& optionName) th static const char* smtOptions[] = { ${all_modules_smt_options}, -#line 580 "${template}" +#line 584 "${template}" NULL };/* smtOptions[] */ @@ -598,7 +610,7 @@ SExpr Options::getOptions() const throw() { ${all_modules_get_options} -#line 602 "${template}" +#line 606 "${template}" return SExpr(opts); } |