mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
remove dependencies on contracts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
12fc670839
commit
3d37060fa9
72 changed files with 734 additions and 1232 deletions
|
@ -17,15 +17,14 @@ Notes:
|
|||
|
||||
--*/
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
namespace Microsoft.Z3
|
||||
{
|
||||
/// <summary>
|
||||
/// Array sorts.
|
||||
/// </summary>
|
||||
[ContractVerification(true)]
|
||||
public class ArraySort : Sort
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -35,7 +34,6 @@ namespace Microsoft.Z3
|
|||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
|
||||
return Sort.Create(Context, Native.Z3_get_array_sort_domain(Context.nCtx, NativeObject));
|
||||
}
|
||||
|
@ -48,27 +46,26 @@ namespace Microsoft.Z3
|
|||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
|
||||
return Sort.Create(Context, Native.Z3_get_array_sort_range(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
||||
#region Internal
|
||||
internal ArraySort(Context ctx, IntPtr obj) : base(ctx, obj) { Contract.Requires(ctx != null); }
|
||||
internal ArraySort(Context ctx, IntPtr obj) : base(ctx, obj) { Debug.Assert(ctx != null); }
|
||||
internal ArraySort(Context ctx, Sort domain, Sort range)
|
||||
: base(ctx, Native.Z3_mk_array_sort(ctx.nCtx, domain.NativeObject, range.NativeObject))
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Contract.Requires(domain != null);
|
||||
Contract.Requires(range != null);
|
||||
Debug.Assert(ctx != null);
|
||||
Debug.Assert(domain != null);
|
||||
Debug.Assert(range != null);
|
||||
}
|
||||
internal ArraySort(Context ctx, Sort[] domain, Sort range)
|
||||
: base(ctx, Native.Z3_mk_array_sort_n(ctx.nCtx, (uint)domain.Length, AST.ArrayToNative(domain), range.NativeObject))
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Contract.Requires(domain != null);
|
||||
Contract.Requires(range != null);
|
||||
Debug.Assert(ctx != null);
|
||||
Debug.Assert(domain != null);
|
||||
Debug.Assert(range != null);
|
||||
}
|
||||
#endregion
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue