|
| void | Set (string name, bool value) |
| | Sets parameter on the solver.
|
| |
| void | Set (string name, uint value) |
| | Sets parameter on the solver.
|
| |
| void | Set (string name, double value) |
| | Sets parameter on the solver.
|
| |
| void | Set (string name, string value) |
| | Sets parameter on the solver.
|
| |
| void | Set (string name, Symbol value) |
| | Sets parameter on the solver.
|
| |
| void | Set (Symbol name, bool value) |
| | Sets parameter on the solver.
|
| |
| void | Set (Symbol name, uint value) |
| | Sets parameter on the solver.
|
| |
| void | Set (Symbol name, double value) |
| | Sets parameter on the solver.
|
| |
| void | Set (Symbol name, string value) |
| | Sets parameter on the solver.
|
| |
| void | Set (Symbol name, Symbol value) |
| | Sets parameter on the solver.
|
| |
| void | Push () |
| | Creates a backtracking point.
|
| |
| void | Pop (uint n=1) |
| | Backtracks n backtracking points.
|
| |
| void | Reset () |
| | Resets the Solver.
|
| |
| void | Assert (params BoolExpr[] constraints) |
| | Assert a constraint (or multiple) into the solver.
|
| |
| void | Add (params BoolExpr[] constraints) |
| | Alias for Assert.
|
| |
| void | Add (IEnumerable< BoolExpr > constraints) |
| | Alias for Assert.
|
| |
| void | AssertAndTrack (BoolExpr[] constraints, BoolExpr[] ps) |
| | Assert multiple constraints into the solver, and track them (in the unsat) core using the Boolean constants in ps.
|
| |
| void | AssertAndTrack (BoolExpr constraint, BoolExpr p) |
| | Assert a constraint into the solver, and track it (in the unsat) core using the Boolean constant p.
|
| |
| void | FromFile (string file) |
| | Load solver assertions from a file.
|
| |
| void | FromString (string str) |
| | Load solver assertions from a string.
|
| |
| Status | Check (params Expr[] assumptions) |
| | Checks whether the assertions in the solver are consistent or not.
|
| |
| Status | Check (IEnumerable< BoolExpr > assumptions) |
| | Checks whether the assertions in the solver are consistent or not.
|
| |
| Status | Consequences (IEnumerable< BoolExpr > assumptions, IEnumerable< Expr > variables, out BoolExpr[] consequences) |
| | Retrieve fixed assignments to the set of variables in the form of consequences. Each consequence is an implication of the form.
|
| |
| IEnumerable< BoolExpr[]> | Cube () |
| | Return a set of cubes.
|
| |
| Solver | Translate (Context ctx) |
| | Create a clone of the current solver with respect to ctx.
|
| |
| void | ImportModelConverter (Solver src) |
| | Import model converter from other solver.
|
| |
| override string | ToString () |
| | A string representation of the solver.
|
| |
| void | Dispose () |
| | Disposes of the underlying native Z3 object.
|
| |
Solvers.
Definition at line 30 of file Solver.cs.
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(Expr[]) 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(BoolExpr[],BoolExpr[]) and the Boolean literals provided using Check(Expr[]) with assumptions.
Definition at line 264 of file Solver.cs.
265 {
266 Debug.Assert(constraint != null);
267 Debug.Assert(p != null);
268 Context.CheckContextMatch(constraint);
270
271 Native.Z3_solver_assert_and_track(
Context.nCtx, NativeObject, constraint.NativeObject, p.NativeObject);
272 }
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(Expr[]) 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(BoolExpr[],BoolExpr[]) and the Boolean literals provided using Check(Expr[]) with assumptions.
Definition at line 239 of file Solver.cs.
240 {
241 Debug.Assert(constraints != null);
242 Debug.Assert(constraints.All(c => c != null));
243 Debug.Assert(ps.All(c => c != null));
244 Context.CheckContextMatch<BoolExpr>(constraints);
245 Context.CheckContextMatch<BoolExpr>(ps);
246 if (constraints.Length != ps.Length)
247 throw new Z3Exception("Argument size mismatch");
248
249 for (int i = 0 ; i < constraints.Length; i++)
250 Native.Z3_solver_assert_and_track(
Context.nCtx, NativeObject, constraints[i].NativeObject, ps[i].NativeObject);
251 }