Z3
Public Member Functions
OnClause Class Reference

OnClause - clause inference callback More...

+ Inheritance diagram for OnClause:

Public Member Functions

delegate void OnClauseEh (Expr proof_hint, ASTVector clause)
 Delegate type for when clauses are inferred. An inference is a pair comprising of More...
 
 OnClause (Solver s, OnClauseEh onc)
 OnClause constructor More...
 
virtual void Dispose ()
 Must be called. The object will not be garbage collected automatically even if the context is disposed More...
 

Detailed Description

OnClause - clause inference callback


Definition at line 40 of file OnClause.cs.

Constructor & Destructor Documentation

◆ OnClause()

OnClause ( Solver  s,
OnClauseEh  onc 
)
inline

OnClause constructor


Definition at line 74 of file OnClause.cs.

75  {
76  gch = GCHandle.Alloc(this);
77  solver = s;
78  ctx = solver.Context;
79  on_clause = onc;
80  on_clause_eh = _on_clause;
81  Native.Z3_solver_register_on_clause(ctx.nCtx, solver.NativeObject, GCHandle.ToIntPtr(gch), on_clause_eh);
82  }
Context Context
Access Context object
Definition: Z3Object.cs:111

Member Function Documentation

◆ Dispose()

virtual void Dispose ( )
inlinevirtual

Must be called. The object will not be garbage collected automatically even if the context is disposed

Definition at line 95 of file OnClause.cs.

96  {
97  if (!gch.IsAllocated)
98  return;
99  gch.Free();
100  }

◆ OnClauseEh()

delegate void OnClauseEh ( Expr  proof_hint,
ASTVector  clause 
)

Delegate type for when clauses are inferred. An inference is a pair comprising of

  • a proof (hint). A partial (or comprehensive) derivation justifying the inference.
  • a clause (vector of literals) The life-time of the proof hint and clause vector is limited to the scope of the callback. should the callback want to store hints or clauses it will need to call Dup on the hints and/or extract literals from the clause, respectively.