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() --- tools/kleaver/main.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools/kleaver') 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; } -- cgit 1.4.1