mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 21:50:52 +00:00
add defs to arith solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5fce4a1d1a
commit
0ae246ad2b
14 changed files with 326 additions and 225 deletions
|
@ -31,14 +31,32 @@ namespace qe {
|
|||
|
||||
struct cant_project {};
|
||||
|
||||
struct def {
|
||||
expr_ref var, term;
|
||||
def(expr_ref& v, expr_ref& t): var(v), term(t) {}
|
||||
};
|
||||
|
||||
class project_plugin {
|
||||
public:
|
||||
virtual ~project_plugin() {}
|
||||
virtual bool operator()(model& model, app* var, app_ref_vector& vars, expr_ref_vector& lits) = 0;
|
||||
/**
|
||||
\brief partial solver.
|
||||
*/
|
||||
virtual bool solve(model& model, app_ref_vector& vars, expr_ref_vector& lits) = 0;
|
||||
virtual family_id get_family_id() = 0;
|
||||
|
||||
virtual void operator()(model& model, app_ref_vector& vars, expr_ref_vector& lits) { };
|
||||
|
||||
/**
|
||||
\brief project vars modulo model, return set of definitions for eliminated variables.
|
||||
- vars in/out: returns variables that were not eliminated
|
||||
- lits in/out: returns projected literals
|
||||
- returns set of definitions
|
||||
(TBD: in triangular form, the last definition can be substituted into definitions that come before)
|
||||
*/
|
||||
virtual vector<def> project(model& model, app_ref_vector& vars, expr_ref_vector& lits) = 0;
|
||||
|
||||
static expr_ref pick_equality(ast_manager& m, model& model, expr* t);
|
||||
static void erase(expr_ref_vector& lits, unsigned& i);
|
||||
static void push_back(expr_ref_vector& lits, expr* lit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue