mirror of
https://github.com/Z3Prover/z3
synced 2025-08-22 02:57:50 +00:00
bug fixes to pb; working on model extraction
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
26bf64a0c3
commit
2c577a304d
15 changed files with 348 additions and 197 deletions
|
@ -35,6 +35,7 @@ namespace opt {
|
|||
virtual expr_ref_vector get_assignment() const = 0;
|
||||
virtual void set_cancel(bool f) = 0;
|
||||
virtual void collect_statistics(statistics& st) const = 0;
|
||||
virtual void get_model(model_ref& mdl) = 0;
|
||||
};
|
||||
/**
|
||||
Takes solver with hard constraints added.
|
||||
|
@ -52,6 +53,7 @@ namespace opt {
|
|||
rational m_upper;
|
||||
scoped_ptr<maxsmt_solver> m_msolver;
|
||||
symbol m_maxsat_engine;
|
||||
model_ref m_model;
|
||||
public:
|
||||
maxsmt(ast_manager& m): m(m), m_s(0), m_cancel(false), m_soft_constraints(m), m_answer(m) {}
|
||||
|
||||
|
@ -78,15 +80,11 @@ namespace opt {
|
|||
rational get_lower() const;
|
||||
rational get_upper() const;
|
||||
void update_lower(rational const& r);
|
||||
|
||||
|
||||
void get_model(model_ref& mdl);
|
||||
expr_ref_vector get_assignment() const;
|
||||
|
||||
void display_answer(std::ostream& out) const;
|
||||
|
||||
void display_answer(std::ostream& out) const;
|
||||
void collect_statistics(statistics& st) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
bool is_maxsat_problem(vector<rational> const& ws) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue