TimingSolver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef KLEE_TIMINGSOLVER_H
00011 #define KLEE_TIMINGSOLVER_H
00012
00013 #include "klee/Expr.h"
00014 #include "klee/Solver.h"
00015
00016 #include <vector>
00017
00018 namespace klee {
00019 class ExecutionState;
00020 class Solver;
00021 class STPSolver;
00022
00025 class TimingSolver {
00026 public:
00027 Solver *solver;
00028 STPSolver *stpSolver;
00029 bool simplifyExprs;
00030
00031 public:
00037 TimingSolver(Solver *_solver, STPSolver *_stpSolver,
00038 bool _simplifyExprs = true)
00039 : solver(_solver), stpSolver(_stpSolver), simplifyExprs(_simplifyExprs) {}
00040 ~TimingSolver() {
00041 delete solver;
00042 }
00043
00044 void setTimeout(double t) {
00045 stpSolver->setTimeout(t);
00046 }
00047
00048 bool evaluate(const ExecutionState&, ref<Expr>, Solver::Validity &result);
00049
00050 bool mustBeTrue(const ExecutionState&, ref<Expr>, bool &result);
00051
00052 bool mustBeFalse(const ExecutionState&, ref<Expr>, bool &result);
00053
00054 bool mayBeTrue(const ExecutionState&, ref<Expr>, bool &result);
00055
00056 bool mayBeFalse(const ExecutionState&, ref<Expr>, bool &result);
00057
00058 bool getValue(const ExecutionState &, ref<Expr> expr,
00059 ref<ConstantExpr> &result);
00060
00061 bool getInitialValues(const ExecutionState&,
00062 const std::vector<const Array*> &objects,
00063 std::vector< std::vector<unsigned char> > &result);
00064
00065 std::pair< ref<Expr>, ref<Expr> >
00066 getRange(const ExecutionState&, ref<Expr> query);
00067 };
00068
00069 }
00070
00071 #endif