3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 04:28:17 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-09-24 16:52:25 -07:00
parent 7b3b1b6e9f
commit 80d0c5cf82
2 changed files with 12 additions and 4 deletions

View file

@ -1815,8 +1815,10 @@ struct
| _ -> UNKNOWN
let get_model x =
let q = Z3native.solver_get_model (gc x) x in
try if Z3native.is_null_model q then None else Some q with | _ -> None
try
let q = Z3native.solver_get_model (gc x) x in
if Z3native.is_null_model q then None else Some q
with | _ -> None
let get_proof x =
let q = Z3native.solver_get_proof (gc x) x in
@ -1952,8 +1954,10 @@ struct
| _ -> Solver.UNKNOWN
let get_model (x:optimize) =
let q = Z3native.optimize_get_model (gc x) x in
if Z3native.is_null_model q then None else Some q
try
let q = Z3native.optimize_get_model (gc x) x in
if Z3native.is_null_model q then None else Some q
with | _ -> None
let get_lower (x:handle) = Z3native.optimize_get_lower (gc x.opt) x.opt x.h
let get_upper (x:handle) = Z3native.optimize_get_upper (gc x.opt) x.opt x.h

View file

@ -113,6 +113,7 @@ public:
if (m_num_scopes > 0) {
throw default_exception("Cannot translate sat solver at non-base level");
}
std::cout << "translate\n"; std::cout.flush();
ast_translation tr(m, dst_m);
m_solver.pop_to_base_level();
inc_sat_solver* result = alloc(inc_sat_solver, dst_m, p, is_incremental());
@ -167,6 +168,7 @@ public:
lbool check_sat(unsigned sz, expr * const * assumptions) override {
m_solver.pop_to_base_level();
m_core.reset();
std::cout << "#inconsistent: " << m_solver.inconsistent() << "\n";
if (m_solver.inconsistent()) return l_false;
expr_ref_vector _assumptions(m);
obj_map<expr, expr*> asm2fml;
@ -777,6 +779,8 @@ private:
}
m_core.push_back(e);
}
std::cout << "core " << core << "\n";
std::cout.flush();
}
void check_assumptions(dep2asm_t& dep2asm) {