Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion Leveraging Linear and Mixed Integer Programming for SMT Tim King 1 Clark Barrett 1 Cesare Tinelli 2 1 New York University 2 The University of Iowa October 23, 2014
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion A PPROACH ◮ Floating point LP/MIP solver within SMT to: 1. Reseed the Simplex solver 2. Replay an MIP proof
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion A PPROACH ◮ Floating point LP/MIP solver within SMT to: 1. Reseed the Simplex solver 2. Replay an MIP proof ◮ Philosophy ◮ Solve hard/unsolved problems ◮ Augment SMT solver ◮ Minimize changes in search by external solver
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion T ABLE OF C ONTENTS Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion D ECISION P ROCEDURE FOR QF LRA Q UANTIFIER F REE L INEAR R EAL A RITHMETIC Is there a satisfying assignment, a : X → R , that makes, + ≥ x y 1 x − y ≥ 0 − ≤ 4 x y 2 evaluate to true?
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion D ECISION P ROCEDURE FOR QF LRA Q UANTIFIER F REE L INEAR R EAL A RITHMETIC Is there a satisfying assignment, a : X → R , that makes, + ≥ x y 1 x − y ≥ 0 − ≤ 4 x y 2 evaluate to true? 1 a x = 2 1 a y 2
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion V ISUALLY y + ≥ x y 1 x − y ≥ 0 − ≤ 4 x y 2 1 a x a = 2 1 (0,0) a y x 2
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion P REPROCESSING ◮ Introduce a fresh s i for each � T i , j · x j ◮ Literals are of the form: � � � ∧ s i = T i , j · x j l i ≤ x i ≤ u i x j and s i appears in exactly 1 equality. ◮ Collect into: T X = 0 and l ≤ X ≤ u
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion B ASIC , N ONBASIC , & T ABLEAU ◮ Every row in T is solved for a variable x i � x i = T i , j x j x j ∈N ◮ Not solved for variables are nonbasic ( x j ∈ N ) ◮ Set of solved for variables are basic ( x i ∈ B )
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion U PDATING N ONBASIC V ARIABLES Changing the assignment to j ∈ N is easy procedure U PDATE ( j , δ ) a j ← a j + δ for all basic x i do a i ← a i + T i , j · δ
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion U PDATING N ONBASIC V ARIABLES Changing the assignment to j ∈ N is easy procedure U PDATE ( j , δ ) a j ← a j + δ for all basic x i do a i ← a i + T i , j · δ Add the Invariant The nonbasic variables satisfy their bounds.
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion P IVOT ( i , j ) M OVE V ARIABLES I N /O UT OF B Preconditions Given x i basic, x j nonbasic, and T i , j � = 0, P IVOT ( i , j ) makes x i nonbasic and x j basic.
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion P IVOT ( i , j ) M OVE V ARIABLES I N /O UT OF B Preconditions Given x i basic, x j nonbasic, and T i , j � = 0, P IVOT ( i , j ) makes x i nonbasic and x j basic. ◮ Take x i ’s row � x i = T i , j x j + T i , k x k ◮ Solve for x j � − T i , k x j = 1 x i + x k T i , j T i , j ◮ Replace x j everywhere else in T
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion T ABLEAU E XAMPLE + ≥ x y 1 x − y ≥ 0 − ≤ 4 x y 2
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion T ABLEAU E XAMPLE s 1 = x + y T X = 0 s 2 = x − y is equivalent to s 3 = 4 x + y s 1 ≥ 1 ∧ s 2 ≥ 0 ∧ s 3 ≤ 2 B = { s 1 , s 2 , s 3 } , N = { x , y }
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion S IMPLEX FOR DPLL(T)[D D M06] while ¬ ( l ≤ a ≤ u ) do for all i ∈ B , row i is x i = � T i , f x j if ∃ i ∈ B s.t. a i > u i , and � T i , j x j is minimized then return a row conflict from row i else select some basic x i s.t. a i > u i select x j from � T i , j · x j Update the assignment of x j s.t. a i ← u i P IVOT ( i , j ) ⊲ O ( | T | ) Ignoring a i < l i cases
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion R OW C ONFLICTS ◮ Suppose ∀ T i , j > 0 . a j = l j and ∀ T i , j < 0 . a j = u j . � T i , j x j ≥ � T i , j a j ◮ Then (or minimized)
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion R OW C ONFLICTS ◮ Suppose ∀ T i , j > 0 . a j = l j and ∀ T i , j < 0 . a j = u j . ◮ Then x i = � T i , j x j ≥ � T i , j a j = a i (or minimized)
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion R OW C ONFLICTS ◮ Suppose ∀ T i , j > 0 . a j = l j and ∀ T i , j < 0 . a j = u j . ◮ Then x i = � T i , j x j ≥ � T i , j a j = a i (or minimized) ◮ a i > u i ≥ x i ≥ a i | = false
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion S IMPLEX FOR DPLL( T ) O BSERVATIONS ◮ Simplex searches for a ’s that are against bounds ◮ Pivoting is expensive ◮ Most checks need few pivots [KBD13]
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion S UM - OF -I NFEASIBILITIES S IMPLEX [KBD13] x-y≥-1 y ≤ 4 0 x+y≥6
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion T ABLE OF C ONTENTS Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion L EVERAGING LP ◮ SOISimplex added optimization to Simplex for DPLL(T) ◮ Linear Programming solvers perform both ◮ feasibility checking and ◮ optimization
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion L EVERAGING LP ◮ SOISimplex added optimization to Simplex for DPLL(T) ◮ Linear Programming solvers perform both ◮ feasibility checking and ◮ optimization ◮ Decades of research: fast by SMT standards
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion L EVERAGING LP ◮ SOISimplex added optimization to Simplex for DPLL(T) ◮ Linear Programming solvers perform both ◮ feasibility checking and ◮ optimization ◮ Decades of research: fast by SMT standards ◮ Tend to use floating point (FP) ◮ Both Sat/Unsat answers are unsound
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion C AN SMT LEVERAGE LP? ◮ Trusting LP solver [YM06] ◮ Check each T -conflict used [FNORC08] ◮ F ORCED P IVOT procedure [CBdOM12, Mon09]
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion C AN SMT LEVERAGE LP? ◮ Trusting LP solver [YM06] ◮ Check each T -conflict used [FNORC08] ◮ F ORCED P IVOT procedure [CBdOM12, Mon09] ◮ All use LP solver as main QF LRA solver
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion O UR A PPROACH ◮ Call an external off-the-shelf untrusted Simplex LP solver ◮ Reseed the state of the exact precision solver ◮ Only when it is likely to help ◮ Implemented with GLPK
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion R ESEEDING THE S IMPLEX S TATE W HEN R - RELAXATION IS HARD 1. Construct a FP problem from exact � T X = 0 , � T X = 0 , l ≤ X ≤ u = ⇒ l ≤ X ≤ � u 2. Call untrusted LP Simplex solver on � T , � l , � u a and � 3. Get back FP � B a : X → F ) into ( a massage : X → Q ) 4. Convert ( � 5. R ESEED ( a massage , � B ) to get a new a and T 6. Call SMT’s trusted Q Simplex solver
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion C ONCERNS WHEN IMPORTING � a a x 0 y = − 2 3 x + 1 = 1 s ≥ 1 3 s a y 3 a s 1 Suppose a y = 1 3 − ǫ . Then a s < 1.
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion C ONCERNS WHEN IMPORTING � a a x 0 y = − 2 3 x + 1 = 1 s ≥ 1 3 s a y 3 a s 1 Suppose a y = 1 3 − ǫ . Then a s < 1. ◮ Fix it with Simplex? ◮ Flipping coins on tightly satisfied inequalities ◮ Simplex generates tight solutions
Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion M ASSAGING A SSIGNMENTS F LOATS TO R ATIONALS r ← D IO A PPROX ( � a i , D ) if | r − a i | ≤ ǫ then r ← a i if x ∈ X Z and | r − ⌊ r ⌉| ≤ ǫ then r ← ⌊ r ⌉ if r > u i or | r − u i | ≤ ǫ then r ← u i else if r < l i or | r − l i | ≤ ǫ then r ← l i a massage ← r i Magic D = 2 28
Recommend
More recommend