diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-08-25 17:19:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 00:19:41 +0000 |
commit | 71f025753f734ddade5da333dfe2d144fbc13221 (patch) | |
tree | 271e0a03b5612652d5fdb040fa2d7f43e8644aea /src/util | |
parent | 78d29da02099762374adeb694ed96c496c7e1ffc (diff) |
Consolidate language types (#7065)
This PR combines the two enums InputLanguage and OutputLanguage into a single Language type. It makes sure that AST is not used as input language using a predicate whenever the option is set.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/result.cpp | 11 | ||||
-rw-r--r-- | src/util/result.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/util/result.cpp b/src/util/result.cpp index 84e06cdb7..23f38b7ce 100644 --- a/src/util/result.cpp +++ b/src/util/result.cpp @@ -354,14 +354,13 @@ void Result::toStreamTptp(std::ostream& out) const { out << " for " << getInputName(); } -void Result::toStream(std::ostream& out, OutputLanguage language) const { +void Result::toStream(std::ostream& out, Language language) const +{ switch (language) { - case language::output::LANG_SYGUS_V2: toStreamSmt2(out); break; - case language::output::LANG_TPTP: - toStreamTptp(out); - break; + case Language::LANG_SYGUS_V2: toStreamSmt2(out); break; + case Language::LANG_TPTP: toStreamTptp(out); break; default: - if (language::isOutputLang_smt2(language)) + if (language::isLangSmt2(language)) { toStreamSmt2(out); } diff --git a/src/util/result.h b/src/util/result.h index 716c580e9..251d34548 100644 --- a/src/util/result.h +++ b/src/util/result.h @@ -122,7 +122,7 @@ class Result /** * Write a Result out to a stream in this language. */ - void toStream(std::ostream& out, OutputLanguage language) const; + void toStream(std::ostream& out, Language language) const; /** * This is mostly the same the default |