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
xjwith fractional valuex*jby addingxj †floor(x*j)andxj â„ ceil(x*j), recurse, and return the better result.ubis updated to the best compliant cost found, and sub-problems whose LRA optimum is greater than or equal toubare 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 newcost < uband restart. Since the problem is known to be bounded, finitely many compliant solutions exist, so the constraints eventually become unsatisfiable; thenubis returned as the optimum and the SMT solver learns the unit clauseC” = (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
ubso 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: