mirror of
https://github.com/Z3Prover/z3
synced 2025-08-03 01:40:22 +00:00
fixing bugs in refactored code exposed from White's example
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c84ab2fc01
commit
7237be768b
7 changed files with 117 additions and 131 deletions
|
@ -64,14 +64,7 @@ namespace opt {
|
|||
|
||||
void updt_params(params_ref& p);
|
||||
|
||||
void add(expr* f, rational const& w) {
|
||||
SASSERT(m.is_bool(f));
|
||||
SASSERT(w.is_pos());
|
||||
m_soft_constraints.push_back(f);
|
||||
m_weights.push_back(w);
|
||||
m_upper += w;
|
||||
}
|
||||
|
||||
void add(expr* f, rational const& w);
|
||||
unsigned size() const { return m_soft_constraints.size(); }
|
||||
expr* operator[](unsigned idx) const { return m_soft_constraints[idx]; }
|
||||
rational weight(unsigned idx) const { return m_weights[idx]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue