mirror of
https://github.com/Z3Prover/z3
synced 2025-08-07 19:51:22 +00:00
mss and maxres tuning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9681dc12b1
commit
5e026b7897
4 changed files with 214 additions and 3 deletions
52
src/opt/mss.h
Normal file
52
src/opt/mss.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*++
|
||||
Copyright (c) 2014 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
mss.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Maximal satisfying subset/minimal correction sets: MSS/MCS
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2014-2-8
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef _MSS_H_
|
||||
#define _MSS_H_
|
||||
|
||||
namespace opt {
|
||||
class mss {
|
||||
solver& s;
|
||||
ast_manager& m;
|
||||
volatile bool m_cancel;
|
||||
typedef ptr_vector<expr> exprs;
|
||||
typedef obj_hashtable<expr> expr_set;
|
||||
exprs m_mss;
|
||||
expr_set m_mcs;
|
||||
exprs m_todo;
|
||||
model_ref m_model;
|
||||
public:
|
||||
mss(solver& s, ast_manager& m);
|
||||
~mss();
|
||||
|
||||
lbool operator()(vector<ptr_vector<expr> > const& cores, ptr_vector<expr>& literals);
|
||||
|
||||
void set_cancel(bool f) { m_cancel = f; }
|
||||
|
||||
private:
|
||||
void check_parameters(vector<exprs > const& cores, exprs& literals);
|
||||
void update_model();
|
||||
void update_set(exprs& lits);
|
||||
lbool process_core(exprs const& _core);
|
||||
lbool process_core(unsigned sz, exprs& core);
|
||||
void display(std::ostream& out) const;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue