diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-05-29 05:43:20 -0700 |
---|---|---|
committer | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-05-29 07:43:20 -0500 |
commit | 6059866b361d0852d0b70d484b0cb397f3cc5bf4 (patch) | |
tree | a06379fe4b368addd94db16261b4ff6004e3b482 /src/parser/smt2/smt2.h | |
parent | 74c1ad7e4a8e93316b7555ac8a1b88ee777335e2 (diff) |
Track input language in a single place (#2003)
Diffstat (limited to 'src/parser/smt2/smt2.h')
-rw-r--r-- | src/parser/smt2/smt2.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/parser/smt2/smt2.h b/src/parser/smt2/smt2.h index e9e36e78c..09f7a5696 100644 --- a/src/parser/smt2/smt2.h +++ b/src/parser/smt2/smt2.h @@ -153,7 +153,7 @@ public: const LogicInfo& getLogic() const { return d_logic; } bool v2_0() const { - return getInput()->getLanguage() == language::input::LANG_SMTLIB_V2_0; + return getLanguage() == language::input::LANG_SMTLIB_V2_0; } /** * Are we using smtlib 2.5 or above? If exact=true, then this method returns @@ -161,7 +161,7 @@ public: */ bool v2_5(bool exact = false) const { - return language::isInputLang_smt2_5(getInput()->getLanguage(), exact); + return language::isInputLang_smt2_5(getLanguage(), exact); } /** * Are we using smtlib 2.6 or above? If exact=true, then this method returns @@ -169,13 +169,9 @@ public: */ bool v2_6(bool exact = false) const { - return language::isInputLang_smt2_6(getInput()->getLanguage(), exact); + return language::isInputLang_smt2_6(getLanguage(), exact); } - bool sygus() const { - return getInput()->getLanguage() == language::input::LANG_SYGUS; - } - - void setLanguage(InputLanguage lang); + bool sygus() const { return getLanguage() == language::input::LANG_SYGUS; } void setInfo(const std::string& flag, const SExpr& sexpr); @@ -396,6 +392,8 @@ private: void addFloatingPointOperators(); void addSepOperators(); + + InputLanguage getLanguage() const; };/* class Smt2 */ }/* CVC4::parser namespace */ |