Solvers. More...
Public Member Functions | |
void | Set (string name, bool value) |
Sets parameter on the solver More... | |
void | Set (string name, uint value) |
Sets parameter on the solver More... | |
void | Set (string name, double value) |
Sets parameter on the solver More... | |
void | Set (string name, string value) |
Sets parameter on the solver More... | |
void | Push () |
Creates a backtracking point. More... | |
void | Pop (uint n=1) |
Backtracks n backtracking points. More... | |
void | Reset () |
Resets the Solver. More... | |
void | Assert (params Z3_ast[] constraints) |
Assert a constraint (or multiple) into the solver. More... | |
void | Add (params Z3_ast[] constraints) |
Alias for Assert. More... | |
void | Add (IEnumerable< Z3_ast > constraints) |
Alias for Assert. More... | |
void | AssertInjective (Z3_func_decl f) |
Add constraints to ensure the function f can only be injective. Example: for function f : D1 x D2 -> R assert axioms forall (x1 : D1, x2 : D2) x1 = inv1(f(x1,x2)) forall (x1 : D1, x2 : D2) x2 = inv2(f(x1,x2)) More... | |
void | AssertAndTrack (Z3_ast[] constraints, Z3_ast[] ps) |
Assert multiple constraints into the solver, and track them (in the unsat) core using the Boolean constants in ps. More... | |
void | AssertAndTrack (Z3_ast constraint, Z3_ast p) |
Assert a constraint into the solver, and track it (in the unsat) core using the Boolean constant p. More... | |
void | FromFile (string file) |
Load solver assertions from a file. More... | |
void | FromString (string str) |
Load solver assertions from a string. More... | |
Status | Check (params Z3_ast[] assumptions) |
Checks whether the assertions in the solver are consistent or not. More... | |
Status | Check (IEnumerable< Z3_ast > assumptions) |
Checks whether the assertions in the solver are consistent or not. More... | |
NativeSolver | Translate (NativeContext ctx) |
Create a clone of the current solver with respect to ctx . More... | |
void | ImportModelConverter (NativeSolver src) |
Import model converter from other solver. More... | |
override string | ToString () |
A string representation of the solver. More... | |
void | Dispose () |
Disposes of the underlying native Z3 object. More... | |
Properties | |
string | Help [get] |
A string that describes all available solver parameters. More... | |
uint | NumScopes [get] |
The current number of backtracking points (scopes). More... | |
uint | NumAssertions [get] |
The number of assertions in the solver. More... | |
Z3_ast[] | Assertions [get] |
The set of asserted formulas. More... | |
Z3_ast[] | Units [get] |
Currently inferred units. More... | |
NativeModel? | Model [get] |
The model of the last Check(params Expr[] assumptions) . More... | |
Z3_ast | Proof [get] |
The proof of the last Check(params Expr[] assumptions) . More... | |
Z3_ast[] | UnsatCore [get] |
The unsat core of the last Check . More... | |
string | ReasonUnknown [get] |
A brief justification of why the last call to Check returned UNKNOWN . More... | |
Statistics.Entry[] | Statistics [get] |
Solver statistics. More... | |
Solvers.
Definition at line 40 of file NativeSolver.cs.
void Add | ( | IEnumerable< Z3_ast > | constraints | ) |
Alias for Assert.
void Add | ( | params Z3_ast[] | constraints | ) |
Alias for Assert.
|
inline |
Assert a constraint (or multiple) into the solver.
Definition at line 153 of file NativeSolver.cs.
Referenced by NativeSolver.AssertInjective(), and NativeSolver.Translate().
Assert a constraint into the solver, and track it (in the unsat) core using the Boolean constant p.
This API is an alternative to Check(Z3_ast[]) with assumptions for extracting unsat cores. Both APIs can be used in the same solver. The unsat core will contain a combination of the Boolean variables provided using AssertAndTrack(Z3_ast[],Z3_ast[]) and the Boolean literals provided using Check(Z3_ast[]) with assumptions.
Definition at line 242 of file NativeSolver.cs.
Assert multiple constraints into the solver, and track them (in the unsat) core using the Boolean constants in ps.
This API is an alternative to Check(Z3_ast[]) with assumptions for extracting unsat cores. Both APIs can be used in the same solver. The unsat core will contain a combination of the Boolean variables provided using AssertAndTrack(Z3_ast[],Z3_ast[]) and the Boolean literals provided using Check(Z3_ast[]) with assumptions.
Definition at line 219 of file NativeSolver.cs.
|
inline |
Add constraints to ensure the function f can only be injective. Example: for function f : D1 x D2 -> R assert axioms forall (x1 : D1, x2 : D2) x1 = inv1(f(x1,x2)) forall (x1 : D1, x2 : D2) x2 = inv2(f(x1,x2))
f |
Definition at line 183 of file NativeSolver.cs.
Checks whether the assertions in the solver are consistent or not.
Definition at line 306 of file NativeSolver.cs.
Checks whether the assertions in the solver are consistent or not.
Definition at line 288 of file NativeSolver.cs.
|
inline |
Disposes of the underlying native Z3 object.
Definition at line 428 of file NativeSolver.cs.
void FromFile | ( | string | file | ) |
Load solver assertions from a file.
void FromString | ( | string | str | ) |
Load solver assertions from a string.
|
inline |
Import model converter from other solver.
Definition at line 374 of file NativeSolver.cs.
void Pop | ( | uint | n = 1 | ) |
Backtracks n backtracking points.
Note that an exception is thrown if n is not smaller than NumScopes
void Push | ( | ) |
Creates a backtracking point.
void Reset | ( | ) |
Resets the Solver.
This removes all assertions from the solver.
|
inline |
Sets parameter on the solver
Definition at line 59 of file NativeSolver.cs.
|
inline |
Sets parameter on the solver
Definition at line 75 of file NativeSolver.cs.
|
inline |
Sets parameter on the solver
Definition at line 83 of file NativeSolver.cs.
|
inline |
Sets parameter on the solver
Definition at line 67 of file NativeSolver.cs.
|
inline |
A string representation of the solver.
Definition at line 396 of file NativeSolver.cs.
|
inline |
Create a clone of the current solver with respect to ctx
.
Definition at line 365 of file NativeSolver.cs.
|
get |
The set of asserted formulas.
Definition at line 271 of file NativeSolver.cs.
|
get |
A string that describes all available solver parameters.
Definition at line 45 of file NativeSolver.cs.
|
get |
The model of the last Check(params Expr[] assumptions)
.
The result is null
if Check(params Expr[] assumptions)
was not invoked before, if its results was not SATISFIABLE
, or if model production is not enabled.
Definition at line 324 of file NativeSolver.cs.
|
get |
The number of assertions in the solver.
Definition at line 265 of file NativeSolver.cs.
|
get |
The current number of backtracking points (scopes).
Definition at line 129 of file NativeSolver.cs.
|
get |
The proof of the last Check(params Expr[] assumptions)
.
The result is null
if Check(params Expr[] assumptions)
was not invoked before, if its results was not UNSATISFIABLE
, or if proof production is disabled.
Definition at line 342 of file NativeSolver.cs.
|
get |
A brief justification of why the last call to Check
returned UNKNOWN
.
Definition at line 359 of file NativeSolver.cs.
|
get |
Solver statistics.
Definition at line 384 of file NativeSolver.cs.
|
get |
Currently inferred units.
Definition at line 277 of file NativeSolver.cs.
|
get |
The unsat core of the last Check
.
The unsat core is a subset of Assertions
The result is empty if Check
was not invoked before, if its results was not UNSATISFIABLE
, or if core production is disabled.
Definition at line 353 of file NativeSolver.cs.