optimally propagating sat encodings
play

Optimally Propagating SAT Encodings Martin Brain, Liana Hadarean , - PowerPoint PPT Presentation

Introduction Optimally propagating encodings Framework Conclusion Optimally Propagating SAT Encodings Martin Brain, Liana Hadarean , Ruben Martins and Daniel Kroening Oxford University July 18, 2015 1 / 29 Introduction Optimally


  1. Introduction Optimally propagating encodings Framework Conclusion Optimally Propagating SAT Encodings Martin Brain, Liana Hadarean , Ruben Martins and Daniel Kroening Oxford University July 18, 2015 1 / 29

  2. Introduction Optimally propagating encodings Framework Conclusion A COMMON PICTURE Verification Tool Program CBMC KLEE Proof + C/E ... Spec Boogie GPUVerify SAT Solver 2 / 29

  3. Introduction Optimally propagating encodings Framework Conclusion A COMMON PICTURE Verification Tool Program CBMC KLEE Proof + C/E ... Spec Boogie GPUVerify Encoding SAT Solver 2 / 29

  4. Introduction Optimally propagating encodings Framework Conclusion A COMMON PICTURE Verification Tool Program CBMC KLEE Proof + C/E ... Spec Boogie GPUVerify SMT Solver Encoding SAT Solver 2 / 29

  5. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance 3 / 29

  6. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] 3 / 29

  7. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] How to design good encodings? 3 / 29

  8. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] How to design good encodings? ◮ a bit of a “dark” art 3 / 29

  9. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] How to design good encodings? ◮ a bit of a “dark” art ◮ smaller is better 3 / 29

  10. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] How to design good encodings? ◮ a bit of a “dark” art ◮ smaller is better ◮ but not always 3 / 29

  11. Introduction Optimally propagating encodings Framework Conclusion SAT E NCODINGS Modular - optimize encoding offline and reuse template. Essential for SAT solver performance ◮ reverse engineer bad encodings within the SAT solver! [ biere2014 ] How to design good encodings? ◮ a bit of a “dark” art ◮ smaller is better ◮ but not always SOTA: try, test and pick the best! 3 / 29

  12. Introduction Optimally propagating encodings Framework Conclusion H OW TO DESIGN SAT SOLVER FRIENDLY ENCODINGS ? 1 Known as propagation completeness in AI knowledge compilation. 4 / 29

  13. Introduction Optimally propagating encodings Framework Conclusion H OW TO DESIGN SAT SOLVER FRIENDLY ENCODINGS ? ◮ property of interest: propagation power 1 Known as propagation completeness in AI knowledge compilation. 4 / 29

  14. Introduction Optimally propagating encodings Framework Conclusion H OW TO DESIGN SAT SOLVER FRIENDLY ENCODINGS ? ◮ property of interest: propagation power Can all logically entailed literals be inferred by unit propagation? 1 Known as propagation completeness in AI knowledge compilation. 4 / 29

  15. Introduction Optimally propagating encodings Framework Conclusion H OW TO DESIGN SAT SOLVER FRIENDLY ENCODINGS ? ◮ property of interest: propagation power Can all logically entailed literals be inferred by unit propagation? ◮ automatically generate optimally propagating encodings 1 1 Known as propagation completeness in AI knowledge compilation. 4 / 29

  16. Introduction Optimally propagating encodings Framework Conclusion H OW TO DESIGN SAT SOLVER FRIENDLY ENCODINGS ? ◮ property of interest: propagation power Can all logically entailed literals be inferred by unit propagation? ◮ automatically generate optimally propagating encodings 1 ◮ abstract satisfaction framework for encodings 1 Known as propagation completeness in AI knowledge compilation. 4 / 29

  17. Introduction Optimally propagating encodings Framework Conclusion P RELIMINARIES Σ variables v l ∈ { v , ¬ v } literal C Σ clauses c = l 1 ∨ . . . ∨ l n 5 / 29

  18. Introduction Optimally propagating encodings Framework Conclusion P RELIMINARIES Σ variables v l ∈ { v , ¬ v } literal C Σ clauses c = l 1 ∨ . . . ∨ l n A Σ assignments a : Σ → {⊥ , ⊤} p : Σ → {⊥ , ? , ⊤} P Σ partial assignments 5 / 29

  19. Introduction Optimally propagating encodings Framework Conclusion P RELIMINARIES Σ variables v l ∈ { v , ¬ v } literal C Σ clauses c = l 1 ∨ . . . ∨ l n A Σ assignments a : Σ → {⊥ , ⊤} p : Σ → {⊥ , ? , ⊤} P Σ partial assignments UP : ( 2 C Σ × P Σ ) → P Σ unit propagation 5 / 29

  20. Introduction Optimally propagating encodings Framework Conclusion P RELIMINARIES Σ variables v l ∈ { v , ¬ v } literal C Σ clauses c = l 1 ∨ . . . ∨ l n A Σ assignments a : Σ → {⊥ , ⊤} p : Σ → {⊥ , ? , ⊤} P Σ partial assignments UP : ( 2 C Σ × P Σ ) → P Σ unit propagation � l ∨ l 1 ∨ . . . ∨ l k ∈ C p [ l ← ⊤ ] p ( l i ) = ⊥ and p ( l ) =? 5 / 29

  21. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Truth table: c in a b c in c out s a b 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 c out s 0 0 0 0 0 6 / 29

  22. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Encoding: c in a b {¬ a , ¬ b , c in , ¬ s } {¬ a , b , ¬ c in , ¬ s } { a , ¬ b , ¬ c in , ¬ s } { a , b , c in , ¬ s } {¬ a , ¬ b , ¬ c in , s } {¬ a , b , c in , s } { a , b , ¬ c in , s } { a , ¬ b , c in , s } {¬ a , ¬ b , c out } {¬ a , ¬ c in , c out } {¬ b , ¬ c in , c out } { a , b , ¬ c out } { a , c in , ¬ c out } { b , c in , ¬ c out } c out s 6 / 29

  23. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Encoding: c in a b {¬ a , ¬ b , c in , ¬ s } {¬ a , b , ¬ c in , ¬ s } { a , ¬ b , ¬ c in , ¬ s } { a , b , c in , ¬ s } {¬ a , ¬ b , ¬ c in , s } {¬ a , b , c in , s } { a , b , ¬ c in , s } { a , ¬ b , c in , s } {¬ a , ¬ b , c out } {¬ a , ¬ c in , c out } {¬ b , ¬ c in , c out } { a , b , ¬ c out } { a , c in , ¬ c out } { b , c in , ¬ c out } c out s 6 / 29

  24. Introduction Optimally propagating encodings Framework Conclusion O PTIMALLY PROPAGATING ENCODINGS We want to encode a model M ⊂ A Σ (the truth table) using a set of clauses E M ⊂ C Σ such that: E M = { C ⊂ C Σ | AofC ( C ) = M } where: AofC ( C ) = { a ∈ A Σ |∀ c ∈ C � a | = c } 7 / 29

  25. Introduction Optimally propagating encodings Framework Conclusion O PTIMALLY PROPAGATING ENCODINGS We want to encode a model M ⊂ A Σ (the truth table) using a set of clauses E M ⊂ C Σ such that: E M = { C ⊂ C Σ | AofC ( C ) = M } where: AofC ( C ) = { a ∈ A Σ |∀ c ∈ C � a | = c } Optimally propagating encoding E is optimally propagating if E ∧ p | = l then UP ( E , p )( l ) = ⊤ . 7 / 29

  26. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Encoding: c in a b {¬ a , ¬ b , c in , ¬ s } {¬ a , b , ¬ c in , ¬ s } { a , ¬ b , ¬ c in , ¬ s } { a , b , c in , ¬ s } {¬ a , ¬ b , ¬ c in , s } {¬ a , b , c in , s } { a , b , ¬ c in , s } { a , ¬ b , c in , s } {¬ a , ¬ b , c out } {¬ a , ¬ c in , c out } {¬ b , ¬ c in , c out } { a , b , ¬ c out } { a , c in , ¬ c out } { b , c in , ¬ c out } c out s Is this optimally propagating? 8 / 29

  27. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Encoding: c in a b {¬ a , ¬ b , c in , ¬ s } {¬ a , b , ¬ c in , ¬ s } { a , ¬ b , ¬ c in , ¬ s } { a , b , c in , ¬ s } {¬ a , ¬ b , ¬ c in , s } {¬ a , b , c in , s } { a , b , ¬ c in , s } { a , ¬ b , c in , s } {¬ a , ¬ b , c out } {¬ a , ¬ c in , c out } {¬ b , ¬ c in , c out } { a , b , ¬ c out } { a , c in , ¬ c out } { b , c in , ¬ c out } c out s p = [ s , c out ] UP ( E , p ) = p 8 / 29

  28. Introduction Optimally propagating encodings Framework Conclusion F ULL - ADDER E XAMPLE Encoding: c in a b {¬ a , ¬ b , c in , ¬ s } {¬ a , b , ¬ c in , ¬ s } { a , ¬ b , ¬ c in , ¬ s } { a , b , c in , ¬ s } {¬ a , ¬ b , ¬ c in , s } {¬ a , b , c in , s } { a , b , ¬ c in , s } { a , ¬ b , c in , s } {¬ a , ¬ b , c out } {¬ a , ¬ c in , c out } {¬ b , ¬ c in , c out } { a , b , ¬ c out } { a , c in , ¬ c out } { b , c in , ¬ c out } c out s p = [ s , c out , ¬ a ] 8 / 29

  29. Introduction Optimally propagating encodings Framework Conclusion A UTOMATICALLY STRENGTHEN ENCODINGS Given: ◮ initial encoding E 0 ◮ reference encoding E ref 9 / 29

  30. Introduction Optimally propagating encodings Framework Conclusion A UTOMATICALLY STRENGTHEN ENCODINGS Given: ◮ initial encoding E 0 ◮ reference encoding E ref Return an encoding E such that: 9 / 29

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