summaryrefslogtreecommitdiff
path: root/src/printer
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-11-17 04:05:17 +0000
committerMorgan Deters <mdeters@gmail.com>2012-11-17 04:05:17 +0000
commit44498017455cce207bf9cb0a1ebbf67c4a4d77cf (patch)
tree18f0bf80ea93cfd1f0e49cf38b7f0baf2d457285 /src/printer
parentdb35c4be8bd37746e1c27e446291c82556df1d05 (diff)
* Fix for bug 445 agreed to in meeting 11/13/2012: always dump in ALL_SUPPORTED logic
* Java bindings fixes: fixed access to ostreams, iterators * Make SmtEngine::setUserAttribute() (and others) take a const string& * Also a few compliance fixes (this commit was certified error- and warning-free by the test-and-commit script.)
Diffstat (limited to 'src/printer')
-rw-r--r--src/printer/cvc/cvc_printer.cpp2
-rw-r--r--src/printer/smt2/smt2_printer.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp
index 8476b6239..f190b81bf 100644
--- a/src/printer/cvc/cvc_printer.cpp
+++ b/src/printer/cvc/cvc_printer.cpp
@@ -939,7 +939,7 @@ static void toStream(std::ostream& out, const SetBenchmarkStatusCommand* c) thro
}
static void toStream(std::ostream& out, const SetBenchmarkLogicCommand* c) throw() {
- out << "% (set-logic " << c->getLogic() << ")";
+ out << "OPTION \"logic\" \"" << c->getLogic() << "\";";
}
static void toStream(std::ostream& out, const SetInfoCommand* c) throw() {
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index bf222d189..c3fb3b782 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -791,7 +791,13 @@ static void toStream(std::ostream& out, const DatatypeDeclarationCommand* c) thr
}
static void toStream(std::ostream& out, const CommentCommand* c) throw() {
- out << "(set-info :notes \"" << c->getComment() << "\")";
+ string s = c->getComment();
+ size_t pos = 0;
+ while((pos = s.find_first_of('"', pos)) != string::npos) {
+ s.replace(pos, 1, "\\\"");
+ pos += 2;
+ }
+ out << "(set-info :notes \"" << s << "\")";
}
static void toStream(std::ostream& out, const EmptyCommand* c) throw() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback