klee
TimingSolver.h
Go to the documentation of this file.
1//===-- TimingSolver.h ------------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_TIMINGSOLVER_H
11#define KLEE_TIMINGSOLVER_H
12
14#include "klee/Expr/Expr.h"
15#include "klee/Solver/Solver.h"
16#include "klee/System/Time.h"
17
18#include <memory>
19#include <vector>
20
21namespace klee {
22class ConstraintSet;
23class Solver;
24
28public:
29 std::unique_ptr<Solver> solver;
31
32public:
38 TimingSolver(Solver *_solver, bool _simplifyExprs = true)
39 : solver(_solver), simplifyExprs(_simplifyExprs) {}
40
41 void setTimeout(time::Span t) { solver->setCoreSolverTimeout(t); }
42
43 char *getConstraintLog(const Query &query) {
44 return solver->getConstraintLog(query);
45 }
46
47 bool evaluate(const ConstraintSet &, ref<Expr>, Solver::Validity &result,
48 SolverQueryMetaData &metaData);
49
50 bool mustBeTrue(const ConstraintSet &, ref<Expr>, bool &result,
51 SolverQueryMetaData &metaData);
52
53 bool mustBeFalse(const ConstraintSet &, ref<Expr>, bool &result,
54 SolverQueryMetaData &metaData);
55
56 bool mayBeTrue(const ConstraintSet &, ref<Expr>, bool &result,
57 SolverQueryMetaData &metaData);
58
59 bool mayBeFalse(const ConstraintSet &, ref<Expr>, bool &result,
60 SolverQueryMetaData &metaData);
61
62 bool getValue(const ConstraintSet &, ref<Expr> expr,
63 ref<ConstantExpr> &result, SolverQueryMetaData &metaData);
64
66 const std::vector<const Array *> &objects,
67 std::vector<std::vector<unsigned char>> &result,
68 SolverQueryMetaData &metaData);
69
70 std::pair<ref<Expr>, ref<Expr>> getRange(const ConstraintSet &,
71 ref<Expr> query,
72 SolverQueryMetaData &metaData);
73};
74}
75
76#endif /* KLEE_TIMINGSOLVER_H */
bool mayBeFalse(const ConstraintSet &, ref< Expr >, bool &result, SolverQueryMetaData &metaData)
bool evaluate(const ConstraintSet &, ref< Expr >, Solver::Validity &result, SolverQueryMetaData &metaData)
bool getInitialValues(const ConstraintSet &, const std::vector< const Array * > &objects, std::vector< std::vector< unsigned char > > &result, SolverQueryMetaData &metaData)
TimingSolver(Solver *_solver, bool _simplifyExprs=true)
Definition: TimingSolver.h:38
bool getValue(const ConstraintSet &, ref< Expr > expr, ref< ConstantExpr > &result, SolverQueryMetaData &metaData)
bool mustBeFalse(const ConstraintSet &, ref< Expr >, bool &result, SolverQueryMetaData &metaData)
bool mayBeTrue(const ConstraintSet &, ref< Expr >, bool &result, SolverQueryMetaData &metaData)
void setTimeout(time::Span t)
Definition: TimingSolver.h:41
bool mustBeTrue(const ConstraintSet &, ref< Expr >, bool &result, SolverQueryMetaData &metaData)
std::pair< ref< Expr >, ref< Expr > > getRange(const ConstraintSet &, ref< Expr > query, SolverQueryMetaData &metaData)
std::unique_ptr< Solver > solver
Definition: TimingSolver.h:29
char * getConstraintLog(const Query &query)
Definition: TimingSolver.h:43
Definition: main.cpp:291