36 typedef std::pair<z3::expr, Type> Z3ExprTypePair;
40 std::vector<std::vector<z3::expr> > z3Stack_;
45 CommonSubexpressions ctxCses_;
47 VariableDeclarations ctxVarDecls_;
50 std::vector<SymbolicExpression::Ptr> holdingExprs_;
54#ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
55 friend class boost::serialization::access;
58 void serialize(S &s,
const unsigned ) {
59 s & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
SmtSolver);
73 , ctx_(NULL), solver_(NULL)
77 ctx_ =
new z3::context;
78 solver_ =
new z3::solver(*ctx_);
79 z3Stack_.push_back(std::vector<z3::expr>());
112 explicit Z3Solver(
const boost::filesystem::path &exe,
const std::string &shellArgs =
"")
130 virtual z3::context *z3Context()
const;
140 virtual z3::solver *z3Solver()
const;
150 virtual std::vector<z3::expr> z3Assertions()
const;
151 virtual std::vector<z3::expr> z3Assertions(
size_t level)
const;
164 SExprTypePair outputList(
const std::string &
name,
const std::vector<SExprTypePair>&,
Type rettype = NO_TYPE);
172 virtual void pop()
override;
174 virtual void timeout(boost::chrono::duration<double>)
override;
183 virtual Type mostType(
const std::vector<Z3ExprTypePair>&);
184 using SmtlibSolver::mostType;
185 Z3ExprTypePair ctxCast(
const Z3ExprTypePair&,
Type toType);
186 std::vector<Z3Solver::Z3ExprTypePair> ctxCast(
const std::vector<Z3ExprTypePair>&,
Type toType);
189 std::vector<Z3Solver::Z3ExprTypePair> ctxExpressions(
const std::vector<SymbolicExpression::Ptr>&);