From: Haniel Barbosa Date: Thu, 18 Mar 2021 21:57:11 +0000 (-0300) Subject: When giving an SMT-LIB version, defaulting to SMT-LIB 2.6 (#6171) X-Git-Tag: cvc5-1.0.0~2055 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5c1740fed59fc200e439fe1fcf230b0ed7081ac;p=cvc5.git When giving an SMT-LIB version, defaulting to SMT-LIB 2.6 (#6171) Warning if not a supported version. --- diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index 4436666a7..8ec594faa 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -462,13 +462,14 @@ void SmtEngine::setInfo(const std::string& key, const std::string& value) } else if (key == "smt-lib-version" && !options::inputLanguage.wasSetByUser()) { - language::input::Language ilang = language::input::LANG_AUTO; + language::input::Language ilang = language::input::LANG_SMTLIB_V2_6; - if (value == "2.6") + if (value != "2" && value != "2.6") { - ilang = language::input::LANG_SMTLIB_V2_6; + Warning() << "SMT-LIB version " << value + << " unsupported, defaulting to language (and semantics of) " + "SMT-LIB 2.6\n"; } - options::inputLanguage.set(ilang); // also update the output language if (!options::outputLanguage.wasSetByUser())