Map from AST to AST.
More...
|
| bool | Contains (AST k) |
| | Checks whether the map contains the key k .
|
| |
| AST | Find (AST k) |
| | Finds the value associated with the key k .
|
| |
| void | Insert (AST k, AST v) |
| | Stores or replaces a new key/value pair in the map.
|
| |
| void | Erase (AST k) |
| | Erases the key k from the map.
|
| |
| void | Reset () |
| | Removes all keys from the map.
|
| |
| override string | ToString () |
| | Retrieves a string representation of the map.
|
| |
| void | Dispose () |
| | Disposes of the underlying native Z3 object.
|
| |
|
| uint | Size [get] |
| | The size of the map.
|
| |
| AST[] | Keys [get] |
| | The keys stored in the map.
|
| |
| Context | Context [get] |
| | Access Context object.
|
| |
Map from AST to AST.
Definition at line 28 of file ASTMap.cs.
◆ Contains()
Checks whether the map contains the key k .
- Parameters
-
- Returns
- True if k is a key in the map, false otherwise.
Definition at line 35 of file ASTMap.cs.
36 {
37 Debug.Assert(k != null);
38
39 return 0 != Native.Z3_ast_map_contains(
Context.nCtx, NativeObject, k.NativeObject);
40 }
Context Context
Access Context object.
◆ Erase()
Erases the key k from the map.
- Parameters
-
Definition at line 73 of file ASTMap.cs.
74 {
75 Debug.Assert(k != null);
76
77 Native.Z3_ast_map_erase(
Context.nCtx, NativeObject, k.NativeObject);
78 }
◆ Find()
Finds the value associated with the key k .
This function signs an error when k is not a key in the map.
- Parameters
-
Definition at line 49 of file ASTMap.cs.
50 {
51 Debug.Assert(k != null);
52
53 return new AST(
Context, Native.Z3_ast_map_find(
Context.nCtx, NativeObject, k.NativeObject));
54 }
◆ Insert()
Stores or replaces a new key/value pair in the map.
- Parameters
-
| k | The key AST |
| v | The value AST |
Definition at line 61 of file ASTMap.cs.
62 {
63 Debug.Assert(k != null);
64 Debug.Assert(v != null);
65
66 Native.Z3_ast_map_insert(
Context.nCtx, NativeObject, k.NativeObject, v.NativeObject);
67 }
◆ Reset()
Removes all keys from the map.
Definition at line 83 of file ASTMap.cs.
84 {
85 Native.Z3_ast_map_reset(
Context.nCtx, NativeObject);
86 }
◆ ToString()
| override string ToString |
( |
| ) |
|
|
inline |
Retrieves a string representation of the map.
Definition at line 111 of file ASTMap.cs.
112 {
113 return Native.Z3_ast_map_to_string(
Context.nCtx, NativeObject);
114 }
◆ Keys
The keys stored in the map.
Definition at line 99 of file ASTMap.cs.
100 {
101 get
102 {
103 using ASTVector res =
new ASTVector(
Context, Native.Z3_ast_map_keys(
Context.nCtx, NativeObject));
104 return res.ToArray();
105 }
106 }
◆ Size
The size of the map.
Definition at line 91 of file ASTMap.cs.
92 {
93 get {
return Native.Z3_ast_map_size(
Context.nCtx, NativeObject); }
94 }