about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorRaimondas Sasnauskas <rsas@cs.utah.edu>2014-11-06 10:40:43 -0700
committerDan Liew <daniel.liew@imperial.ac.uk>2014-12-02 18:39:04 +0000
commit591b3d4715327b25d09f57a7198d48ed7174a017 (patch)
treeb3e7b2612768c335e6d444763b6d1524314841ff /lib/Core
parente72b75e019e9f7ccfb222f164f335fc99bb90126 (diff)
downloadklee-591b3d4715327b25d09f57a7198d48ed7174a017.tar.gz
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()
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp11
1 files changed, 5 insertions, 6 deletions
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: