Propagator context for .Net More...
delegate void FixedEh (Expr term, Expr value) Delegate type for fixed callback Note that the life-time of the term and value only applies within the scope of the callback. That means the term and value cannot be stored in an array, dictionary or similar and accessed after the callback has returned. Use the functionality Dup on expressions to create a duplicate copy that extends the lifetime. More...true
if the propagated expression is new for the solver; false
if the propagation was ignored
true
if the propagated expression is new for the solver; false
if the propagation was ignored
null
to clear idx If the term is a bit-vector, then an index into the bit-vector being branched on phase The tentative truth-value (-1/false, 1/true, 0/let Z3 decide)
Propagator context for .Net
Definition at line 40 of file UserPropagator.cs.
◆ UserPropagator() [1/2]Propagator constructor from a solver class.
Definition at line 181 of file UserPropagator.cs.
183gch = GCHandle.Alloc(
this);
189Native.Z3_solver_propagate_init(ctx.nCtx, solver.NativeObject, GCHandle.ToIntPtr(gch), push_eh, pop_eh, fresh_eh);
Context Context
Access Context object
Referenced by UserPropagator.Fresh().
◆ UserPropagator() [2/2]Propagator constructor from a context. It is used from inside of Fresh.
Definition at line 195 of file UserPropagator.cs.
197gch = GCHandle.Alloc(
this);
◆ Conflict() [1/2] void Conflict ( IEnumerable< Expr > terms ) inlineDeclare combination of assigned expressions a conflict
Definition at line 248 of file UserPropagator.cs.
BoolExpr MkFalse()
The false Term.
bool Propagate(IEnumerable< Expr > terms, Expr conseq)
Propagate consequence true if the propagated expression is new for the solver; false if the propagati...
◆ Conflict() [2/2] void Conflict ( params Expr[] terms ) inlineDeclare combination of assigned expressions a conflict
Definition at line 240 of file UserPropagator.cs.
◆ CreatedEh() delegate void CreatedEh ( Expr term )Delegate type for when a new term using a registered function symbol is created internally
◆ DecideEh() delegate void DecideEh ( Expr term, uint idx, bool phase )Delegate type for callback into solver's branching. The values can be overridden by calling NextSplit.
Must be called. The object will not be garbage collected automatically even if the context is disposed
Definition at line 213 of file UserPropagator.cs.
215 if(!gch.IsAllocated)
void Dispose()
Disposes of the context.
◆ EqEh() delegate void EqEh ( Expr term, Expr value )Delegate type for equality or disequality callback
◆ FixedEh() delegate void FixedEh ( Expr term, Expr value )Delegate type for fixed callback Note that the life-time of the term and value only applies within the scope of the callback. That means the term and value cannot be stored in an array, dictionary or similar and accessed after the callback has returned. Use the functionality Dup on expressions to create a duplicate copy that extends the lifetime.
◆ Fresh()Virtual method for fresh. It can be overwritten by inherited class.
Definition at line 235 of file UserPropagator.cs.
UserPropagator(Solver s)
Propagator constructor from a solver class.
◆ NextSplit() bool NextSplit ( Expr e, uint idx, int phase ) inlineSet the next decision
null
to clear idx If the term is a bit-vector, then an index into the bit-vector being branched on phase The tentative truth-value (-1/false, 1/true, 0/let Z3 decide)
true
in case the value was successfully set; false
if the next split could not be set
Definition at line 376 of file UserPropagator.cs.
378 returnNative.Z3_solver_next_split(ctx.nCtx,
this.callback, e?.NativeObject ?? IntPtr.Zero, idx, phase) != 0;
◆ Pop() virtual void Pop ( uint n ) inlinevirtualVirtual method for pop. It must be overwritten by inherited class.
Definition at line 230 of file UserPropagator.cs.
230{
throw newZ3Exception(
"Pop method should be overwritten"); }
◆ Propagate() [1/2]Propagate consequence
true
if the propagated expression is new for the solver; false
if the propagation was ignored
Definition at line 272 of file UserPropagator.cs.
274var nTerms = Z3Object.ArrayToNative(terms.ToArray());
275var nLHS = Z3Object.ArrayToNative(equalities.LHS.ToArray());
276var nRHS = Z3Object.ArrayToNative(equalities.RHS.ToArray());
277 returnNative.Z3_solver_propagate_consequence(ctx.nCtx,
this.callback, (uint)nTerms.Length, nTerms, (uint)equalities.Count, nLHS, nRHS, conseq.NativeObject) != 0;
◆ Propagate() [2/2] bool Propagate ( IEnumerable< Expr > terms, Expr conseq ) inlinePropagate consequence
true
if the propagated expression is new for the solver; false
if the propagation was ignored
Definition at line 260 of file UserPropagator.cs.
262 return Propagate(terms,
newEqualityPairs(), conseq);
Referenced by UserPropagator.Conflict().
◆ Push()Virtual method for push. It must be overwritten by inherited class.
Definition at line 225 of file UserPropagator.cs.
225{
throw newZ3Exception(
"Push method should be overwritten"); }
◆ Register() void Register ( Expr term ) inlineTrack assignments to a term
Definition at line 384 of file UserPropagator.cs.
386 if(this.callback != IntPtr.Zero)
388Native.Z3_solver_propagate_register_cb(ctx.nCtx, callback, term.NativeObject);
392Native.Z3_solver_propagate_register(ctx.nCtx, solver.NativeObject, term.NativeObject);
◆ CreatedSet created callback
Definition at line 340 of file UserPropagator.cs.
344this.created_wrapper = _created;
345this.created_eh = value;
347Native.Z3_solver_propagate_created(ctx.nCtx, solver.NativeObject, created_wrapper);
◆ DecideSet decision callback
Definition at line 354 of file UserPropagator.cs.
358this.decide_wrapper = _decide;
359this.decide_eh = value;
361Native.Z3_solver_propagate_decide(ctx.nCtx, solver.NativeObject, decide_wrapper);
◆ DiseqSet disequality event callback
Definition at line 326 of file UserPropagator.cs.
330this.diseq_wrapper = _diseq;
331this.diseq_eh = value;
333Native.Z3_solver_propagate_diseq(ctx.nCtx, solver.NativeObject, diseq_wrapper);
◆ EqSet equality event callback
Definition at line 312 of file UserPropagator.cs.
316this.eq_wrapper = _eq;
319Native.Z3_solver_propagate_eq(ctx.nCtx, solver.NativeObject, eq_wrapper);
◆ FinalSet final callback
Definition at line 298 of file UserPropagator.cs.
302this.final_wrapper = _final;
303this.final_eh = value;
305Native.Z3_solver_propagate_final(ctx.nCtx, solver.NativeObject, final_wrapper);
◆ FixedSet fixed callback
Definition at line 284 of file UserPropagator.cs.
288this.fixed_wrapper = _fixed;
289this.fixed_eh = value;
291Native.Z3_solver_propagate_fixed(ctx.nCtx, solver.NativeObject, fixed_wrapper);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4