3
0
Fork 0
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:
Nikolaj Bjorner 2016-06-10 16:24:14 -07:00
parent 19f98547f7
commit 9f5a117443
10 changed files with 273 additions and 110 deletions

54
src/solver/mus.h Normal file
View 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