A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://z3prover.github.io/api/html/class_microsoft_1_1_z3_1_1_user_propagator.html below:

Z3: UserPropagator Class Reference

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...
  delegate void  EqEh (Expr term, Expr value)   Delegate type for equality or disequality callback More...
  delegate void  CreatedEh (Expr term)   Delegate type for when a new term using a registered function symbol is created internally More...
  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. More...
    UserPropagator (Solver s)   Propagator constructor from a solver class. More...
    UserPropagator (Context _ctx)   Propagator constructor from a context. It is used from inside of Fresh. More...
  virtual void  Dispose ()   Must be called. The object will not be garbage collected automatically even if the context is disposed More...
  virtual void  Push ()   Virtual method for push. It must be overwritten by inherited class. More...
  virtual void  Pop (uint n)   Virtual method for pop. It must be overwritten by inherited class. More...
  virtual UserPropagator  Fresh (Context ctx)   Virtual method for fresh. It can be overwritten by inherited class. More...
  void  Conflict (params Expr[] terms)   Declare combination of assigned expressions a conflict More...
  void  Conflict (IEnumerable< Expr > terms)   Declare combination of assigned expressions a conflict More...
  bool  Propagate (IEnumerable< Expr > terms, Expr conseq)   Propagate consequence
Returns
true if the propagated expression is new for the solver; false if the propagation was ignored
More...
  bool  Propagate (IEnumerable< Expr > terms, EqualityPairs equalities, Expr conseq)   Propagate consequence
Returns
true if the propagated expression is new for the solver; false if the propagation was ignored
More...
  bool  NextSplit (Expr e, uint idx, int phase)   Set the next decision
Parameters
e A bit-vector or Boolean used for branching. Use 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)
More...
  void  Register (Expr term)   Track assignments to a term More...
 

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.

183

gch = GCHandle.Alloc(

this

);

189

Native.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.

197

gch = GCHandle.Alloc(

this

);

◆ Conflict() [1/2] void Conflict ( IEnumerable< Exprterms ) inline

Declare 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 ) inline

Declare 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.

Parameters
term A bit-vector or Boolean used for branching idx If the term is a bit-vector, then an index into the bit-vector being branched on phase The tentative truth-value
◆ Dispose()

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  ) inline

Set the next decision

Parameters
e A bit-vector or Boolean used for branching. Use 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)
Returns
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  return

Native.Z3_solver_next_split(ctx.nCtx,

this

.callback, e?.NativeObject ?? IntPtr.Zero, idx, phase) != 0;

◆ Pop() virtual void Pop ( uint  n ) inlinevirtual

Virtual method for pop. It must be overwritten by inherited class.

Definition at line 230 of file UserPropagator.cs.

230

{

throw new

Z3Exception(

"Pop method should be overwritten"

); }

◆ Propagate() [1/2]

Propagate consequence

Returns
true if the propagated expression is new for the solver; false if the propagation was ignored

Definition at line 272 of file UserPropagator.cs.

274

var nTerms = Z3Object.ArrayToNative(terms.ToArray());

275

var nLHS = Z3Object.ArrayToNative(equalities.LHS.ToArray());

276

var nRHS = Z3Object.ArrayToNative(equalities.RHS.ToArray());

277  return

Native.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< Exprterms, Expr  conseq  ) inline

Propagate consequence

Returns
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,

new

EqualityPairs(), 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 new

Z3Exception(

"Push method should be overwritten"

); }

◆ Register() void Register ( Expr  term ) inline

Track assignments to a term

Definition at line 384 of file UserPropagator.cs.

386  if

(this.callback != IntPtr.Zero)

388

Native.Z3_solver_propagate_register_cb(ctx.nCtx, callback, term.NativeObject);

392

Native.Z3_solver_propagate_register(ctx.nCtx, solver.NativeObject, term.NativeObject);

◆ Created

Set created callback

Definition at line 340 of file UserPropagator.cs.

344

this.created_wrapper = _created;

345

this.created_eh = value;

347

Native.Z3_solver_propagate_created(ctx.nCtx, solver.NativeObject, created_wrapper);

◆ Decide

Set decision callback

Definition at line 354 of file UserPropagator.cs.

358

this.decide_wrapper = _decide;

359

this.decide_eh = value;

361

Native.Z3_solver_propagate_decide(ctx.nCtx, solver.NativeObject, decide_wrapper);

◆ Diseq

Set disequality event callback

Definition at line 326 of file UserPropagator.cs.

330

this.diseq_wrapper = _diseq;

331

this.diseq_eh = value;

333

Native.Z3_solver_propagate_diseq(ctx.nCtx, solver.NativeObject, diseq_wrapper);

◆ Eq

Set equality event callback

Definition at line 312 of file UserPropagator.cs.

316

this.eq_wrapper = _eq;

319

Native.Z3_solver_propagate_eq(ctx.nCtx, solver.NativeObject, eq_wrapper);

◆ Final

Set final callback

Definition at line 298 of file UserPropagator.cs.

302

this.final_wrapper = _final;

303

this.final_eh = value;

305

Native.Z3_solver_propagate_final(ctx.nCtx, solver.NativeObject, final_wrapper);

◆ Fixed

Set fixed callback

Definition at line 284 of file UserPropagator.cs.

288

this.fixed_wrapper = _fixed;

289

this.fixed_eh = value;

291

Native.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