mirror of
https://github.com/Z3Prover/z3
synced 2025-06-09 15:43:25 +00:00
add translate facility to Java/C# APIs, request #209
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c1adffb6ab
commit
13b19eb351
2 changed files with 19 additions and 0 deletions
|
@ -290,6 +290,17 @@ namespace Microsoft.Z3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a clone of the current solver with respect to <c>ctx</c>.
|
||||||
|
/// </summary>
|
||||||
|
public Solver Translate(Context ctx)
|
||||||
|
{
|
||||||
|
Contract.Requires(ctx != null);
|
||||||
|
Contract.Ensures(Contract.Result<Solver>() != null);
|
||||||
|
return new Solver(ctx, Native.Z3_solver_translate(Context.nCtx, NativeObject, ctx.nCtx));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Solver statistics.
|
/// Solver statistics.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -293,6 +293,14 @@ public class Solver extends Z3Object
|
||||||
getNativeObject());
|
getNativeObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a clone of the current solver with respect to <c>ctx</c>.
|
||||||
|
*/
|
||||||
|
public Solver translate(Context ctx)
|
||||||
|
{
|
||||||
|
return new Solver(ctx, Native.solverTranslate(getContext().nCtx(), getNativeObject(), ctx.nCtx()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Solver statistics.
|
* Solver statistics.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue