Skip to content

Commit

Permalink
Clarify optimizer guarantees (#7030)
Browse files Browse the repository at this point in the history
* Clarify optimizer guarantees (python)

* Clarify optimization guarantees (OCaml)

* Clarify optimizer guarantees (java)

* Clarify optimizer guarantees (.net)
  • Loading branch information
hexagonrecursion committed Dec 4, 2023
1 parent 6910a4e commit 18f1492
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/dotnet/Optimize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public Handle AssertSoft(BoolExpr constraint, uint weight, string group)
/// <summary>
/// Check satisfiability of asserted constraints.
/// Produce a model that (when the objectives are bounded and
/// don't use strict inequalities) meets the objectives.
/// don't use strict inequalities) is optimal.
/// </summary>
///
public Status Check(params Expr[] assumptions)
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/Optimize.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public Handle<?> AssertSoft(Expr<BoolSort> constraint, String weight, String gro
/**
* Check satisfiability of asserted constraints.
* Produce a model that (when the objectives are bounded and
* don't use strict inequalities) meets the objectives.
* don't use strict inequalities) is optimal.
**/
public Status Check(Expr<BoolSort>... assumptions)
{
Expand Down
2 changes: 1 addition & 1 deletion src/api/ml/z3.mli
Original file line number Diff line number Diff line change
Expand Up @@ -3481,7 +3481,7 @@ sig
(** Add minimization objective. *)
val minimize : optimize -> Expr.expr -> handle

(** Checks whether the assertions in the context are satisfiable and solves objectives. *)
(** Check consistency and produce optimal values. *)
val check : optimize -> Solver.status

(** Retrieve model from satisfiable context *)
Expand Down
2 changes: 1 addition & 1 deletion src/api/python/z3/z3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8046,7 +8046,7 @@ def pop(self):
Z3_optimize_pop(self.ctx.ref(), self.optimize)

def check(self, *assumptions):
"""Check satisfiability while optimizing objective functions."""
"""Check consistency and produce optimal values."""
assumptions = _get_args(assumptions)
num = len(assumptions)
_assumptions = (Ast * num)()
Expand Down

0 comments on commit 18f1492

Please sign in to comment.