about summary refs log tree commit diff homepage
path: root/tools/kleaver/main.cpp
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 /tools/kleaver/main.cpp
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 'tools/kleaver/main.cpp')
-rw-r--r--tools/kleaver/main.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp
index 07baee24..fafe955f 100644
--- a/tools/kleaver/main.cpp
+++ b/tools/kleaver/main.cpp
@@ -13,7 +13,7 @@
 #include "klee/util/ExprPPrinter.h"
 #include "klee/util/ExprVisitor.h"
 
-#include "klee/util/ExprSMTLIBLetPrinter.h"
+#include "klee/util/ExprSMTLIBPrinter.h"
 
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
@@ -400,8 +400,8 @@ static bool printInputAsSMTLIBv2(const char *Filename,
 	if (!success)
 	return false;
 
-	ExprSMTLIBPrinter* printer = createSMTLIBPrinter();
-	printer->setOutput(llvm::outs());
+	ExprSMTLIBPrinter printer;
+	printer.setOutput(llvm::outs());
 
 	unsigned int queryNumber = 0;
 	//Loop over the declarations
@@ -426,12 +426,12 @@ static bool printInputAsSMTLIBv2(const char *Filename,
 			 */
 			ConstraintManager constraintM(QC->Constraints);
 			Query query(constraintM,QC->Query);
-			printer->setQuery(query);
+			printer.setQuery(query);
 
 			if(!QC->Objects.empty())
-				printer->setArrayValuesToGet(QC->Objects);
+				printer.setArrayValuesToGet(QC->Objects);
 
-			printer->generateOutput();
+			printer.generateOutput();
 
 
 			queryNumber++;
@@ -444,8 +444,6 @@ static bool printInputAsSMTLIBv2(const char *Filename,
 		delete *it;
 	delete P;
 
-	delete printer;
-
 	return true;
 }