18package com.microsoft.z3;
20import java.lang.reflect.Type;
21import java.lang.reflect.ParameterizedType;
23import com.microsoft.z3.enumerations.Z3_ast_kind;
24import com.microsoft.z3.enumerations.Z3_decl_kind;
25import com.microsoft.z3.enumerations.Z3_lbool;
26import com.microsoft.z3.enumerations.Z3_sort_kind;
33@SuppressWarnings(
"unchecked")
43 return simplify(
null);
60 Native.simplify(getContext().nCtx(), getNativeObject()));
65 Native.simplifyEx(getContext().nCtx(), getNativeObject(),
66 p.getNativeObject()));
78 return new FuncDecl<>(getContext(), Native.getAppDecl(getContext().nCtx(),
90 return Z3_lbool.fromInt(Native.getBoolValue(getContext().nCtx(),
101 return Native.getAppNumArgs(getContext().nCtx(), getNativeObject());
111 int n = getNumArgs();
113 for (
int i = 0; i < n; i++) {
114 res[i] =
Expr.create(getContext(),
115 Native.getAppArg(getContext().nCtx(), getNativeObject(), i));
129 getContext().checkContextMatch(args);
130 if (isApp() && args.length != getNumArgs()) {
131 throw new Z3Exception(
"Number of arguments does not match");
133 return (
Expr<R>)
Expr.create(getContext(), Native.updateTerm(getContext().nCtx(), getNativeObject(),
151 getContext().checkContextMatch(from);
152 getContext().checkContextMatch(to);
153 if (from.length != to.length) {
154 throw new Z3Exception(
"Argument sizes do not match");
156 return (
Expr<R>)
Expr.create(getContext(), Native.substitute(getContext().nCtx(),
170 return substitute(
new Expr[] { from },
new Expr[] { to });
186 getContext().checkContextMatch(to);
187 return (
Expr<R>)
Expr.create(getContext(), Native.substituteVars(getContext().nCtx(),
205 getContext().checkContextMatch(from);
206 getContext().checkContextMatch(to);
207 if (from.length != to.length) {
208 throw new Z3Exception(
"Arrays 'from' and 'to' must have the same length");
210 return (
Expr<R>)
Expr.create(getContext(), Native.substituteFuns(getContext().nCtx(),
234 return super.toString();
244 return Native.isNumeralAst(getContext().nCtx(), getNativeObject());
253 return Native.getNumeralDouble(getContext().nCtx(), getNativeObject());
264 return Native.isWellSorted(getContext().nCtx(), getNativeObject());
274 return (R)
Sort.create(getContext(),
275 Native.getSort(getContext().nCtx(), getNativeObject()));
285 return isApp() && getNumArgs() == 0 && getFuncDecl().getDomainSize() == 0;
295 return isNumeral() && isInt();
305 return isNumeral() && isReal();
315 return Native.isAlgebraicNumber(getContext().nCtx(), getNativeObject());
325 return Native.isGround(getContext().nCtx(), getNativeObject());
335 return Native.isLambda(getContext().nCtx(), getNativeObject());
345 return (isExpr() && Native.isEqSort(getContext().nCtx(),
346 Native.mkBoolSort(getContext().nCtx()),
347 Native.getSort(getContext().nCtx(), getNativeObject())));
357 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_TRUE;
367 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_FALSE;
377 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EQ;
388 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_DISTINCT;
398 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ITE;
408 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_AND;
418 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_OR;
429 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IFF;
439 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_XOR;
449 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_NOT;
459 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IMPLIES;
469 return Native.getSortKind(getContext().nCtx(), Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_INT_SORT.toInt();
479 return Native.getSortKind(getContext().nCtx(), Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_REAL_SORT.toInt();
489 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ANUM;
499 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LE;
509 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_GE;
519 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LT;
529 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_GT;
539 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ADD;
549 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SUB;
559 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UMINUS;
569 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_MUL;
579 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_DIV;
589 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IDIV;
599 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_REM;
609 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_MOD;
619 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_TO_REAL;
629 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_TO_INT;
640 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IS_INT;
650 return (Native.isApp(getContext().nCtx(), getNativeObject()) &&
Z3_sort_kind
651 .fromInt(Native.getSortKind(getContext().nCtx(),
652 Native.getSort(getContext().nCtx(), getNativeObject()))) ==
Z3_sort_kind.Z3_ARRAY_SORT);
663 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_STORE;
673 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SELECT;
684 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CONST_ARRAY;
695 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ARRAY_DEFAULT;
707 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ARRAY_MAP;
718 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_AS_ARRAY;
728 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_UNION;
738 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_INTERSECT;
748 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_DIFFERENCE;
758 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_COMPLEMENT;
768 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_SUBSET;
778 return Native.getSortKind(getContext().nCtx(),
779 Native.getSort(getContext().nCtx(), getNativeObject())) == Z3_sort_kind.Z3_BV_SORT
790 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNUM;
800 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BIT1;
810 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BIT0;
820 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNEG;
830 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BADD;
840 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSUB;
850 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BMUL;
860 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSDIV;
870 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUDIV;
880 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSREM;
890 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUREM;
900 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSMOD;
910 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSDIV0;
920 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUDIV0;
930 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSREM0;
940 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUREM0;
950 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSMOD0;
960 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ULEQ;
970 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SLEQ;
981 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UGEQ;
991 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SGEQ;
1001 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ULT;
1011 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SLT;
1021 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UGT;
1031 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SGT;
1041 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BAND;
1051 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BOR;
1061 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNOT;
1071 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BXOR;
1081 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNAND;
1091 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNOR;
1101 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BXNOR;
1111 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CONCAT;
1121 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SIGN_EXT;
1131 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ZERO_EXT;
1141 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXTRACT;
1151 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_REPEAT;
1161 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BREDOR;
1171 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BREDAND;
1181 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BCOMP;
1191 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSHL;
1201 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BLSHR;
1211 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BASHR;
1221 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ROTATE_LEFT;
1231 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ROTATE_RIGHT;
1243 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXT_ROTATE_LEFT;
1255 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXT_ROTATE_RIGHT;
1267 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_INT2BV;
1279 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BV2INT;
1290 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CARRY;
1301 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_XOR3;
1314 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LABEL;
1327 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LABEL_LIT;
1336 return isApp() && Native.isString(getContext().nCtx(), getNativeObject());
1347 return Native.getString(getContext().nCtx(), getNativeObject());
1372 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SEQ_CONCAT;
1384 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_OEQ;
1394 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRUE;
1404 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_ASSERTED;
1415 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_GOAL;
1429 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MODUS_PONENS;
1444 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REFLEXIVITY;
1456 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_SYMMETRY;
1468 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRANSITIVITY;
1488 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRANSITIVITY_STAR;
1503 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MONOTONICITY;
1514 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_QUANT_INTRO;
1533 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DISTRIBUTIVITY;
1544 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_AND_ELIM;
1555 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NOT_OR_ELIM;
1575 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REWRITE;
1591 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REWRITE_STAR;
1603 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_PULL_QUANT;
1618 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_PUSH_QUANT;
1634 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_ELIM_UNUSED_VARS;
1650 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DER;
1662 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_QUANT_INST;
1674 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_HYPOTHESIS;
1690 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_LEMMA;
1701 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_UNIT_RESOLUTION;
1713 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_TRUE;
1725 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_FALSE;
1742 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_COMMUTATIVITY;
1768 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DEF_AXIOM;
1791 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DEF_INTRO;
1803 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_APPLY_DEF;
1815 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_OEQ;
1843 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NNF_POS;
1862 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NNF_NEG;
1880 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_SKOLEMIZE;
1893 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MODUS_PONENS_OEQ;
1915 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TH_LEMMA;
1925 return (Native.isApp(getContext().nCtx(), getNativeObject()) && Native
1926 .getSortKind(getContext().nCtx(),
1927 Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_RELATION_SORT
1942 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_STORE;
1952 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_EMPTY;
1962 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_IS_EMPTY;
1972 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_JOIN;
1984 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_UNION;
1996 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_WIDEN;
2009 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_PROJECT;
2024 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_FILTER;
2044 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_NEGATION_FILTER;
2056 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_RENAME;
2066 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_COMPLEMENT;
2080 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_SELECT;
2096 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_CLONE;
2106 return (Native.isApp(getContext().nCtx(), getNativeObject()) && Native
2107 .getSortKind(getContext().nCtx(),
2108 Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_FINITE_DOMAIN_SORT
2119 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_FD_LT;
2143 throw new Z3Exception(
"Term is not a bound variable.");
2146 return Native.getIndexValue(getContext().nCtx(), getNativeObject());
2149 private Class sort =
null;
2159 public <S extends R>
Expr<S> distillSort(Class<S> newSort) {
2160 if (sort !=
null && !newSort.isAssignableFrom(sort)) {
2162 String.format(
"Cannot distill expression of sort %s to %s.", sort.getName(), newSort.getName()));
2165 return (Expr<S>) ((Expr<?>)
this);
2174 Type superclass = getClass().getGenericSuperclass();
2175 if (superclass instanceof ParameterizedType) {
2176 Type argType = ((ParameterizedType) superclass).getActualTypeArguments()[0];
2177 if (argType instanceof Class) {
2178 this.sort = (Class) argType;
2184 void checkNativeObject(
long obj) {
2185 if (!Native.isApp(getContext().nCtx(), obj) &&
2186 Native.getAstKind(getContext().nCtx(), obj) !=
Z3_ast_kind.Z3_VAR_AST.toInt() &&
2187 Native.getAstKind(getContext().nCtx(), obj) !=
Z3_ast_kind.Z3_QUANTIFIER_AST.toInt()) {
2188 throw new Z3Exception(
"Underlying object is not a term");
2190 super.checkNativeObject(obj);
2193 static <U extends Sort> Expr<U> create(Context ctx, FuncDecl<U> f, Expr<?> ... arguments)
2195 long obj = Native.mkApp(ctx.nCtx(), f.getNativeObject(),
2196 AST.arrayLength(arguments), AST.arrayToNative(arguments));
2197 return (Expr<U>) create(ctx, obj);
2201 static Expr<?> create(Context ctx,
long obj)
2206 boolean isLambda = !Native.isQuantifierExists(ctx.nCtx(), obj) && !Native.isQuantifierForall(ctx.nCtx(), obj);
2208 return new Lambda(ctx, obj);
2210 return new Quantifier(ctx, obj);
2213 long s = Native.getSort(ctx.nCtx(), obj);
2215 .fromInt(Native.getSortKind(ctx.nCtx(), s));
2217 if (Native.isAlgebraicNumber(ctx.nCtx(), obj))
2218 return new AlgebraicNum(ctx, obj);
2220 if (Native.isNumeralAst(ctx.nCtx(), obj))
2225 return new IntNum(ctx, obj);
2227 return new RatNum(ctx, obj);
2229 return new BitVecNum(ctx, obj);
2231 return new FPNum(ctx, obj);
2233 return new FPRMNum(ctx, obj);
2235 return new FiniteDomainNum(ctx, obj);
2243 return new BoolExpr(ctx, obj);
2245 return new IntExpr(ctx, obj);
2247 return new RealExpr(ctx, obj);
2249 return new BitVecExpr(ctx, obj);
2251 return new ArrayExpr<>(ctx, obj);
2253 return new DatatypeExpr<>(ctx, obj);
2255 return new FPExpr(ctx, obj);
2257 return new FPRMExpr(ctx, obj);
2259 return new FiniteDomainExpr(ctx, obj);
2261 return new SeqExpr<>(ctx, obj);
2263 return new ReExpr<>(ctx, obj);
2267 return new Expr<>(ctx, obj);
boolean isConstantArray()
Expr(Context ctx, long obj)
boolean isProofHypothesis()
boolean isProofTransitivityStar()
boolean isProofAsserted()
boolean isBVRotateRightExtended()
Expr< R > substitute(Expr<?>[] from, Expr<?>[] to)
boolean isRelationFilter()
boolean isEmptyRelation()
Expr< R > substituteVars(Expr<?>[] to)
boolean isRelationalJoin()
boolean isProofApplyDef()
Expr< R > simplify(Params p)
boolean isProofQuantIntro()
boolean isProofReflexivity()
boolean isProofModusPonensOEQ()
boolean isProofTransitivity()
boolean isProofPullQuant()
boolean isProofOrElimination()
Expr< R > substituteFuns(FuncDecl<?>[] from, Expr<?>[] to)
boolean isProofIFFFalse()
boolean isProofQuantInst()
boolean isProofPushQuant()
boolean isRelationUnion()
boolean isProofTheoryLemma()
boolean isBVRotateLeftExtended()
boolean isProofSkolemize()
boolean isRelationClone()
boolean isProofElimUnusedVars()
boolean isProofSymmetry()
boolean isProofMonotonicity()
boolean isBVZeroExtension()
Expr< R > translate(Context ctx)
boolean isAlgebraicNumber()
boolean isSetDifference()
boolean isProofAndElimination()
boolean isProofDefIntro()
boolean isBVRotateRight()
boolean isSetComplement()
boolean isArithmeticNumeral()
boolean isBVShiftRightArithmetic()
boolean isFiniteDomainLT()
FuncDecl< R > getFuncDecl()
boolean isIsEmptyRelation()
Expr< R > update(Expr<?>[] args)
boolean isProofUnitResolution()
boolean isBVShiftRightLogical()
boolean isRelationProject()
boolean isRelationNegationFilter()
boolean isRelationWiden()
boolean isRelationSelect()
boolean isProofDefAxiom()
boolean isProofModusPonens()
boolean isRelationStore()
boolean isProofRewriteStar()
boolean isProofDistributivity()
boolean isRelationRename()
boolean isBVSignExtension()
boolean isProofCommutativity()
double getNumeralDouble()
Expr< R > substitute(Expr<?> from, Expr<?> to)
boolean isRelationComplement()
static long[] arrayToNative(Z3Object[] a)
Z3_ast_kind
The different kinds of Z3 AST (abstract syntax trees). That is, terms, formulas and types.
Z3_decl_kind
The different kinds of interpreted function kinds.
Z3_sort_kind
The different kinds of Z3 types (See Z3_get_sort_kind).
Z3_lbool
Lifted Boolean type: false, undefined, true.