3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 17:54:43 +00:00

A few changes based on previous reviews

Tested the optimization procedure with:
- unbounded objectives
- bounded with rational solutions
- bounded with irrational solutions
This commit is contained in:
Anh-Dung Phan 2013-10-21 17:25:34 -07:00
parent 3dd72f8f16
commit 3441fc2942
8 changed files with 24 additions and 26 deletions

View file

@ -18,6 +18,7 @@ Notes:
--*/
#include "inf_rational.h"
#include "inf_eps_rational.h"
#ifndef _THEORY_OPT_H_
@ -28,9 +29,9 @@ namespace smt {
public:
virtual bool maximize(theory_var v) { UNREACHABLE(); return false; };
virtual theory_var add_objective(app* term) { UNREACHABLE(); return null_theory_var; }
virtual inf_eps_rational<rational> get_objective_value(theory_var v) {
virtual inf_eps_rational<inf_rational> get_objective_value(theory_var v) {
UNREACHABLE();
inf_eps_rational<rational> r(rational(1), rational(0));
inf_eps_rational<inf_rational> r(rational(1), inf_rational(0));
return r;
}
};