diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2014-08-25 18:40:06 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2014-08-26 15:20:32 -0400 |
commit | 525e7328cad1ac8afbc60ed8103e06665cf5b163 (patch) | |
tree | 61d8f46addfa6e76b233b234025df9bf54f7aea1 /src/util/unsat_core.cpp | |
parent | 34a27e2fef540ee3d90c43f771397e0e9ce3fef9 (diff) |
Improved SMT-LIBv2 language support for unsat cores.
Diffstat (limited to 'src/util/unsat_core.cpp')
-rw-r--r-- | src/util/unsat_core.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/util/unsat_core.cpp b/src/util/unsat_core.cpp index 6344b3eda..929d5e909 100644 --- a/src/util/unsat_core.cpp +++ b/src/util/unsat_core.cpp @@ -30,15 +30,19 @@ UnsatCore::const_iterator UnsatCore::end() const { } void UnsatCore::toStream(std::ostream& out) const { - for(UnsatCore::const_iterator i = begin(); i != end(); ++i) { - out << AssertCommand(*i) << std::endl; - } + smt::SmtScope smts(d_smt); + Expr::dag::Scope scope(out, false); + Printer::getPrinter(options::outputLanguage())->toStream(out, *this); } -std::ostream& operator<<(std::ostream& out, const UnsatCore& core) { - smt::SmtScope smts(core.d_smt); +void UnsatCore::toStream(std::ostream& out, const std::map<Expr, std::string>& names) const { + smt::SmtScope smts(d_smt); Expr::dag::Scope scope(out, false); - Printer::getPrinter(options::outputLanguage())->toStream(out, core); + Printer::getPrinter(options::outputLanguage())->toStream(out, *this, names); +} + +std::ostream& operator<<(std::ostream& out, const UnsatCore& core) { + core.toStream(out); return out; } |