Z3
 
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
ASTMap Class Reference
+ Inheritance diagram for ASTMap:

Public Member Functions

boolean contains (AST k)
 
AST find (AST k)
 
void insert (AST k, AST v)
 
void erase (AST k)
 
void reset ()
 
int size ()
 
AST[] getKeys ()
 
String toString ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Z3Object
static long[] arrayToNative (Z3Object[] a)
 
static int arrayLength (Z3Object[] a)
 

Detailed Description

Map from AST to AST

Definition at line 25 of file ASTMap.java.

Member Function Documentation

◆ contains()

boolean contains ( AST  k)
inline

Checks whether the map contains the key k.

Parameters
kAn AST
Returns
True if k is a key in the map, false otherwise.

Definition at line 33 of file ASTMap.java.

34 {
35
36 return Native.astMapContains(getContext().nCtx(), getNativeObject(),
37 k.getNativeObject());
38 }

◆ erase()

void erase ( AST  k)
inline

Erases the key k from the map.

Parameters
kAn AST

Definition at line 70 of file ASTMap.java.

71 {
72 Native.astMapErase(getContext().nCtx(), getNativeObject(), k.getNativeObject());
73 }

◆ find()

AST find ( AST  k)
inline

Finds the value associated with the key k. Remarks: This function signs an error when k is not a key in the map.

Parameters
kAn AST
Exceptions
Z3Exception

Definition at line 48 of file ASTMap.java.

49 {
50 return new AST(getContext(), Native.astMapFind(getContext().nCtx(),
51 getNativeObject(), k.getNativeObject()));
52 }

◆ getKeys()

AST[] getKeys ( )
inline

The keys stored in the map.

Exceptions
Z3Exception

Definition at line 96 of file ASTMap.java.

97 {
98 ASTVector av = new ASTVector(getContext(), Native.astMapKeys(getContext().nCtx(), getNativeObject()));
99 return av.ToArray();
100 }

◆ insert()

void insert ( AST  k,
AST  v 
)
inline

Stores or replaces a new key/value pair in the map.

Parameters
kThe key AST
vThe value AST

Definition at line 59 of file ASTMap.java.

60 {
61
62 Native.astMapInsert(getContext().nCtx(), getNativeObject(), k.getNativeObject(),
63 v.getNativeObject());
64 }

◆ reset()

void reset ( )
inline

Removes all keys from the map.

Definition at line 78 of file ASTMap.java.

79 {
80 Native.astMapReset(getContext().nCtx(), getNativeObject());
81 }

◆ size()

int size ( )
inline

The size of the map

Definition at line 86 of file ASTMap.java.

87 {
88 return Native.astMapSize(getContext().nCtx(), getNativeObject());
89 }

Referenced by ParamDescrsRef.__len__(), Goal.__len__(), BitVecNumRef.as_signed_long(), and BitVecSortRef.subsort().

◆ toString()

String toString ( )
inline

Retrieves a string representation of the map.

Definition at line 106 of file ASTMap.java.

107 {
108 return Native.astMapToString(getContext().nCtx(), getNativeObject());
109 }