mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 05:18:44 +00:00
Updates for the .NET, Java, and ML APIs for recently changed fixedpoint and interpolation functionality.
Fixes #103
This commit is contained in:
parent
a361e4dcef
commit
e33ff42766
|
@ -98,11 +98,12 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// The keys stored in the map.
|
||||
/// </summary>
|
||||
public ASTVector Keys
|
||||
public AST[] Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ASTVector(Context, Native.Z3_ast_map_keys(Context.nCtx, NativeObject));
|
||||
ASTVector res = new ASTVector(Context, Native.Z3_ast_map_keys(Context.nCtx, NativeObject));
|
||||
return res.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,30 @@ namespace Microsoft.Z3
|
|||
return Native.Z3_ast_vector_to_string(Context.nCtx, NativeObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translates an AST vector into an AST[]
|
||||
/// </summary>
|
||||
public AST[] ToArray()
|
||||
{
|
||||
uint n = Size;
|
||||
AST[] res = new AST[n];
|
||||
for (uint i = 0; i < n; i++)
|
||||
res[i] = AST.Create(this.Context, this[i].NativeObject);
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translates an AST vector into an Expr[]
|
||||
/// </summary>
|
||||
public Expr[] ToExprArray()
|
||||
{
|
||||
uint n = Size;
|
||||
Expr[] res = new Expr[n];
|
||||
for (uint i = 0; i < n; i++)
|
||||
res[i] = Expr.Create(this.Context, this[i].NativeObject);
|
||||
return res;
|
||||
}
|
||||
|
||||
#region Internal
|
||||
internal ASTVector(Context ctx, IntPtr obj) : base(ctx, obj) { Contract.Requires(ctx != null); }
|
||||
internal ASTVector(Context ctx) : base(ctx, Native.Z3_mk_ast_vector(ctx.nCtx)) { Contract.Requires(ctx != null); }
|
||||
|
|
Loading…
Reference in a new issue