Object for managing optimization context More...
Data Structures | |
class | Handle |
Handle to objectives returned by objective functions. More... | |
Public Member Functions | |
void | Set (string name, bool value) |
Sets parameter on the optimize solver More... | |
void | Set (string name, uint value) |
Sets parameter on the optimize solver More... | |
void | Set (string name, double value) |
Sets parameter on the optimize solver More... | |
void | Set (string name, string value) |
Sets parameter on the optimize solver More... | |
void | Set (string name, Symbol value) |
Sets parameter on the optimize solver More... | |
void | Set (Symbol name, bool value) |
Sets parameter on the optimize solver More... | |
void | Set (Symbol name, uint value) |
Sets parameter on the optimize solver More... | |
void | Set (Symbol name, double value) |
Sets parameter on the optimize solver More... | |
void | Set (Symbol name, string value) |
Sets parameter on the optimize solver More... | |
void | Set (Symbol name, Symbol value) |
Sets parameter on the optimize solver More... | |
void | Assert (params BoolExpr[] constraints) |
Assert a constraint (or multiple) into the optimize solver. More... | |
void | Assert (IEnumerable< BoolExpr > constraints) |
Assert a constraint (or multiple) into the optimize solver. More... | |
void | Add (params BoolExpr[] constraints) |
Alias for Assert. More... | |
void | Add (IEnumerable< BoolExpr > constraints) |
Alias for Assert. More... | |
Handle | AssertSoft (BoolExpr constraint, uint weight, string group) |
Assert soft constraint More... | |
Status | Check (params Expr[] assumptions) |
Check satisfiability of asserted constraints. Produce a model that (when the objectives are bounded and don't use strict inequalities) is optimal. More... | |
void | Push () |
Creates a backtracking point. More... | |
void | Pop () |
Backtrack one backtracking point. More... | |
Handle | MkMaximize (Expr e) |
Declare an arithmetical maximization objective. Return a handle to the objective. The handle is used as to retrieve the values of objectives after calling Check. The expression can be either an arithmetical expression or bit-vector. More... | |
Handle | MkMinimize (Expr e) |
Declare an arithmetical minimization objective. Similar to MkMaximize. More... | |
override string | ToString () |
Print the context to a string (SMT-LIB parseable benchmark). More... | |
void | FromFile (string file) |
Parse an SMT-LIB2 file with optimization objectives and constraints. The parsed constraints and objectives are added to the optimization context. More... | |
void | FromString (string s) |
Similar to FromFile. Instead it takes as argument a string. More... | |
Public Member Functions inherited from Z3Object | |
void | Dispose () |
Disposes of the underlying native Z3 object. More... | |
Properties | |
string | Help [get] |
A string that describes all available optimize solver parameters. More... | |
Params | Parameters [set] |
Sets the optimize solver parameters. More... | |
ParamDescrs | ParameterDescriptions [get] |
Retrieves parameter descriptions for Optimize solver. More... | |
Model | Model [get] |
The model of the last Check . More... | |
BoolExpr[] | UnsatCore [get] |
The unsat core of the last Check . More... | |
String | ReasonUnknown [get] |
Return a string the describes why the last to check returned unknown More... | |
BoolExpr[] | Assertions [get] |
The set of asserted formulas. More... | |
Expr[] | Objectives [get] |
The set of asserted formulas. More... | |
Statistics | Statistics [get] |
Optimize statistics. More... | |
Properties inherited from Z3Object | |
Context | Context [get] |
Access Context object More... | |
Object for managing optimization context
Definition at line 30 of file Optimize.cs.
|
inline |
|
inline |
|
inline |
Assert a constraint (or multiple) into the optimize solver.
Definition at line 116 of file Optimize.cs.
|
inline |
Assert a constraint (or multiple) into the optimize solver.
Definition at line 108 of file Optimize.cs.
Assert soft constraint
Return an objective which associates with the group of constraints.
Definition at line 212 of file Optimize.cs.
Check satisfiability of asserted constraints. Produce a model that (when the objectives are bounded and don't use strict inequalities) is optimal.
Definition at line 226 of file Optimize.cs.
|
inline |
Parse an SMT-LIB2 file with optimization objectives and constraints. The parsed constraints and objectives are added to the optimization context.
Definition at line 378 of file Optimize.cs.
|
inline |
Similar to FromFile. Instead it takes as argument a string.
Definition at line 386 of file Optimize.cs.
Declare an arithmetical maximization objective. Return a handle to the objective. The handle is used as to retrieve the values of objectives after calling Check. The expression can be either an arithmetical expression or bit-vector.
Definition at line 303 of file Optimize.cs.
Declare an arithmetical minimization objective. Similar to MkMaximize.
Definition at line 312 of file Optimize.cs.
|
inline |
Backtrack one backtracking point.
Note that an exception is thrown if Pop is called without a corresponding Push
Definition at line 254 of file Optimize.cs.
|
inline |
|
inline |
Sets parameter on the optimize solver
Definition at line 59 of file Optimize.cs.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Print the context to a string (SMT-LIB parseable benchmark).
Definition at line 369 of file Optimize.cs.
|
get |
The set of asserted formulas.
Definition at line 394 of file Optimize.cs.
|
get |
A string that describes all available optimize solver parameters.
Definition at line 35 of file Optimize.cs.
The model of the last Check
.
The result is null
if Check
was not invoked before, if its results was not SATISFIABLE
, or if model production is not enabled.
Definition at line 267 of file Optimize.cs.
|
get |
The set of asserted formulas.
Definition at line 407 of file Optimize.cs.
|
get |
Retrieves parameter descriptions for Optimize solver.
Definition at line 100 of file Optimize.cs.
|
set |
Sets the optimize solver parameters.
Definition at line 46 of file Optimize.cs.
Referenced by Optimize.Set().
|
get |
Return a string the describes why the last to check returned unknown
Definition at line 357 of file Optimize.cs.
|
get |
Optimize statistics.
Definition at line 421 of file Optimize.cs.
|
get |
The unsat core of the last Check
.
The unsat core is a subset of assumptions
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 287 of file Optimize.cs.