mirror of
https://github.com/Z3Prover/z3
synced 2025-05-06 23:35:46 +00:00
move mus to solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
19f98547f7
commit
9f5a117443
10 changed files with 273 additions and 110 deletions
54
src/solver/mus.h
Normal file
54
src/solver/mus.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*++
|
||||
Copyright (c) 2014 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
mus.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Basic MUS extraction
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2014-20-7
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef MUS_H_
|
||||
#define MUS_H_
|
||||
|
||||
class mus {
|
||||
struct imp;
|
||||
imp * m_imp;
|
||||
public:
|
||||
mus(solver& s);
|
||||
~mus();
|
||||
/**
|
||||
Add soft constraint.
|
||||
|
||||
Assume that the solver context enforces that
|
||||
cls is equivalent to a disjunction of args.
|
||||
Assume also that cls is a literal.
|
||||
*/
|
||||
unsigned add_soft(expr* cls);
|
||||
|
||||
lbool get_mus(unsigned_vector& mus);
|
||||
|
||||
void reset();
|
||||
|
||||
/**
|
||||
Instrument MUS extraction to also provide the minimal
|
||||
penalty model, if any is found.
|
||||
The minimal penalty model has the least weight for the
|
||||
supplied soft constraints.
|
||||
*/
|
||||
void set_soft(unsigned sz, expr* const* soft, rational const* weights);
|
||||
|
||||
rational get_best_model(model_ref& mdl);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue