From f5c1740fed59fc200e439fe1fcf230b0ed7081ac Mon Sep 17 00:00:00 2001 From: Haniel Barbosa Date: Thu, 18 Mar 2021 18:57:11 -0300 Subject: [PATCH] When giving an SMT-LIB version, defaulting to SMT-LIB 2.6 (#6171) Warning if not a supported version. --- src/smt/smt_engine.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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()) -- 2.30.2