Z3
Public Member Functions
EnumSort Class Reference
+ Inheritance diagram for EnumSort:

Public Member Functions

FuncDecl[] getConstDecls () throws Z3Exception
 
Expr[] getConsts () throws Z3Exception
 
FuncDecl[] getTesterDecls () throws Z3Exception
 
- Public Member Functions inherited from Sort
boolean equals (Object o)
 
int hashCode ()
 
int getId () throws Z3Exception
 
Z3_sort_kind getSortKind () throws Z3Exception
 
Symbol getName () throws Z3Exception
 
String toString ()
 
- Public Member Functions inherited from AST
boolean equals (Object o)
 
int compareTo (Object other) throws Z3Exception
 
int hashCode ()
 
int getId () throws Z3Exception
 
AST translate (Context ctx) throws Z3Exception
 
Z3_ast_kind getASTKind () throws Z3Exception
 
boolean isExpr () throws Z3Exception
 
boolean isApp () throws Z3Exception
 
boolean isVar () throws Z3Exception
 
boolean isQuantifier () throws Z3Exception
 
boolean isSort () throws Z3Exception
 
boolean isFuncDecl () throws Z3Exception
 
String toString ()
 
String getSExpr () throws Z3Exception
 
- Public Member Functions inherited from Z3Object
void dispose () throws Z3Exception
 
- Public Member Functions inherited from IDisposable
void dispose () throws Z3Exception
 

Additional Inherited Members

- Protected Member Functions inherited from Sort
 Sort (Context ctx) throws Z3Exception
 
- Protected Member Functions inherited from Z3Object
void finalize () throws Z3Exception
 

Detailed Description

Enumeration sorts.

Definition at line 23 of file EnumSort.java.

Member Function Documentation

FuncDecl [] getConstDecls ( ) throws Z3Exception
inline

The function declarations of the constants in the enumeration.

Definition at line 28 of file EnumSort.java.

Referenced by EnumSort.getConsts().

29  {
30  int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject());
31  FuncDecl[] t = new FuncDecl[n];
32  for (int i = 0; i < n; i++)
33  t[i] = new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), i));
34  return t;
35  }
Expr [] getConsts ( ) throws Z3Exception
inline

The constants in the enumeration.

Definition at line 40 of file EnumSort.java.

41  {
42  FuncDecl[] cds = getConstDecls();
43  Expr[] t = new Expr[cds.length];
44  for (int i = 0; i < t.length; i++)
45  t[i] = getContext().mkApp(cds[i]);
46  return t;
47  }
FuncDecl[] getConstDecls()
Definition: EnumSort.java:28
Expr mkApp(FuncDecl f, Expr...args)
Definition: Context.java:624
FuncDecl [] getTesterDecls ( ) throws Z3Exception
inline

The test predicates for the constants in the enumeration.

Definition at line 52 of file EnumSort.java.

53  {
54  int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject());
55  FuncDecl[] t = new FuncDecl[n];
56  for (int i = 0; i < n; i++)
57  t[i] = new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), i));
58  return t;
59  }