mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55: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>
|
||||
/// Map from AST to AST
|
||||
/// </summary>
|
||||
[ContractVerification(true)]
|
||||
internal class ASTMap : Z3Object
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -35,7 +34,7 @@ namespace Microsoft.Z3
|
|||
/// <returns>True if <paramref name="k"/> is a key in the map, false otherwise.</returns>
|
||||
public bool Contains(AST k)
|
||||
{
|
||||
Contract.Requires(k != null);
|
||||
Debug.Assert(k != null);
|
||||
|
||||
return 0 != Native.Z3_ast_map_contains(Context.nCtx, NativeObject, k.NativeObject);
|
||||
}
|
||||
|
@ -49,8 +48,7 @@ namespace Microsoft.Z3
|
|||
/// <param name="k">An AST</param>
|
||||
public AST Find(AST k)
|
||||
{
|
||||
Contract.Requires(k != null);
|
||||
Contract.Ensures(Contract.Result<AST>() != null);
|
||||
Debug.Assert(k != null);
|
||||
|
||||
return new AST(Context, Native.Z3_ast_map_find(Context.nCtx, NativeObject, k.NativeObject));
|
||||
}
|
||||
|
@ -62,8 +60,8 @@ namespace Microsoft.Z3
|
|||
/// <param name="v">The value AST</param>
|
||||
public void Insert(AST k, AST v)
|
||||
{
|
||||
Contract.Requires(k != null);
|
||||
Contract.Requires(v != null);
|
||||
Debug.Assert(k != null);
|
||||
Debug.Assert(v != null);
|
||||
|
||||
Native.Z3_ast_map_insert(Context.nCtx, NativeObject, k.NativeObject, v.NativeObject);
|
||||
}
|
||||
|
@ -74,7 +72,7 @@ namespace Microsoft.Z3
|
|||
/// <param name="k">An AST</param>
|
||||
public void Erase(AST k)
|
||||
{
|
||||
Contract.Requires(k != null);
|
||||
Debug.Assert(k != null);
|
||||
|
||||
Native.Z3_ast_map_erase(Context.nCtx, NativeObject, k.NativeObject);
|
||||
}
|
||||
|
@ -119,12 +117,12 @@ namespace Microsoft.Z3
|
|||
internal ASTMap(Context ctx, IntPtr obj)
|
||||
: base(ctx, obj)
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Debug.Assert(ctx != null);
|
||||
}
|
||||
internal ASTMap(Context ctx)
|
||||
: base(ctx, Native.Z3_mk_ast_map(ctx.nCtx))
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
Debug.Assert(ctx != null);
|
||||
}
|
||||
|
||||
internal class DecRefQueue : IDecRefQueue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue