mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 21:50:52 +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>
|
||||
/// The Sort class implements type information for ASTs.
|
||||
/// </summary>
|
||||
[ContractVerification(true)]
|
||||
public class Sort : AST
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -100,7 +99,6 @@ namespace Microsoft.Z3
|
|||
{
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<Symbol>() != null);
|
||||
return Symbol.Create(Context, Native.Z3_get_sort_name(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +125,7 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Sort constructor
|
||||
/// </summary>
|
||||
internal Sort(Context ctx, IntPtr obj) : base(ctx, obj) { Contract.Requires(ctx != null); }
|
||||
internal Sort(Context ctx, IntPtr obj) : base(ctx, obj) { Debug.Assert(ctx != null); }
|
||||
|
||||
#if DEBUG
|
||||
internal override void CheckNativeObject(IntPtr obj)
|
||||
|
@ -138,11 +136,9 @@ namespace Microsoft.Z3
|
|||
}
|
||||
#endif
|
||||
|
||||
[ContractVerification(true)]
|
||||
new internal static Sort Create(Context ctx, IntPtr obj)
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Contract.Ensures(Contract.Result<Sort>() != null);
|
||||
Debug.Assert(ctx != null);
|
||||
|
||||
switch ((Z3_sort_kind)Native.Z3_get_sort_kind(ctx.nCtx, obj))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue