Z3
 
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
UserPropagatorBase Class Referenceabstract
+ Inheritance diagram for UserPropagatorBase:

Public Member Functions

 UserPropagatorBase (Context _ctx, Solver _solver)
 
final Context getCtx ()
 
final Solver getSolver ()
 
abstract void push ()
 
abstract void pop (int number)
 
abstract UserPropagatorBase fresh (Context ctx)
 
void created (Expr<?> ast)
 
void fixed (Expr<?> var, Expr<?> value)
 
void eq (Expr<?> x, Expr<?> y)
 
boolean on_binding (Expr<?> q, Expr<?> inst)
 
void decide (Expr<?> var, int bit, boolean is_pos)
 
void fin ()
 
final void add (Expr<?> expr)
 
final boolean conflict (Expr<?>[] fixed)
 
final boolean conflict (Expr<?>[] fixed, Expr<?>[] lhs, Expr<?>[] rhs)
 
final boolean consequence (Expr<?>[] fixed, Expr<?>[] lhs, Expr<?>[] rhs, Expr<?> conseq)
 
final boolean nextSplit (Expr<?> e, long idx, Z3_lbool phase)
 

Protected Member Functions

final void pushWrapper ()
 
final void popWrapper (int number)
 
final void finWrapper ()
 
final void eqWrapper (long lx, long ly)
 
final boolean onBindingWrapper (long lq, long linst)
 
final UserPropagatorBase freshWrapper (long lctx)
 
final void createdWrapper (long last)
 
final void fixedWrapper (long lvar, long lvalue)
 
final void decideWrapper (long lvar, int bit, boolean is_pos)
 

Detailed Description

Definition at line 6 of file UserPropagatorBase.java.

Constructor & Destructor Documentation

◆ UserPropagatorBase()

UserPropagatorBase ( Context  _ctx,
Solver  _solver 
)
inline

Definition at line 10 of file UserPropagatorBase.java.

10 {
11 super(_ctx.nCtx(), _solver.getNativeObject());
12 ctx = _ctx;
13 solver = _solver;
14 }

Member Function Documentation

◆ add()

final void add ( Expr<?>  expr)
inline

Definition at line 94 of file UserPropagatorBase.java.

94 {
95 Native.propagateAdd(this, ctx.nCtx(), solver.getNativeObject(), javainfo, expr.getNativeObject());
96 }

Referenced by Solver.__iadd__().

◆ conflict() [1/2]

final boolean conflict ( Expr<?>[]  fixed)
inline

Definition at line 98 of file UserPropagatorBase.java.

98 {
99 return conflict(fixed, new Expr[0], new Expr[0]);
100 }
final boolean conflict(Expr<?>[] fixed)
void fixed(Expr<?> var, Expr<?> value)

Referenced by UserPropagatorBase.conflict().

◆ conflict() [2/2]

final boolean conflict ( Expr<?>[]  fixed,
Expr<?>[]  lhs,
Expr<?>[]  rhs 
)
inline

Definition at line 102 of file UserPropagatorBase.java.

102 {
103 return consequence(fixed, lhs, rhs, ctx.mkBool(false));
104 }
BoolExpr mkBool(boolean value)
Definition Context.java:790
final boolean consequence(Expr<?>[] fixed, Expr<?>[] lhs, Expr<?>[] rhs, Expr<?> conseq)

◆ consequence()

final boolean consequence ( Expr<?>[]  fixed,
Expr<?>[]  lhs,
Expr<?>[]  rhs,
Expr<?>  conseq 
)
inline

Definition at line 106 of file UserPropagatorBase.java.

106 {
107 return Native.propagateConsequence(
108 this, ctx.nCtx(), solver.getNativeObject(), javainfo,
109 fixed.length, AST.arrayToNative(fixed), lhs.length, AST.arrayToNative(lhs), AST.arrayToNative(rhs), conseq.getNativeObject());
110 }

Referenced by UserPropagatorBase.conflict().

◆ created()

void created ( Expr<?>  ast)
inline

Definition at line 82 of file UserPropagatorBase.java.

82{}

Referenced by UserPropagatorBase.createdWrapper().

◆ createdWrapper()

final void createdWrapper ( long  last)
inlineprotected

Definition at line 59 of file UserPropagatorBase.java.

59 {
60 created(new Expr(ctx, last));
61 }

◆ decide()

void decide ( Expr<?>  var,
int  bit,
boolean  is_pos 
)
inline

Definition at line 90 of file UserPropagatorBase.java.

90{}

Referenced by UserPropagatorBase.decideWrapper().

◆ decideWrapper()

final void decideWrapper ( long  lvar,
int  bit,
boolean  is_pos 
)
inlineprotected

Definition at line 71 of file UserPropagatorBase.java.

71 {
72 Expr var = new Expr(ctx, lvar);
73 decide(var, bit, is_pos);
74 }
void decide(Expr<?> var, int bit, boolean is_pos)

◆ eq()

void eq ( Expr<?>  x,
Expr<?>  y 
)
inline

Definition at line 86 of file UserPropagatorBase.java.

86{}

Referenced by AstRef.__eq__(), SortRef.cast(), and UserPropagatorBase.eqWrapper().

◆ eqWrapper()

final void eqWrapper ( long  lx,
long  ly 
)
inlineprotected

Definition at line 40 of file UserPropagatorBase.java.

40 {
41 Expr x = new Expr(ctx, lx);
42 Expr y = new Expr(ctx, ly);
43 eq(x, y);
44 }

◆ fin()

void fin ( )
inline

Definition at line 92 of file UserPropagatorBase.java.

92{}

Referenced by UserPropagatorBase.finWrapper().

◆ finWrapper()

final void finWrapper ( )
inlineprotected

Definition at line 35 of file UserPropagatorBase.java.

◆ fixed()

void fixed ( Expr<?>  var,
Expr<?>  value 
)
inline

◆ fixedWrapper()

final void fixedWrapper ( long  lvar,
long  lvalue 
)
inlineprotected

Definition at line 64 of file UserPropagatorBase.java.

64 {
65 Expr var = new Expr(ctx, lvar);
66 Expr value = new Expr(ctx, lvalue);
67 fixed(var, value);
68 }

◆ fresh()

abstract UserPropagatorBase fresh ( Context  ctx)
abstract

◆ freshWrapper()

final UserPropagatorBase freshWrapper ( long  lctx)
inlineprotected

Definition at line 54 of file UserPropagatorBase.java.

54 {
55 return fresh(new Context(lctx));
56 }
abstract UserPropagatorBase fresh(Context ctx)

◆ getCtx()

final Context getCtx ( )
inline

Definition at line 16 of file UserPropagatorBase.java.

16 {
17 return ctx;
18 }

◆ getSolver()

final Solver getSolver ( )
inline

Definition at line 20 of file UserPropagatorBase.java.

20 {
21 return solver;
22 }

◆ nextSplit()

final boolean nextSplit ( Expr<?>  e,
long  idx,
Z3_lbool  phase 
)
inline

Definition at line 112 of file UserPropagatorBase.java.

112 {
113 return Native.propagateNextSplit(
114 this, ctx.nCtx(), solver.getNativeObject(), javainfo,
115 e.getNativeObject(), idx, phase.toInt());
116 }

◆ on_binding()

boolean on_binding ( Expr<?>  q,
Expr<?>  inst 
)
inline

Definition at line 88 of file UserPropagatorBase.java.

88{ return true; }

Referenced by UserPropagatorBase.onBindingWrapper().

◆ onBindingWrapper()

final boolean onBindingWrapper ( long  lq,
long  linst 
)
inlineprotected

Definition at line 47 of file UserPropagatorBase.java.

47 {
48 Expr q = new Expr(ctx, lq);
49 Expr inst = new Expr(ctx, linst);
50 return on_binding(q, inst);
51 }
boolean on_binding(Expr<?> q, Expr<?> inst)

◆ pop()

abstract void pop ( int  number)
abstract

◆ popWrapper()

final void popWrapper ( int  number)
inlineprotected

Definition at line 30 of file UserPropagatorBase.java.

30 {
31 pop(number);
32 }
abstract void pop(int number)

◆ push()

abstract void push ( )
abstract

◆ pushWrapper()

final void pushWrapper ( )
inlineprotected

Definition at line 25 of file UserPropagatorBase.java.

25 {
26 push();
27 }