diff options
author | Tim King <taking@google.com> | 2015-12-18 17:19:07 -0800 |
---|---|---|
committer | Tim King <taking@google.com> | 2015-12-18 17:19:07 -0800 |
commit | 5f207ba01302c3245e169bfbe2ed91ad0cd659cd (patch) | |
tree | e1131e8c2891e283ab028fba6a7a677bb4ac9f5f /test | |
parent | 7e4468ba0aa0b08eeb4ba1a86b1fdd839ae169d6 (diff) |
Modifying emptyset.h and sexpr. Adding SetLanguage.
- Modifies expr/emptyset.h to use SetType only as an incomplete type within expr/emptyset.h. This breaks the include cycle between expr/emptyset.h, expr/expr.h and expr/type.h.
- Refactors SExpr to avoid a potentially infinite cycle. This is likely overkill, but it works.
- Moving Expr::setlanguage and related utilities out of the Expr class and into their own file. This allows files in util/ to know the output language set on an ostream.
Diffstat (limited to 'test')
-rw-r--r-- | test/system/ouroborous.cpp | 3 | ||||
-rw-r--r-- | test/system/smt2_compliance.cpp | 3 | ||||
-rw-r--r-- | test/unit/util/boolean_simplification_black.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/test/system/ouroborous.cpp b/test/system/ouroborous.cpp index fd06517a9..dd6cbccb8 100644 --- a/test/system/ouroborous.cpp +++ b/test/system/ouroborous.cpp @@ -29,6 +29,7 @@ #include <string> #include "expr/expr.h" +#include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt_util/command.h" @@ -69,7 +70,7 @@ string translate(string in, InputLanguage inlang, OutputLanguage outlang) { psr->setInput(Input::newStringInput(inlang, in, "internal-buffer")); Expr e = psr->nextExpression(); stringstream ss; - ss << Expr::setlanguage(outlang) << Expr::setdepth(-1) << e; + ss << language::SetLanguage(outlang) << Expr::setdepth(-1) << e; assert(psr->nextExpression().isNull());// next expr should be null assert(psr->done());// parser should be done string s = ss.str(); diff --git a/test/system/smt2_compliance.cpp b/test/system/smt2_compliance.cpp index 108e30b5c..99b4c625c 100644 --- a/test/system/smt2_compliance.cpp +++ b/test/system/smt2_compliance.cpp @@ -19,6 +19,7 @@ #include <sstream> #include "expr/expr_manager.h" +#include "options/set_language.h" #include "options/smt_options.h" #include "parser/parser.h" #include "parser/parser_builder.h" @@ -36,7 +37,7 @@ int main() { opts.set(options::inputLanguage, language::input::LANG_SMTLIB_V2); opts.set(options::outputLanguage, language::output::LANG_SMTLIB_V2); - cout << Expr::setlanguage(language::output::LANG_SMTLIB_V2); + cout << language::SetLanguage(language::output::LANG_SMTLIB_V2); ExprManager em(opts); SmtEngine smt(&em); diff --git a/test/unit/util/boolean_simplification_black.h b/test/unit/util/boolean_simplification_black.h index ac343ede8..355d4ff37 100644 --- a/test/unit/util/boolean_simplification_black.h +++ b/test/unit/util/boolean_simplification_black.h @@ -22,6 +22,7 @@ #include "expr/node.h" #include "expr/node_manager.h" #include "options/language.h" +#include "options/set_language.h" #include "smt_util/boolean_simplification.h" using namespace CVC4; @@ -102,7 +103,7 @@ public: BooleanSimplification::DUPLICATE_REMOVAL_THRESHOLD); cout << Expr::setdepth(-1) - << Expr::setlanguage(language::output::LANG_CVC4); + << language::SetLanguage(language::output::LANG_CVC4); } void tearDown() { |