3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

fix axioms for extract, add extensionality checking for shared variables, convert exceptions to unknown status per #419

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-18 11:09:41 +05:30
parent 88362a1c3a
commit 85d44c5d66
17 changed files with 110 additions and 13 deletions

View file

@ -132,7 +132,8 @@ namespace opt {
m_objective_refs(m),
m_enable_sat(false),
m_is_clausal(false),
m_pp_neat(false)
m_pp_neat(false),
m_unknown("unknown")
{
params_ref p;
p.set_bool("model", true);
@ -487,7 +488,7 @@ namespace opt {
if (m_solver.get()) {
return m_solver->reason_unknown();
}
return std::string("unknown");
return m_unknown;
}
void context::display_bounds(std::ostream& out, bounds_t const& b) const {

View file

@ -163,6 +163,7 @@ namespace opt {
symbol m_maxsat_engine;
symbol m_logic;
svector<symbol> m_labels;
std::string m_unknown;
public:
context(ast_manager& m);
virtual ~context();
@ -184,6 +185,7 @@ namespace opt {
virtual void get_labels(svector<symbol> & r);
virtual void get_unsat_core(ptr_vector<expr> & r) {}
virtual std::string reason_unknown() const;
virtual void set_reason_unknown(char const* msg) { m_unknown = msg; }
virtual void display_assignment(std::ostream& out);
virtual bool is_pareto() { return m_pareto.get() != 0; }

View file

@ -290,6 +290,10 @@ namespace opt {
std::string opt_solver::reason_unknown() const {
return m_context.last_failure_as_string();
}
void opt_solver::set_reason_unknown(char const* msg) {
m_context.set_reason_unknown(msg);
}
void opt_solver::get_labels(svector<symbol> & r) {
r.reset();

View file

@ -99,6 +99,7 @@ namespace opt {
virtual void get_model(model_ref & _m);
virtual proof * get_proof();
virtual std::string reason_unknown() const;
virtual void set_reason_unknown(char const* msg);
virtual void get_labels(svector<symbol> & r);
virtual void set_progress_callback(progress_callback * callback);
virtual unsigned get_num_assertions() const;