18package com.microsoft.z3;
20import java.lang.ref.ReferenceQueue;
31 return Native.astVectorSize(getContext().nCtx(), getNativeObject());
45 return new AST(getContext(), Native.astVectorGet(getContext().nCtx(),
46 getNativeObject(), i));
49 public void set(
int i,
AST value)
52 Native.astVectorSet(getContext().
nCtx(), getNativeObject(), i,
53 value.getNativeObject());
62 Native.astVectorResize(getContext().nCtx(), getNativeObject(), newSize);
72 Native.astVectorPush(getContext().nCtx(), getNativeObject(), a.getNativeObject());
84 return new ASTVector(getContext(), Native.astVectorTranslate(getContext()
85 .nCtx(), getNativeObject(), ctx.
nCtx()));
93 return Native.astVectorToString(getContext().nCtx(), getNativeObject());
103 super(ctx, Native.mkAstVector(ctx.
nCtx()));
113 for (
int i = 0; i < n; i++)
114 res[i] =
AST.create(getContext(),
get(i).getNativeObject());
124 for (
int i = 0; i < n; i++)
125 res[i] =
Expr.create(getContext(),
get(i).getNativeObject());
136 for (
int i = 0; i < n; i++)
137 res[i] = (
BoolExpr)
Expr.create(getContext(),
get(i).getNativeObject());
148 for (
int i = 0; i < n; i++)
149 res[i] = (
BitVecExpr)
Expr.create(getContext(),
get(i).getNativeObject());
160 for (
int i = 0; i < n; i++)
172 for (
int i = 0; i < n; i++)
184 for (
int i = 0; i < n; i++)
196 for (
int i = 0; i < n; i++)
197 res[i] = (
FPExpr)
Expr.create(getContext(),
get(i).getNativeObject());
208 for (
int i = 0; i < n; i++)
209 res[i] = (
FPRMExpr)
Expr.create(getContext(),
get(i).getNativeObject());
220 for (
int i = 0; i < n; i++)
221 res[i] = (
IntExpr)
Expr.create(getContext(),
get(i).getNativeObject());
232 for (
int i = 0; i < n; i++)
233 res[i] = (
RealExpr)
Expr.create(getContext(),
get(i).getNativeObject());
239 Native.astVectorIncRef(getContext().nCtx(), getNativeObject());
243 void addToReferenceQueue() {
244 getContext().getReferenceQueue().storeReference(
this, ASTVectorRef::new);
247 private static class ASTVectorRef
extends Z3ReferenceQueue.Reference<ASTVector> {
249 private ASTVectorRef(ASTVector referent, ReferenceQueue<Z3Object> q) {
254 void decRef(Context ctx,
long z3Obj) {
255 Native.astVectorDecRef(ctx.nCtx(), z3Obj);
ArithExpr<?>[] ToArithExprExprArray()
BoolExpr[] ToBoolExprArray()
BitVecExpr[] ToBitVecExprArray()
RealExpr[] ToRealExprArray()
FPRMExpr[] ToFPRMExprArray()
IntExpr[] ToIntExprArray()
ArrayExpr<?, ?>[] ToArrayExprArray()
DatatypeExpr<?>[] ToDatatypeExprArray()
ASTVector(Context ctx, long obj)
ASTVector translate(Context ctx)