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

Public Member Functions

int getNumFields ()
 
FuncDecl< DatatypeSort< R > > ConstructorDecl ()
 
FuncDecl< BoolSortgetTesterDecl ()
 
FuncDecl<?>[] getAccessorDecls ()
 

Additional Inherited Members

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

Detailed Description

Constructors are used for datatype sorts.

Definition at line 25 of file Constructor.java.

Member Function Documentation

◆ ConstructorDecl()

FuncDecl< DatatypeSort< R > > ConstructorDecl ( )
inline

The function declaration of the constructor.

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 49 of file Constructor.java.

50 {
51 Native.LongPtr constructor = new Native.LongPtr();
52 Native.LongPtr tester = new Native.LongPtr();
53 long[] accessors = new long[n];
54 Native.queryConstructor(getContext().nCtx(), getNativeObject(), n, constructor, tester, accessors);
55 return new FuncDecl<>(getContext(), constructor.value);
56 }

◆ getAccessorDecls()

FuncDecl<?>[] getAccessorDecls ( )
inline

The function declarations of the accessors

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 77 of file Constructor.java.

78 {
79 Native.LongPtr constructor = new Native.LongPtr();
80 Native.LongPtr tester = new Native.LongPtr();
81 long[] accessors = new long[n];
82 Native.queryConstructor(getContext().nCtx(), getNativeObject(), n, constructor, tester, accessors);
83 FuncDecl<?>[] t = new FuncDecl[n];
84 for (int i = 0; i < n; i++)
85 t[i] = new FuncDecl<>(getContext(), accessors[i]);
86 return t;
87 }

◆ getNumFields()

int getNumFields ( )
inline

The number of fields of the constructor.

Exceptions
Z3Exception
Z3Exceptionon error
Returns
an int

Definition at line 39 of file Constructor.java.

40 {
41 return n;
42 }

◆ getTesterDecl()

FuncDecl< BoolSort > getTesterDecl ( )
inline

The function declaration of the tester.

Exceptions
Z3Exception
Z3Exceptionon error

Definition at line 63 of file Constructor.java.

64 {
65 Native.LongPtr constructor = new Native.LongPtr();
66 Native.LongPtr tester = new Native.LongPtr();
67 long[] accessors = new long[n];
68 Native.queryConstructor(getContext().nCtx(), getNativeObject(), n, constructor, tester, accessors);
69 return new FuncDecl<>(getContext(), tester.value);
70 }