3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00

merge with latest unstable

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-10-22 09:45:04 -07:00
commit 0e83a2b1af
88 changed files with 1164 additions and 343 deletions

View file

@ -50,7 +50,7 @@ namespace Microsoft.Z3
IntPtr constructor = IntPtr.Zero;
IntPtr tester = IntPtr.Zero;
IntPtr[] accessors = new IntPtr[n];
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, out accessors);
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
return new FuncDecl(Context, constructor);
}
}
@ -66,7 +66,7 @@ namespace Microsoft.Z3
IntPtr constructor = IntPtr.Zero;
IntPtr tester = IntPtr.Zero;
IntPtr[] accessors = new IntPtr[n];
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, out accessors);
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
return new FuncDecl(Context, tester);
}
}
@ -82,7 +82,7 @@ namespace Microsoft.Z3
IntPtr constructor = IntPtr.Zero;
IntPtr tester = IntPtr.Zero;
IntPtr[] accessors = new IntPtr[n];
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, out accessors);
Native.Z3_query_constructor(Context.nCtx, NativeObject, n, ref constructor, ref tester, accessors);
FuncDecl[] t = new FuncDecl[n];
for (uint i = 0; i < n; i++)
t[i] = new FuncDecl(Context, accessors[i]);

View file

@ -424,7 +424,7 @@ namespace Microsoft.Z3
n_constr[i] = cla[i].NativeObject;
}
IntPtr[] n_res = new IntPtr[n];
Native.Z3_mk_datatypes(nCtx, n, Symbol.ArrayToNative(names), out n_res, n_constr);
Native.Z3_mk_datatypes(nCtx, n, Symbol.ArrayToNative(names), n_res, n_constr);
DatatypeSort[] res = new DatatypeSort[n];
for (uint i = 0; i < n; i++)
res[i] = new DatatypeSort(this, n_res[i]);
@ -3569,28 +3569,11 @@ namespace Microsoft.Z3
/// Only a few configuration parameters are mutable once the context is created.
/// An exception is thrown when trying to modify an immutable parameter.
/// </remarks>
/// <seealso cref="GetParamValue"/>
public void UpdateParamValue(string id, string value)
{
Native.Z3_update_param_value(nCtx, id, value);
}
/// <summary>
/// Get a configuration parameter.
/// </summary>
/// <remarks>
/// Returns null if the parameter value does not exist.
/// </remarks>
/// <seealso cref="UpdateParamValue"/>
public string GetParamValue(string id)
{
IntPtr res = IntPtr.Zero;
if (Native.Z3_get_param_value(nCtx, id, out res) == 0)
return null;
else
return Marshal.PtrToStringAnsi(res);
}
#endregion
#region Internal

View file

@ -78,7 +78,7 @@ namespace Microsoft.Z3
IntPtr[] native_core = new IntPtr[assumptions.Length];
r = (Z3_lbool)Native.Z3_check_assumptions(ctx.nCtx,
(uint)assumptions.Length, AST.ArrayToNative(assumptions),
ref mdl, ref prf, ref core_size, out native_core);
ref mdl, ref prf, ref core_size, native_core);
for (uint i = 0; i < core_size; i++)
core.Add((BoolExpr)Expr.Create(ctx, native_core[i]));

View file

@ -88,7 +88,7 @@ namespace Microsoft.Z3
IntPtr[] n_constdecls = new IntPtr[n];
IntPtr[] n_testers = new IntPtr[n];
NativeObject = Native.Z3_mk_enumeration_sort(ctx.nCtx, name.NativeObject, (uint)n,
Symbol.ArrayToNative(enumNames), out n_constdecls, out n_testers);
Symbol.ArrayToNative(enumNames), n_constdecls, n_testers);
}
#endregion
};

View file

@ -74,10 +74,10 @@ namespace Microsoft.Z3
Contract.Requires(name != null);
IntPtr t = IntPtr.Zero;
IntPtr[] f;
IntPtr[] f = new IntPtr[numFields];
NativeObject = Native.Z3_mk_tuple_sort(ctx.nCtx, name.NativeObject, numFields,
Symbol.ArrayToNative(fieldNames), AST.ArrayToNative(fieldSorts),
ref t, out f);
ref t, f);
}
#endregion
};