klee
IncompleteSolver.h
Go to the documentation of this file.
1//===-- IncompleteSolver.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_INCOMPLETESOLVER_H
11#define KLEE_INCOMPLETESOLVER_H
12
13#include "klee/Solver/Solver.h"
15
16namespace klee {
17
26public:
32
35
39
43
46
48 None = 3
49 };
50
52
53public:
55 virtual ~IncompleteSolver() {}
56
65
70
72 virtual bool computeValue(const Query&, ref<Expr> &result) = 0;
73
77 virtual bool computeInitialValues(const Query&,
78 const std::vector<const Array*>
79 &objects,
80 std::vector< std::vector<unsigned char> >
81 &values,
82 bool &hasSolution) = 0;
83};
84
89private:
92
93public:
94 StagedSolverImpl(IncompleteSolver *_primary, Solver *_secondary);
96
97 bool computeTruth(const Query&, bool &isValid);
98 bool computeValidity(const Query&, Solver::Validity &result);
99 bool computeValue(const Query&, ref<Expr> &result);
100 bool computeInitialValues(const Query&,
101 const std::vector<const Array*> &objects,
102 std::vector< std::vector<unsigned char> > &values,
103 bool &hasSolution);
105 char *getConstraintLog(const Query&);
106 void setCoreSolverTimeout(time::Span timeout);
107};
108
109}
110
111#endif /* KLEE_INCOMPLETESOLVER_H */
static PartialValidity negatePartialValidity(PartialValidity pv)
@ TrueOrFalse
The query is known to have both true and false assignments.
@ MustBeTrue
The query is provably true.
@ MustBeFalse
The query is provably false.
@ None
The validity of the query is unknown.
virtual bool computeInitialValues(const Query &, const std::vector< const Array * > &objects, std::vector< std::vector< unsigned char > > &values, bool &hasSolution)=0
virtual bool computeValue(const Query &, ref< Expr > &result)=0
computeValue - Attempt to compute a value for the given expression.
virtual IncompleteSolver::PartialValidity computeValidity(const Query &)
virtual IncompleteSolver::PartialValidity computeTruth(const Query &)=0
SolverImpl - Abstract base clase for solver implementations.
Definition: SolverImpl.h:25
bool computeValidity(const Query &, Solver::Validity &result)
bool computeInitialValues(const Query &, const std::vector< const Array * > &objects, std::vector< std::vector< unsigned char > > &values, bool &hasSolution)
char * getConstraintLog(const Query &)
void setCoreSolverTimeout(time::Span timeout)
SolverRunStatus getOperationStatusCode()
getOperationStatusCode - get the status of the last solver operation
IncompleteSolver * primary
bool computeValue(const Query &, ref< Expr > &result)
StagedSolverImpl(IncompleteSolver *_primary, Solver *_secondary)
bool computeTruth(const Query &, bool &isValid)
Definition: main.cpp:291