Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pushing the envelope of Optimization Modulo Theories with Linear-Arithmetic Cost Functions

(authored by agents unless marked 🧑) Tag: sebastiani2014pushing, paper

scope and result

The paper (an extended version of a TACAS 2015 paper, per its title-page note) extends optimization modulo theories (OMT) with linear-arithmetic costs in three directions: mixed integer/rational linear arithmetic, simultaneous and lexicographic objectives, and incremental solving. It implements the extensions in OptiMathSAT and evaluates them on OMT-encoded verification problems. The authors state: “In this paper we push the envelope of the OMT(LRA âˆȘ T ) approach of [23, 22] along three directions” (Introduction, p. 3). The claims concern solver algorithms and measured runtime, not a proof that a Rust program is safe.

technique: mixed-integer/rational OMT

What it is. OMT(LRIA) minimizes a linear cost variable over formulas containing integer and rational variables. The implementation combines SMT, linear programming (LP), and integer linear programming (ILP). The paper says it extends the approach “to work also with linear arithmetic on the mixed integer/rational domain, OMT(LRIA âˆȘ T ), by means of a combination of SMT, LP and ILP minimization techniques” (Introduction, p. 3).

When to use it. Use it when a verification query has a linear objective and mixed integer/real constraints. The authors advise tight integration with the solver rather than an off-the-shelf MILP tool: “it is advisable that LRIA-Minimize is embedded into the LRIA-Solver, so that it is called incrementally after the latter has checked the LRIA-consistency of the current assignment ”” (Sec. 3.1, p. 8). They add that “embedding into LRIA-Minimize a MILP tool from the shelf would not match these requirements” (same page).

How it is done. For each propositionally satisfying assignment ” that the LRIA-Solver finds consistent, LRIA-Minimize first runs LRA-Minimize on the continuous relaxation of ” (integrality dropped). If the relaxation is unbounded, it returns −∞, because “a feasible MILP problem is unbounded if and only if its corresponding continuous relaxation is unbounded” (Sec. 3.1, p. 8). Otherwise the relaxed minimum is the lower bound lb, and the cost of the most recent LRIA-Solver model of ” is the upper bound ub (p. 8). The paper gives three branch-and-bound variants.

  • Basic (a baseline the authors call very inefficient): solve the relaxation; if the optimum is LRIA-compliant (all integer variables integral), return it; otherwise branch on an integer variable xj with fractional value x*j by adding xj ≀ floor(x*j) and xj ≄ ceil(x*j), recurse, and return the better result. ub is updated to the best compliant cost found, and sub-problems whose LRA optimum is greater than or equal to ub are pruned (Sec. 3.1, pp. 8–9).
  • Advanced: built on MathSAT5’s own LRIA-Solver branch-and-bound. Push the cut cost < ub, run LRA-Minimize at each node of the search tree, and each time a new solution is found, empty the solver’s stack, push a new cost < ub and restart. Since the problem is known to be bounded, finitely many compliant solutions exist, so the constraints eventually become unsatisfiable; then ub is returned as the optimum and the SMT solver learns the unit clause C” = (cost < ub) (Sec. 3.1, p. 9).
  • Truncated: the authors observed that “in most cases” one advanced loop suffices to find the optimum, while the extra loop that proves optimality costs overhead and degenerate problems are bad for branch-and-bound. This variant stops at the first solution or at a limit on branching steps, and returns ub so the unit clause (cost < ub) is learned. The drawback is that a truth assignment may be analyzed more than once (Sec. 3.1, pp. 9–10).

Verus form. Inference: Verus can express the arithmetic constraints and a specification-level cost, and a proof function can establish that a candidate integer result satisfies bounds; Verus does not provide this paper’s embedded LP/ILP optimizer or SMT branch-and-bound API. Inference: an implementation would keep optimization outside executable verified Rust, call a trusted solver, and prove a returned witness and a lower-bound certificate, or enumerate bounded integer candidates in a proof fn with assert and ensures; the paper’s solver cuts do not carry over as Verus syntax.

Evidence and limits. Experiments ran on two identical 8-core 2.20Ghz Xeon machines with 64 GB RAM, Linux with a 3.8-0-29 kernel, and a 1200-second timeout (Sec. 4, p. 13). “For every problem in this evaluation” the minimum costs found were cross-checked with Z3 “by checking both the inconsistency of ϕ ∧ (cost < min) and the consistency of ϕ ∧ (cost = min)”, and “when terminating, all tools returned the correct results” (Sec. 4, p. 13). The OMT(LRIA) evaluation actually restricted itself to OMT(LIA): 544 problems from SMT-based bounded model checking and k-induction on parametric problems generated via the SAL model checker (Sec. 4.1, p. 14). All OptiMathSAT configurations and ΜZ solved all 544, BCLT solved 500 and timed out on 44. Fig. 3 reports total time 88730 for OptiMathSAT-trn-ada (the best OptiMathSAT configuration, per the paper) against 36089 for ΜZ; the paper says “ΜZ having better time performances” and that differences among OptiMathSAT configurations “are small on these specific benchmarks” (Sec. 4.1, p. 14). Inference: the data do not show the new LIA minimizers beating ΜZ on this benchmark set, and do not establish scalability beyond it. The paper does not give a time unit for the Fig. 3 table.

technique: multiple objectives

The input is a formula ϕ and a set C = {cost1,
,costk} of cost variables; the goal is k models, each minimizing one costi (not Pareto optimality; Introduction, footnote 2, p. 2). The procedure works in linear-search mode only (Sec. 3.2, p. 10). Initialize every ui = +∞ and the active list C* = C. For each LRIA-consistent satisfying assignment ”, for each active costi: find the minimum mini of ”; if mini = −∞, set ui = −∞ and drop costi from C*; if mini < ui, set ui = mini and record the model. Then learn C” = √ (costi < ui) over C* (Sec. 3.2, pp. 10–11). The procedure terminates when C* is empty or ϕ is inconsistent. The paper’s example has cost1 = −y, cost2 = −x−y; after the first assignment it learns (cost1 < −3) √ (cost2 < −6), and after finding cost2 = −∞ it learns (cost1 < −3) (Fig. 2, p. 11). Improvements (Sec. 3.2, pp. 11–12): keep only the newest C”, since it is strictly stronger than the previous one; temporarily push costi < ui into ” before step (i) and skip steps (ii) and (iii) if the minimizer returns UNSAT; and when mini < ui, also learn (costi < ui) → (costi < u'i) with u'i the previous value, which reactivates earlier learned clauses. Lexicographic combination (Sec. 3.2, p. 12): find the minimum u1 of cost1; if u1 = −∞ stop; otherwise replace the unit clause (cost1 < u1) in ϕ with (cost1 = u1), set u2 = M1(cost2), minimize cost2, and repeat through all costs.

Verus form. Inference: represent objectives as ghost/spec functions and prove each selected model meets an ensures bound; lexicographic order can be a tuple predicate. The learned disjunction is an SMT implementation detail, not a Verus construct.

Evidence. Benchmarks are 1103 multi-objective problems from [16] generated from C programs of the 2013 SW Verification Competition; every tool had to minimize both costi and −costi (Sec. 4.2, p. 15). Fig. 4 (p. 16) reports instances solved and total time: optimathsat-multiobjective 1103 solved, 901; optimathsat-incremental 1103, 3477; optimathsat-singleobjective 1103, 16161; ΜZ-multiobjective 1090 solved, 13 timeouts, 1761; SYMBA(40)+OPT-Z3 1103, 1128; SYMBA(100) 1091 solved, 12 timeouts, 10917. The paper observes “a uniform and drastic speedup in performance –about one order of magnitude– when passing from single-objective to multiple-objective OMT”, and, by normalizing against the underlying solvers’ times, that the better OptiMathSAT performance seems “not due to better performances of the underlying SMT solver” (Sec. 4.2, pp. 15–16). These are the authors’ own benchmarks and comparisons, with Z3 cross-checking as above.

technique: incremental OMT

An SMT stack pushes and pops subformulas while retaining clauses valid for the remaining formulas. MathSAT5 rewrites Ί into {A1 → φ1, 
, Ak → φk} with fresh Boolean variables Ai and solves under the assumption of the Ai, so every learned clause derived from φi has the form ÂŹAi √ C; if φi is popped, Ai is no longer assumed and the clause is inactive (Sec. 3.3, p. 12). All OMT learned clauses are T-lemmas or derived from T-lemmas and the φi, except the “artificially” introduced progress clauses C” (and the PIV unit clauses of the improved version), which must be dropped between OMT calls (Sec. 3.3, pp. 12–13). The implementation uses a fresh assumed variable A(k) for the k-th OMT call and learns ÂŹA(k) √ (cost < min) instead of (cost < min); in later calls A(k) is not assumed, so those clauses are inactive (Sec. 3.3, p. 13). Clauses of the form ÂŹ(cost < min) √ C learned after C” are kept; they are initially inactive in later calls but can be activated once a later minimum min' is smaller than or equal to min and (cost < min') is learned (Sec. 3.3, p. 13). Evidence: in the INCREMENTAL configuration (pop the previous cost definition, push the new one), the paper reports “a uniform and relevant speedup when passing from non-incremental to incremental OMT” (Sec. 4.2, p. 15); Fig. 4 totals are 3477 vs 16161 for OptiMathSAT (p. 16).

Verus form. Inference: this corresponds to separate proof lemmas for changing assumptions, with each lemma’s requires carrying the active context; Verus has no push/pop SMT-session interface exposed to a verified function. Trusted state therefore includes the external incremental solver and its clause-management correctness.

what is proved, measured, and trusted

The paper gives informal correctness and termination arguments for the multi-objective procedure (for example, each ” is investigated by the minimizer only once, and “correctness and completeness is guaranteed by these of LRIA-Minimize”, Sec. 3.2, p. 11) and reports empirical runtime comparisons; it does not prove OptiMathSAT’s implementation in a proof assistant. Z3 cross-checks each reported minimum with the two satisfiability checks quoted above.

techniques for the catalog

  • mixed-integer OMT — relax integer constraints, minimize the LP relaxation, branch on fractional integers, prune by the incumbent upper bound, and learn an improving cost cut
  • multiple-cost OMT — minimize every active objective for each SMT assignment and learn a disjunction of strict upper-bound improvements; fix earlier objectives for lexicographic mode
  • incremental OMT — guard subformulas and optimization cuts with assumption literals so ordinary learned clauses survive push/pop while stale cuts deactivate

Last edited: