18 package com.microsoft.z3;
31 return Native.solverGetHelp(getContext().nCtx(), getNativeObject());
41 getContext().checkContextMatch(value);
42 Native.solverSetParams(getContext().nCtx(), getNativeObject(),
43 value.getNativeObject());
53 return new ParamDescrs(getContext(), Native.solverGetParamDescrs(
54 getContext().nCtx(), getNativeObject()));
65 .solverGetNumScopes(getContext().nCtx(), getNativeObject());
74 Native.solverPush(getContext().nCtx(), getNativeObject());
93 public void pop(
int n)
95 Native.solverPop(getContext().nCtx(), getNativeObject(), n);
105 Native.solverReset(getContext().nCtx(), getNativeObject());
115 getContext().checkContextMatch(constraints);
118 Native.solverAssert(getContext().nCtx(), getNativeObject(),
119 a.getNativeObject());
139 getContext().checkContextMatch(constraints);
140 getContext().checkContextMatch(ps);
141 if (constraints.length != ps.length) {
145 for (
int i = 0; i < constraints.length; i++) {
146 Native.solverAssertAndTrack(getContext().nCtx(), getNativeObject(),
147 constraints[i].getNativeObject(), ps[i].getNativeObject());
166 getContext().checkContextMatch(constraint);
167 getContext().checkContextMatch(p);
169 Native.solverAssertAndTrack(getContext().nCtx(), getNativeObject(),
170 constraint.getNativeObject(), p.getNativeObject());
180 ASTVector assrts =
new ASTVector(getContext(), Native.solverGetAssertions(getContext().nCtx(), getNativeObject()));
181 return assrts.
size();
191 ASTVector assrts =
new ASTVector(getContext(), Native.solverGetAssertions(getContext().nCtx(), getNativeObject()));
205 if (assumptions ==
null) {
206 r =
Z3_lbool.fromInt(Native.solverCheck(getContext().nCtx(),
209 r =
Z3_lbool.fromInt(Native.solverCheckAssumptions(getContext()
210 .nCtx(), getNativeObject(), assumptions.length,
AST 211 .arrayToNative(assumptions)));
247 long x = Native.solverGetModel(getContext().nCtx(), getNativeObject());
251 return new Model(getContext(), x);
266 long x = Native.solverGetProof(getContext().nCtx(), getNativeObject());
270 return Expr.create(getContext(), x);
286 ASTVector core =
new ASTVector(getContext(), Native.solverGetUnsatCore(getContext().nCtx(), getNativeObject()));
296 return Native.solverGetReasonUnknown(getContext().nCtx(),
305 return new Solver(ctx, Native.solverTranslate(getContext().nCtx(), getNativeObject(), ctx.nCtx()));
315 return new Statistics(getContext(), Native.solverGetStatistics(
316 getContext().nCtx(), getNativeObject()));
326 .solverToString(getContext().nCtx(), getNativeObject());
336 Native.solverIncRef(getContext().nCtx(), getNativeObject());
340 void addToReferenceQueue() {
ParamDescrs getParameterDescriptions()
void assertAndTrack(BoolExpr[] constraints, BoolExpr[] ps)
Solver translate(Context ctx)
void setParameters(Params value)
void assertAndTrack(BoolExpr constraint, BoolExpr p)
BoolExpr [] ToBoolExprArray()
void storeReference(Context ctx, T obj)
String getReasonUnknown()
Z3_lbool
Lifted Boolean type: false, undefined, true.
IDecRefQueue< Solver > getSolverDRQ()
Status check(Expr... assumptions)
void add(BoolExpr... constraints)
BoolExpr [] getUnsatCore()
Statistics getStatistics()
def String(name, ctx=None)
BoolExpr [] getAssertions()