Summary
Two missing APIs on the Optimize solver: a callback for intermediate improving models
(enabling early termination and progress reporting), and warm-starting with an initial
variable assignment.
Z3 APIs
Z3_optimize_register_model_eh — register a callback invoked each time the optimizer
finds a new model that improves the objective
Z3_optimize_set_initial_value — set an initial value for a variable to warm-start
the optimization search
Notes
Summary
Two missing APIs on the
Optimizesolver: a callback for intermediate improving models(enabling early termination and progress reporting), and warm-starting with an initial
variable assignment.
Z3 APIs
Z3_optimize_register_model_eh— register a callback invoked each time the optimizerfinds a new model that improves the objective
Z3_optimize_set_initial_value— set an initial value for a variable to warm-startthe optimization search
Notes
register_model_ehis a callback API; the Rust wrapper should accept a closure andmanage the lifetime of the callback data relative to the
Optimizeobjectsolutions or terminate early via
Z3_interruptset_initial_valuemirrors the analogousZ3_solver_set_initial_value(tracked in feat: Add solver control APIs (interrupt, next_split, initial values, solve_for) #537)Z3_optimize_translateis already covered byimpl Translate for Optimize(merged in feat: impl Translate and Clone for Optimize #529)