3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 21:38:44 +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:
Nikolaj Bjorner 2022-07-02 13:12:54 -07:00 committed by GitHub
parent c35d0d1e49
commit d37ed4171d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,16 @@ namespace Microsoft.Z3
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>
/// Returns a string representation of the expression.
/// </summary>