mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 04:13:38 +00:00
Update Expr.cs
Add a Dup functionality that allows extending the life-time of expressions that are passed by the UserPropagator callbacks (or other code).
This commit is contained in:
parent
c35d0d1e49
commit
d37ed4171d
1 changed files with 10 additions and 0 deletions
|
@ -169,6 +169,16 @@ namespace Microsoft.Z3
|
||||||
return (Expr)base.Translate(ctx);
|
return (Expr)base.Translate(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a duplicate of expression.
|
||||||
|
/// This feature is to allow extending the life-time of expressions that were passed down as arguments
|
||||||
|
/// by the user propagator callbacks. By default the life-time of arguments to callbacks is within the
|
||||||
|
/// callback only.
|
||||||
|
/// </summary>
|
||||||
|
public Expr Dup() {
|
||||||
|
return Expr.Create(Context, NativeObject);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a string representation of the expression.
|
/// Returns a string representation of the expression.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue