leveraging linear and mixed integer programming for smt
play

Leveraging Linear and Mixed Integer Programming for SMT Tim King 1 - PowerPoint PPT Presentation

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


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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?

  6. 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

  7. 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

  8. 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

  9. 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 )

  10. 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 · δ

  11. 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.

  12. 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.

  13. 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

  14. Simplex Background Reseeding Simplex Replaying MIP Proofs Empirical Results Conclusion T ABLEAU E XAMPLE + ≥ x y 1 x − y ≥ 0 − ≤ 4 x y 2

  15. 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 }

  16. 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

  17. 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)

  18. 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)

  19. 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

  20. 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]

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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]

  27. 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

  28. 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

  29. 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

  30. 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.

  31. 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

  32. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend