mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
return box model based on index. Issue #955
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0fb3161113
commit
c99205fa7e
4 changed files with 38 additions and 7 deletions
|
@ -342,6 +342,14 @@ namespace opt {
|
|||
fix_model(mdl);
|
||||
}
|
||||
|
||||
void context::get_box_model(model_ref& mdl, unsigned index) {
|
||||
if (index >= m_box_models.size()) {
|
||||
throw default_exception("index into models is out of bounds");
|
||||
}
|
||||
mdl = m_box_models[index];
|
||||
fix_model(mdl);
|
||||
}
|
||||
|
||||
lbool context::execute_min_max(unsigned index, bool committed, bool scoped, bool is_max) {
|
||||
if (scoped) get_solver().push();
|
||||
lbool result = m_optsmt.lex(index, is_max);
|
||||
|
|
|
@ -186,6 +186,7 @@ namespace opt {
|
|||
virtual bool print_model() const;
|
||||
virtual void set_model(model_ref& _m) { m_model = _m; }
|
||||
virtual void get_model(model_ref& _m);
|
||||
virtual void get_box_model(model_ref& _m, unsigned index);
|
||||
virtual void fix_model(model_ref& _m);
|
||||
virtual void collect_statistics(statistics& stats) const;
|
||||
virtual proof* get_proof() { return 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue