mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
port FuncDecl copy to dotnet, continuation of #1073
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7023af4528
commit
c2acbc2957
|
@ -315,6 +315,23 @@ namespace Microsoft.Z3
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Translates (copies) the function declaration to the Context <paramref name="ctx"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ctx">A context</param>
|
||||||
|
/// <returns>A copy of the function declaration which is associated with <paramref name="ctx"/></returns>
|
||||||
|
new public FuncDecl Translate(Context ctx)
|
||||||
|
{
|
||||||
|
Contract.Requires(ctx != null);
|
||||||
|
Contract.Ensures(Contract.Result<FuncDecl>() != null);
|
||||||
|
|
||||||
|
if (ReferenceEquals(Context, ctx))
|
||||||
|
return this;
|
||||||
|
else
|
||||||
|
return new FuncDecl(ctx, Native.Z3_translate(Context.nCtx, NativeObject, ctx.nCtx));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create expression that applies function to arguments.
|
/// Create expression that applies function to arguments.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue