18package com.microsoft.z3;
20import com.microsoft.z3.enumerations.Z3_lbool;
22import java.lang.ref.ReferenceQueue;
35 return Native.fixedpointGetHelp(getContext().nCtx(), getNativeObject());
46 getContext().checkContextMatch(value);
47 Native.fixedpointSetParams(getContext().nCtx(), getNativeObject(),
48 value.getNativeObject());
58 return new ParamDescrs(getContext(), Native.fixedpointGetParamDescrs(
59 getContext().nCtx(), getNativeObject()));
70 getContext().checkContextMatch(constraints);
73 Native.fixedpointAssert(getContext().
nCtx(), getNativeObject(),
85 getContext().checkContextMatch(f);
86 Native.fixedpointRegisterRelation(getContext().nCtx(), getNativeObject(),
98 getContext().checkContextMatch(rule);
99 Native.fixedpointAddRule(getContext().nCtx(), getNativeObject(),
100 rule.getNativeObject(),
AST.getNativeObject(name));
109 getContext().checkContextMatch(pred);
110 Native.fixedpointAddFact(getContext().nCtx(), getNativeObject(),
111 pred.getNativeObject(), args.length, args);
124 getContext().checkContextMatch(
query);
126 getNativeObject(),
query.getNativeObject()));
147 getContext().checkContextMatch(relations);
170 getContext().checkContextMatch(rule);
171 Native.fixedpointUpdateRule(getContext().nCtx(), getNativeObject(),
172 rule.getNativeObject(),
AST.getNativeObject(name));
183 long ans = Native.fixedpointGetAnswer(getContext().nCtx(), getNativeObject());
184 return (ans == 0) ? null :
Expr.create(getContext(), ans);
192 return Native.fixedpointGetReasonUnknown(getContext().nCtx(),
201 return Native.fixedpointGetNumLevels(getContext().nCtx(), getNativeObject(),
202 predicate.getNativeObject());
212 long res = Native.fixedpointGetCoverDelta(getContext().nCtx(),
213 getNativeObject(), level, predicate.getNativeObject());
214 return (res == 0) ? null :
Expr.create(getContext(), res);
224 Native.fixedpointAddCover(getContext().nCtx(), getNativeObject(), level,
225 predicate.getNativeObject(), property.getNativeObject());
234 return Native.fixedpointToString(getContext().nCtx(), getNativeObject(),
244 Native.fixedpointSetPredicateRepresentation(getContext().nCtx(),
255 return Native.fixedpointToString(getContext().nCtx(), getNativeObject(),
266 ASTVector v =
new ASTVector(getContext(), Native.fixedpointGetRules(getContext().nCtx(), getNativeObject()));
277 ASTVector v =
new ASTVector(getContext(), Native.fixedpointGetAssertions(getContext().nCtx(), getNativeObject()));
288 return new Statistics(getContext(), Native.fixedpointGetStatistics(
289 getContext().nCtx(), getNativeObject()));
299 ASTVector av =
new ASTVector(getContext(), Native.fixedpointFromFile(getContext().nCtx(), getNativeObject(), file));
310 ASTVector av =
new ASTVector(getContext(), Native.fixedpointFromString(getContext().nCtx(), getNativeObject(), s));
320 Fixedpoint(Context ctx)
322 super(ctx, Native.mkFixedpoint(ctx.nCtx()));
327 Native.fixedpointIncRef(getContext().nCtx(), getNativeObject());
331 void addToReferenceQueue() {
332 getContext().getReferenceQueue().storeReference(
this, FixedpointRef::new);
335 private static class FixedpointRef
extends Z3ReferenceQueue.Reference<Fixedpoint> {
337 private FixedpointRef(Fixedpoint referent, ReferenceQueue<Z3Object> q) {
342 void decRef(Context ctx,
long z3Obj) {
343 Native.fixedpointDecRef(ctx.nCtx(), z3Obj);
BoolExpr[] ToBoolExprArray()
BoolExpr[] ParseString(String s)
void updateRule(Expr< BoolSort > rule, Symbol name)
Status query(Expr< BoolSort > query)
ParamDescrs getParameterDescriptions()
void registerRelation(FuncDecl< BoolSort > f)
void setParameters(Params value)
BoolExpr[] ParseFile(String file)
void setPredicateRepresentation(FuncDecl< BoolSort > f, Symbol[] kinds)
Status query(FuncDecl< BoolSort >[] relations)
int getNumLevels(FuncDecl< BoolSort > predicate)
void addCover(int level, FuncDecl< BoolSort > predicate, Expr<?> property)
String toString(Expr< BoolSort >[] queries)
BoolExpr[] getAssertions()
final void add(Expr< BoolSort >... constraints)
void addFact(FuncDecl< BoolSort > pred, int ... args)
Expr<?> getCoverDelta(int level, FuncDecl< BoolSort > predicate)
String getReasonUnknown()
Statistics getStatistics()
void addRule(Expr< BoolSort > rule, Symbol name)
static long[] arrayToNative(Z3Object[] a)
static int arrayLength(Z3Object[] a)
Z3_lbool
Lifted Boolean type: false, undefined, true.