From 591b3d4715327b25d09f57a7198d48ed7174a017 Mon Sep 17 00:00:00 2001 From: Raimondas Sasnauskas Date: Thu, 6 Nov 2014 10:40:43 -0700 Subject: Implement :named and let abbreviation modes in ExprSMTLIBPrinter * Set the default abbreviation mode to let (ExprSMTLIBPrinter::ABBR_LET) * Remove the now defunct ExprSMTLIBLetPrinter * Improve performance of ExprSMTLIBPrinter::scan() by keeping track of visited Expr to avoid visiting them again * Rename ExprSMTLIBPrinter::printQuery() to ExprSMTLIBPrinter::printQueryExpr() --- lib/Core/Executor.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Core') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 314e5b82..7867f2af 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -34,7 +34,7 @@ #include "klee/Common.h" #include "klee/util/Assignment.h" #include "klee/util/ExprPPrinter.h" -#include "klee/util/ExprSMTLIBLetPrinter.h" +#include "klee/util/ExprSMTLIBPrinter.h" #include "klee/util/ExprUtil.h" #include "klee/util/GetElementPtrTypeIterator.h" #include "klee/Config/Version.h" @@ -3446,13 +3446,12 @@ void Executor::getConstraintLog(const ExecutionState &state, std::string &res, case SMTLIB2: { std::string Str; llvm::raw_string_ostream info(Str); - ExprSMTLIBPrinter *printer = createSMTLIBPrinter(); - printer->setOutput(info); + ExprSMTLIBPrinter printer; + printer.setOutput(info); Query query(state.constraints, ConstantExpr::alloc(0, Expr::Bool)); - printer->setQuery(query); - printer->generateOutput(); + printer.setQuery(query); + printer.generateOutput(); res = info.str(); - delete printer; } break; default: -- cgit 1.4.1