38 Contract.Requires(k !=
null);
40 return Native.Z3_ast_map_contains(
Context.nCtx, NativeObject, k.NativeObject) != 0;
52 Contract.Requires(k !=
null);
53 Contract.Ensures(Contract.Result<
AST>() !=
null);
55 return new AST(
Context, Native.Z3_ast_map_find(
Context.nCtx, NativeObject, k.NativeObject));
65 Contract.Requires(k !=
null);
66 Contract.Requires(v !=
null);
68 Native.Z3_ast_map_insert(
Context.nCtx, NativeObject, k.NativeObject, v.NativeObject);
77 Contract.Requires(k !=
null);
79 Native.Z3_ast_map_erase(
Context.nCtx, NativeObject, k.NativeObject);
87 Native.Z3_ast_map_reset(
Context.nCtx, NativeObject);
95 get {
return Native.Z3_ast_map_size(
Context.nCtx, NativeObject); }
115 return Native.Z3_ast_map_to_string(
Context.nCtx, NativeObject);
122 Contract.Requires(ctx !=
null);
124 internal ASTMap(Context ctx)
125 : base(ctx, Native.Z3_mk_ast_map(ctx.nCtx))
127 Contract.Requires(ctx !=
null);
130 internal class DecRefQueue : IDecRefQueue
132 public DecRefQueue() : base() { }
133 public DecRefQueue(uint move_limit) : base(move_limit) { }
134 internal override void IncRef(Context ctx, IntPtr obj)
136 Native.Z3_ast_map_inc_ref(ctx.nCtx, obj);
139 internal override void DecRef(Context ctx, IntPtr obj)
141 Native.Z3_ast_map_dec_ref(ctx.nCtx, obj);
145 internal override void IncRef(IntPtr o)
147 Context.ASTMap_DRQ.IncAndClear(Context, o);
151 internal override void DecRef(IntPtr o)
153 Context.ASTMap_DRQ.Add(o);
bool Contains(AST k)
Checks whether the map contains the key k .
void Erase(AST k)
Erases the key k from the map.
AST [] Keys
The keys stored in the map.
The main interaction with Z3 happens via the Context.
void Reset()
Removes all keys from the map.
The abstract syntax tree (AST) class.
uint Size
The size of the map
AST Find(AST k)
Finds the value associated with the key k .
Internal base class for interfacing with native Z3 objects. Should not be used externally.
void Insert(AST k, AST v)
Stores or replaces a new key/value pair in the map.
override string ToString()
Retrieves a string representation of the map.
AST [] ToArray()
Translates an AST vector into an AST[]