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();
485 return Native.getSortKind(getContext().nCtx(), Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_COMPLEX_SORT.toInt();
495 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ANUM;
505 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LE;
515 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_GE;
525 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LT;
535 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_GT;
545 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ADD;
555 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SUB;
565 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UMINUS;
575 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_MUL;
585 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_DIV;
595 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IDIV;
605 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_REM;
615 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_MOD;
625 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_TO_REAL;
635 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_TO_INT;
646 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_IS_INT;
656 return (Native.isApp(getContext().nCtx(), getNativeObject()) &&
Z3_sort_kind
657 .fromInt(Native.getSortKind(getContext().nCtx(),
658 Native.getSort(getContext().nCtx(), getNativeObject()))) ==
Z3_sort_kind.Z3_ARRAY_SORT);
669 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_STORE;
679 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SELECT;
690 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CONST_ARRAY;
701 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ARRAY_DEFAULT;
713 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ARRAY_MAP;
724 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_AS_ARRAY;
734 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_UNION;
744 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_INTERSECT;
754 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_DIFFERENCE;
764 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_COMPLEMENT;
774 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SET_SUBSET;
784 return Native.getSortKind(getContext().nCtx(),
785 Native.getSort(getContext().nCtx(), getNativeObject())) == Z3_sort_kind.Z3_BV_SORT
796 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNUM;
806 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BIT1;
816 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BIT0;
826 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNEG;
836 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BADD;
846 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSUB;
856 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BMUL;
866 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSDIV;
876 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUDIV;
886 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSREM;
896 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUREM;
906 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSMOD;
916 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSDIV0;
926 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUDIV0;
936 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSREM0;
946 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BUREM0;
956 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSMOD0;
966 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ULEQ;
976 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SLEQ;
987 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UGEQ;
997 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SGEQ;
1007 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ULT;
1017 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SLT;
1027 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_UGT;
1037 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SGT;
1047 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BAND;
1057 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BOR;
1067 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNOT;
1077 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BXOR;
1087 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNAND;
1097 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BNOR;
1107 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BXNOR;
1117 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CONCAT;
1127 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SIGN_EXT;
1137 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ZERO_EXT;
1147 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXTRACT;
1157 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_REPEAT;
1167 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BREDOR;
1177 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BREDAND;
1187 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BCOMP;
1197 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BSHL;
1207 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BLSHR;
1217 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BASHR;
1227 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ROTATE_LEFT;
1237 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_ROTATE_RIGHT;
1249 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXT_ROTATE_LEFT;
1261 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_EXT_ROTATE_RIGHT;
1273 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_INT2BV;
1285 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_BV2INT;
1296 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_CARRY;
1307 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_XOR3;
1320 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LABEL;
1333 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_LABEL_LIT;
1342 return isApp() && Native.isString(getContext().nCtx(), getNativeObject());
1353 return Native.getString(getContext().nCtx(), getNativeObject());
1378 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_SEQ_CONCAT;
1390 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_OEQ;
1400 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRUE;
1410 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_ASSERTED;
1421 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_GOAL;
1435 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MODUS_PONENS;
1450 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REFLEXIVITY;
1462 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_SYMMETRY;
1474 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRANSITIVITY;
1494 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TRANSITIVITY_STAR;
1509 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MONOTONICITY;
1520 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_QUANT_INTRO;
1539 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DISTRIBUTIVITY;
1550 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_AND_ELIM;
1561 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NOT_OR_ELIM;
1581 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REWRITE;
1597 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_REWRITE_STAR;
1609 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_PULL_QUANT;
1624 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_PUSH_QUANT;
1640 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_ELIM_UNUSED_VARS;
1656 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DER;
1668 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_QUANT_INST;
1680 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_HYPOTHESIS;
1696 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_LEMMA;
1707 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_UNIT_RESOLUTION;
1719 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_TRUE;
1731 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_FALSE;
1748 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_COMMUTATIVITY;
1774 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DEF_AXIOM;
1797 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_DEF_INTRO;
1809 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_APPLY_DEF;
1821 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_IFF_OEQ;
1849 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NNF_POS;
1868 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_NNF_NEG;
1886 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_SKOLEMIZE;
1899 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_MODUS_PONENS_OEQ;
1921 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_PR_TH_LEMMA;
1931 return (Native.isApp(getContext().nCtx(), getNativeObject()) && Native
1932 .getSortKind(getContext().nCtx(),
1933 Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_RELATION_SORT
1948 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_STORE;
1958 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_EMPTY;
1968 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_IS_EMPTY;
1978 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_JOIN;
1990 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_UNION;
2002 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_WIDEN;
2015 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_PROJECT;
2030 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_FILTER;
2050 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_NEGATION_FILTER;
2062 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_RENAME;
2072 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_COMPLEMENT;
2086 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_SELECT;
2102 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_RA_CLONE;
2112 return (Native.isApp(getContext().nCtx(), getNativeObject()) && Native
2113 .getSortKind(getContext().nCtx(),
2114 Native.getSort(getContext().nCtx(), getNativeObject())) ==
Z3_sort_kind.Z3_FINITE_DOMAIN_SORT
2125 return isApp() && getFuncDecl().getDeclKind() ==
Z3_decl_kind.Z3_OP_FD_LT;
2149 throw new Z3Exception(
"Term is not a bound variable.");
2152 return Native.getIndexValue(getContext().nCtx(), getNativeObject());
2155 private Class sort =
null;
2165 public <S extends R>
Expr<S> distillSort(Class<S> newSort) {
2166 if (sort !=
null && !newSort.isAssignableFrom(sort)) {
2168 String.format(
"Cannot distill expression of sort %s to %s.", sort.getName(), newSort.getName()));
2171 return (Expr<S>) ((Expr<?>)
this);
2180 Type superclass = getClass().getGenericSuperclass();
2181 if (superclass instanceof ParameterizedType) {
2182 Type argType = ((ParameterizedType) superclass).getActualTypeArguments()[0];
2183 if (argType instanceof Class) {
2184 this.sort = (Class) argType;
2190 void checkNativeObject(
long obj) {
2191 if (!Native.isApp(getContext().nCtx(), obj) &&
2192 Native.getAstKind(getContext().nCtx(), obj) !=
Z3_ast_kind.Z3_VAR_AST.toInt() &&
2193 Native.getAstKind(getContext().nCtx(), obj) !=
Z3_ast_kind.Z3_QUANTIFIER_AST.toInt()) {
2194 throw new Z3Exception(
"Underlying object is not a term");
2196 super.checkNativeObject(obj);
2199 static <U extends Sort> Expr<U> create(Context ctx, FuncDecl<U> f, Expr<?> ... arguments)
2201 long obj = Native.mkApp(ctx.nCtx(), f.getNativeObject(),
2202 AST.arrayLength(arguments), AST.arrayToNative(arguments));
2203 return (Expr<U>) create(ctx, obj);
2207 static Expr<?> create(Context ctx,
long obj)
2212 boolean isLambda = !Native.isQuantifierExists(ctx.nCtx(), obj) && !Native.isQuantifierForall(ctx.nCtx(), obj);
2214 return new Lambda(ctx, obj);
2216 return new Quantifier(ctx, obj);
2219 long s = Native.getSort(ctx.nCtx(), obj);
2221 .fromInt(Native.getSortKind(ctx.nCtx(), s));
2223 if (Native.isAlgebraicNumber(ctx.nCtx(), obj))
2224 return new AlgebraicNum(ctx, obj);
2226 if (Native.isNumeralAst(ctx.nCtx(), obj))
2231 return new IntNum(ctx, obj);
2233 return new RatNum(ctx, obj);
2235 return new BitVecNum(ctx, obj);
2237 return new FPNum(ctx, obj);
2239 return new FPRMNum(ctx, obj);
2241 return new FiniteDomainNum(ctx, obj);
2249 return new BoolExpr(ctx, obj);
2251 return new IntExpr(ctx, obj);
2253 return new RealExpr(ctx, obj);
2255 return new ComplexExpr(ctx, obj);
2257 return new BitVecExpr(ctx, obj);
2259 return new ArrayExpr<>(ctx, obj);
2261 return new DatatypeExpr<>(ctx, obj);
2263 return new FPExpr(ctx, obj);
2265 return new FPRMExpr(ctx, obj);
2267 return new FiniteDomainExpr(ctx, obj);
2269 return new SeqExpr<>(ctx, obj);
2271 return new ReExpr<>(ctx, obj);
2275 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.