From 3ca81c2dc3881aec0bbf94646c73a148d706c76d Mon Sep 17 00:00:00 2001 From: Daniel Schemmel Date: Sun, 29 Oct 2023 16:00:02 +0000 Subject: Change `GetConstraintLog` to work with `std::string`s instead of `char*`s --- include/klee/Solver/IncompleteSolver.h | 2 +- include/klee/Solver/Solver.h | 3 ++- include/klee/Solver/SolverImpl.h | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/klee/Solver/IncompleteSolver.h b/include/klee/Solver/IncompleteSolver.h index 8bcf7f88..f026743b 100644 --- a/include/klee/Solver/IncompleteSolver.h +++ b/include/klee/Solver/IncompleteSolver.h @@ -104,7 +104,7 @@ public: std::vector< std::vector > &values, bool &hasSolution); SolverRunStatus getOperationStatusCode(); - char *getConstraintLog(const Query&); + std::string getConstraintLog(const Query&) override; void setCoreSolverTimeout(time::Span timeout); }; diff --git a/include/klee/Solver/Solver.h b/include/klee/Solver/Solver.h index c50b17d8..8679cb87 100644 --- a/include/klee/Solver/Solver.h +++ b/include/klee/Solver/Solver.h @@ -15,6 +15,7 @@ #include "klee/Solver/SolverCmdLine.h" #include +#include #include namespace klee { @@ -202,7 +203,7 @@ namespace klee { // FIXME: This should go into a helper class, and should handle failure. virtual std::pair< ref, ref > getRange(const Query&); - virtual char *getConstraintLog(const Query& query); + virtual std::string getConstraintLog(const Query& query); virtual void setCoreSolverTimeout(time::Span timeout); }; diff --git a/include/klee/Solver/SolverImpl.h b/include/klee/Solver/SolverImpl.h index b73370b9..a8b4f8e4 100644 --- a/include/klee/Solver/SolverImpl.h +++ b/include/klee/Solver/SolverImpl.h @@ -101,9 +101,9 @@ namespace klee { /// status code static const char* getOperationStatusString(SolverRunStatus statusCode); - virtual char *getConstraintLog(const Query& query) { - // dummy - return nullptr; + virtual std::string getConstraintLog(const Query &query) { + // dummy + return {}; } virtual void setCoreSolverTimeout(time::Span timeout) {}; -- cgit 1.4.1