mirror of
https://github.com/Z3Prover/z3
synced 2026-02-13 04:13:01 +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
|
|
@ -379,6 +379,23 @@ extern "C" {
|
|||
void* ctx,
|
||||
Z3_model_eh model_eh);
|
||||
|
||||
/**
|
||||
\brief Copy an optimization context from a source to a target context.
|
||||
|
||||
This function allows translating an optimization context from one Z3_context
|
||||
to another. This is useful when working with multiple contexts and needing to
|
||||
transfer optimization problems between them.
|
||||
|
||||
\param c Source context containing the optimization context to translate
|
||||
\param o The optimization context to translate from the source context
|
||||
\param target Target context where the optimization context will be created
|
||||
|
||||
\return A new optimization context in the target context with the same state
|
||||
|
||||
def_API('Z3_optimize_translate', OPTIMIZE, (_in(CONTEXT), _in(OPTIMIZE), _in(CONTEXT)))
|
||||
*/
|
||||
Z3_optimize Z3_API Z3_optimize_translate(Z3_context c, Z3_optimize o, Z3_context target);
|
||||
|
||||
|
||||
/**@}*/
|
||||
/**@}*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue