All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.microsoft.z3.UserPropagatorBase Maven / Gradle / Ivy
package com.microsoft.z3;
import com.microsoft.z3.Context;
import com.microsoft.z3.enumerations.Z3_lbool;
public abstract class UserPropagatorBase extends Native.UserPropagatorBase {
private Context ctx;
private Solver solver;
public UserPropagatorBase(Context _ctx, Solver _solver) {
super(_ctx.nCtx(), _solver.getNativeObject());
ctx = _ctx;
solver = _solver;
}
public final Context getCtx() {
return ctx;
}
public final Solver getSolver() {
return solver;
}
@Override
protected final void pushWrapper() {
push();
}
@Override
protected final void popWrapper(int number) {
pop(number);
}
@Override
protected final void finWrapper() {
fin();
}
@Override
protected final void eqWrapper(long lx, long ly) {
Expr x = new Expr(ctx, lx);
Expr y = new Expr(ctx, ly);
eq(x, y);
}
@Override
protected final UserPropagatorBase freshWrapper(long lctx) {
return fresh(new Context(lctx));
}
@Override
protected final void createdWrapper(long last) {
created(new Expr(ctx, last));
}
@Override
protected final void fixedWrapper(long lvar, long lvalue) {
Expr var = new Expr(ctx, lvar);
Expr value = new Expr(ctx, lvalue);
fixed(var, value);
}
public abstract void push();
public abstract void pop(int number);
public abstract UserPropagatorBase fresh(Context ctx);
public void created(Expr ast) {}
public void fixed(Expr var, Expr value) {}
public void eq(Expr x, Expr y) {}
public void fin() {}
public final void add(Expr expr) {
Native.propagateAdd(this, ctx.nCtx(), solver.getNativeObject(), javainfo, expr.getNativeObject());
}
public final void conflict(Expr[] fixed) {
conflict(fixed, new Expr[0], new Expr[0]);
}
public final void conflict(Expr[] fixed, Expr[] lhs, Expr[] rhs) {
AST conseq = ctx.mkBool(false);
Native.propagateConflict(
this, ctx.nCtx(), solver.getNativeObject(), javainfo,
fixed.length, AST.arrayToNative(fixed), lhs.length, AST.arrayToNative(lhs), AST.arrayToNative(rhs), conseq.getNativeObject());
}
public final boolean nextSplit(Expr e, long idx, Z3_lbool phase) {
return Native.propagateNextSplit(
this, ctx.nCtx(), solver.getNativeObject(), javainfo,
e.getNativeObject(), idx, phase.toInt());
}
}