From c7db4230beef3b81542edb5d7ae6ca606d0567dd Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Wed, 2 Jan 2013 14:33:58 +0000 Subject: Patch by Tomasz Kuchta adding a new option (min-query-time-to-log) that enables KLEE to log only the queries exceeding a certain duration, or only those that time out. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@171385 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/klee/IncompleteSolver.h | 1 + include/klee/Solver.h | 10 +++++++++- include/klee/SolverImpl.h | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/klee/IncompleteSolver.h b/include/klee/IncompleteSolver.h index 9c05ad21..38ee4e28 100644 --- a/include/klee/IncompleteSolver.h +++ b/include/klee/IncompleteSolver.h @@ -101,6 +101,7 @@ public: const std::vector &objects, std::vector< std::vector > &values, bool &hasSolution); + bool hasTimeoutOccurred(); }; } diff --git a/include/klee/Solver.h b/include/klee/Solver.h index 4cedf47d..db14f003 100644 --- a/include/klee/Solver.h +++ b/include/klee/Solver.h @@ -213,7 +213,8 @@ namespace klee { /// createPCLoggingSolver - Create a solver which will forward all queries /// after writing them to the given path in .pc format. - Solver *createPCLoggingSolver(Solver *s, std::string path); + Solver *createPCLoggingSolver(Solver *s, std::string path, + int minQueryTimeToLog); /// createSMTLIBLoggingSolver - Create a solver which will forward all queries /// after writing them to the given path in .smt2 format. @@ -223,6 +224,13 @@ namespace klee { /// createDummySolver - Create a dummy solver implementation which always /// fails. Solver *createDummySolver(); + + enum SolverRunStatus { SOLVER_RUN_STATUS_SUCCESS, + SOLVER_RUN_STATUS_TIMEOUT, + SOLVER_RUN_STATUS_FORK_FAILED, + SOLVER_RUN_STATUS_INTERRUPTED, + SOLVER_RUN_STATUS_UNEXPECTED_EXIT_CODE, + SOLVER_RUN_STATUS_WAITPID_FAILED }; } #endif diff --git a/include/klee/SolverImpl.h b/include/klee/SolverImpl.h index 29c356be..080dfc54 100644 --- a/include/klee/SolverImpl.h +++ b/include/klee/SolverImpl.h @@ -55,7 +55,10 @@ namespace klee { &objects, std::vector< std::vector > &values, - bool &hasSolution) = 0; + bool &hasSolution) = 0; + + /// haveTimeOutOccurred - retrieve timeout status for the last query. + virtual bool hasTimeoutOccurred() = 0; }; } -- cgit 1.4.1