mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
adding SMT2 log file for solver interaction #867
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b6c13340bd
commit
f6f3ca1507
9 changed files with 159 additions and 28 deletions
|
@ -21,13 +21,28 @@ Revision History:
|
|||
#include "api/api_util.h"
|
||||
#include "solver/solver.h"
|
||||
|
||||
struct solver2smt2_pp {
|
||||
ast_pp_util m_pp_util;
|
||||
std::ofstream m_out;
|
||||
solver2smt2_pp(ast_manager& m, char const* file);
|
||||
void assert_expr(expr* e);
|
||||
void assert_expr(expr* e, expr* t);
|
||||
void push();
|
||||
void pop(unsigned n);
|
||||
void check(unsigned n, expr* const* asms);
|
||||
};
|
||||
|
||||
struct Z3_solver_ref : public api::object {
|
||||
scoped_ptr<solver_factory> m_solver_factory;
|
||||
ref<solver> m_solver;
|
||||
params_ref m_params;
|
||||
symbol m_logic;
|
||||
scoped_ptr<solver2smt2_pp> m_pp;
|
||||
Z3_solver_ref(api::context& c, solver_factory * f): api::object(c), m_solver_factory(f), m_solver(nullptr), m_logic(symbol::null) {}
|
||||
~Z3_solver_ref() override {}
|
||||
|
||||
void assert_expr(expr* e);
|
||||
void assert_expr(expr* e, expr* t);
|
||||
};
|
||||
|
||||
inline Z3_solver_ref * to_solver(Z3_solver s) { return reinterpret_cast<Z3_solver_ref *>(s); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue