When giving an SMT-LIB version, defaulting to SMT-LIB 2.6 (#6171)
authorHaniel Barbosa <hanielbbarbosa@gmail.com>
Thu, 18 Mar 2021 21:57:11 +0000 (18:57 -0300)
committerGitHub <noreply@github.com>
Thu, 18 Mar 2021 21:57:11 +0000 (21:57 +0000)
Warning if not a supported version.

src/smt/smt_engine.cpp

index 4436666a7e6402f1469e4eccb34f1201a615affb..8ec594faa6f72f73856a9e59b9390eba0001c8c5 100644 (file)
@@ -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())