mirror of
https://github.com/Z3Prover/z3
synced 2026-04-25 21:33:33 +00:00
Implement Z3_optimize_translate for context translation (#8072)
* Initial plan * Implement Z3_optimize_translate functionality Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix compilation errors and add tests for optimize translate Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Revert changes to opt_solver.cpp as requested Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
f917005ee1
commit
313be1ca1b
6 changed files with 155 additions and 0 deletions
|
|
@ -209,6 +209,13 @@ namespace opt {
|
|||
public:
|
||||
context(ast_manager& m);
|
||||
~context() override;
|
||||
|
||||
/**
|
||||
* \brief Create a clone of the optimization context in a different ast_manager.
|
||||
* Translates all assertions, objectives, and solver state.
|
||||
*/
|
||||
context* translate(ast_manager& target_m);
|
||||
|
||||
unsigned add_soft_constraint(expr* f, rational const& w, symbol const& id);
|
||||
unsigned add_objective(app* t, bool is_max);
|
||||
void add_hard_constraint(expr* f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue