18 package com.microsoft.z3;
34 if (o ==
this)
return true;
35 if (!(o instanceof
Sort))
return false;
38 return (getContext().nCtx() == other.getContext().nCtx()) &&
42 other.getNativeObject()
53 return super.hashCode();
61 return Native.getSortId(getContext().nCtx(), getNativeObject());
69 return Z3_sort_kind.fromInt(Native.getSortKind(getContext().nCtx(),
78 return Symbol.create(getContext(),
79 Native.getSortName(getContext().nCtx(), getNativeObject()));
87 return Native.sortToString(getContext().nCtx(), getNativeObject());
99 void checkNativeObject(
long obj)
101 if (Native.getAstKind(getContext().nCtx(), obj) !=
Z3_ast_kind.Z3_SORT_AST
103 throw new Z3Exception(
"Underlying object is not a sort");
104 super.checkNativeObject(obj);
107 static Sort create(Context ctx,
long obj)
119 return new DatatypeSort(ctx, obj);
125 return new UninterpretedSort(ctx, obj);
129 return new RelationSort(ctx, obj);
131 return new FPSort(ctx, obj);
133 return new FPRMSort(ctx, obj);
137 return new ReSort(ctx, obj);
139 throw new Z3Exception(
"Unknown sort kind");
Z3_sort_kind
The different kinds of Z3 types (See #Z3_get_sort_kind).
def FiniteDomainSort(name, sz, ctx=None)
Z3_ast_kind
The different kinds of Z3 AST (abstract syntax trees). That is, terms, formulas and types.
def FPSort(ebits, sbits, ctx=None)
Z3_sort_kind getSortKind()
def BitVecSort(sz, ctx=None)
def String(name, ctx=None)