SMTLIBLoggingSolver(Solver *_solver, std::string path, int queryTimeToLog) : QueryLoggingSolver(_solver, path, ";", queryTimeToLog) { //Setup the printer printer.setOutput(logBuffer); }
void startQuery(const Query& query, const char *typeName, const std::vector<const Array*>* objects=NULL) { Statistic *S = theStatisticManager->getStatisticByName("Instructions"); uint64_t instructions = S ? S->getValue() : 0; os << ";SMTLIBv2 Query " << queryCount++ << " -- " << "Type: " << typeName << ", " << "Instructions: " << instructions << "\n"; printer->setQuery(query); if(objects!=NULL) printer->setArrayValuesToGet(*objects); printer->generateOutput(); os << "\n"; startTime = getWallTime(); }
virtual void printQuery(const Query& query, const Query* falseQuery = 0, const std::vector<const Array*>* objects = 0) { if (0 == falseQuery) { printer.setQuery(query); } else { printer.setQuery(*falseQuery); } if (0 != objects) { printer.setArrayValuesToGet(*objects); } printer.generateOutput(); }
SMTLIBLoggingSolver(Solver *_solver, std::string path) : solver(_solver), os(path.c_str(), std::ios::trunc), printer(), queryCount(0), startTime(0) { //Setup the printer printer = createSMTLIBPrinter(); printer->setOutput(os); }