Z3
 
Loading...
Searching...
No Matches
Public Member Functions
DatatypeSort< R > Class Template Reference
+ Inheritance diagram for DatatypeSort< R >:

Public Member Functions

int getNumConstructors ()
 
boolean isRecursive ()
 
FuncDecl< DatatypeSort< R > >[] getConstructors ()
 
FuncDecl< BoolSort >[] getRecognizers ()
 
FuncDecl<?>[][] getAccessors ()
 
- Public Member Functions inherited from Sort
boolean equals (Object o)
 
int hashCode ()
 
int getId ()
 
Z3_sort_kind getSortKind ()
 
Symbol getName ()
 
String toString ()
 
Sort translate (Context ctx)
 
- Public Member Functions inherited from AST
int compareTo (AST other)
 
int getDepth ()
 
Z3_ast_kind getASTKind ()
 
boolean isExpr ()
 
boolean isApp ()
 
boolean isVar ()
 
boolean isQuantifier ()
 
boolean isSort ()
 
boolean isFuncDecl ()
 
String getSExpr ()
 

Additional Inherited Members

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

Detailed Description

Datatype sorts.

Definition at line 23 of file DatatypeSort.java.

Member Function Documentation

◆ getAccessors()

FuncDecl<?>[][] getAccessors ( )
inline

The constructor accessors.

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 87 of file DatatypeSort.java.

88 {
89
90 int n = getNumConstructors();
91 FuncDecl<?>[][] res = new FuncDecl[n][];
92 for (int i = 0; i < n; i++)
93 {
94 FuncDecl<?> fd = new FuncDecl<>(getContext(),
95 Native.getDatatypeSortConstructor(getContext().nCtx(),
96 getNativeObject(), i));
97 int ds = fd.getDomainSize();
98 FuncDecl<?>[] tmp = new FuncDecl[ds];
99 for (int j = 0; j < ds; j++)
100 tmp[j] = new FuncDecl<>(getContext(),
101 Native.getDatatypeSortConstructorAccessor(getContext()
102 .nCtx(), getNativeObject(), i, j));
103 res[i] = tmp;
104 }
105 return res;
106 }

◆ getConstructors()

FuncDecl< DatatypeSort< R > >[] getConstructors ( )
inline

The constructors.

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 54 of file DatatypeSort.java.

55 {
56 int n = getNumConstructors();
57 FuncDecl<DatatypeSort<R>>[] res = new FuncDecl[n];
58 for (int i = 0; i < n; i++)
59 res[i] = new FuncDecl<>(getContext(), Native.getDatatypeSortConstructor(
60 getContext().nCtx(), getNativeObject(), i));
61 return res;
62 }

◆ getNumConstructors()

int getNumConstructors ( )
inline

The number of constructors of the datatype sort.

Exceptions
Z3Exceptionon error
Returns
an int

Definition at line 30 of file DatatypeSort.java.

31 {
32 return Native.getDatatypeSortNumConstructors(getContext().nCtx(),
33 getNativeObject());
34 }

Referenced by DatatypeSort< R >.getAccessors(), DatatypeSort< R >.getConstructors(), and DatatypeSort< R >.getRecognizers().

◆ getRecognizers()

FuncDecl< BoolSort >[] getRecognizers ( )
inline

The recognizers.

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 71 of file DatatypeSort.java.

72 {
73 int n = getNumConstructors();
74 FuncDecl<BoolSort>[] res = new FuncDecl[n];
75 for (int i = 0; i < n; i++)
76 res[i] = new FuncDecl<>(getContext(), Native.getDatatypeSortRecognizer(
77 getContext().nCtx(), getNativeObject(), i));
78 return res;
79 }

◆ isRecursive()

boolean isRecursive ( )
inline

Indicates whether the datatype sort is recursive.

Exceptions
Z3Exceptionon error
Returns
a boolean

Definition at line 41 of file DatatypeSort.java.

42 {
43 return Native.isRecursiveDatatypeSort(getContext().nCtx(),
44 getNativeObject());
45 }