From 889b6be2c3eb5d78613ceb46df98e290c12c2fde Mon Sep 17 00:00:00 2001 From: Murphy Berzish Date: Wed, 23 Nov 2016 19:03:53 -0500 Subject: [PATCH] fix smt-lib 2.5 double quotes in pp --- src/ast/ast_smt2_pp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ast/ast_smt2_pp.cpp b/src/ast/ast_smt2_pp.cpp index eece67a32..7e178b422 100644 --- a/src/ast/ast_smt2_pp.cpp +++ b/src/ast/ast_smt2_pp.cpp @@ -317,7 +317,10 @@ format * smt2_pp_environment::pp_str_literal(app * t) { // we want to scan strVal and escape every non-printable character for (unsigned int i = 0; i < strVal.length(); ++i) { char c = strVal.at(i); - if (isprint(c)) { + if (c == '"') { + // SMT-LIB 2.5 string escape + buf << "\"\""; + } else if (isprint(c)) { buf << c; } else if (c == '\a') { buf << "\\a";