diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2013-01-02 14:33:58 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2013-01-02 14:33:58 +0000 |
commit | c7db4230beef3b81542edb5d7ae6ca606d0567dd (patch) | |
tree | f3913e6ea23e0bffbbeff0fc8f5810159c1517f9 /include | |
parent | 26bf73bf80369a24467fcf1f53165824cbcd5679 (diff) | |
download | klee-c7db4230beef3b81542edb5d7ae6ca606d0567dd.tar.gz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/IncompleteSolver.h | 1 | ||||
-rw-r--r-- | include/klee/Solver.h | 10 | ||||
-rw-r--r-- | include/klee/SolverImpl.h | 5 |
3 files changed, 14 insertions, 2 deletions
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<const Array*> &objects, std::vector< std::vector<unsigned char> > &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<unsigned char> > &values, - bool &hasSolution) = 0; + bool &hasSolution) = 0; + + /// haveTimeOutOccurred - retrieve timeout status for the last query. + virtual bool hasTimeoutOccurred() = 0; }; } |