competitive sorter based encoding of pb constraints into
play

Competitive Sorter-based Encoding of PB-Constraints into SAT nski , - PowerPoint PPT Presentation

Competitive Sorter-based Encoding of PB-Constraints into SAT nski , Marek Piotr ow Micha l Karpi Institute of Computer Science University of Wroc law Poland 7 July, 2018 Outline 1 Definitions and motivation 2 Description of the


  1. Competitive Sorter-based Encoding of PB-Constraints into SAT nski , Marek Piotr´ ow Micha� l Karpi´ Institute of Computer Science University of Wroc� law Poland 7 July, 2018

  2. Outline 1 Definitions and motivation 2 Description of the system 3 Experimental evaluation 4 Conclusions Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  3. Definitions and motivation x 1 + x 2 + x 3 < 3 y 1 + 2 y 2 ≥ 1 z 1 + 3 z 2 + 4 z 3 + 7 z 4 = 8 Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  4. Definitions and motivation x 1 + x 2 + x 3 < 3 y 1 + 2 y 2 ≥ 1 z 1 + 3 z 2 + 4 z 3 + 7 z 4 = 8 x 1 , . . . , x n – literals, a 1 , . . . , a n ∈ Z – coefficients, n , k ∈ N : a 1 x 1 + . . . + a n x n # k . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  5. Definitions and motivation Bather’s odd-even sorting network (1968) Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  6. Definitions and motivation a c = max(a,b) b d = min(a,b) Bather’s odd-even sorting network (1968) Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  7. Definitions and motivation c = a ∨ b a d = a ∧ b b Bather’s odd-even sorting network (1968) Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  8. Definitions and motivation c = a ∨ b a d = a ∧ b b a ⇒ c , Bather’s odd-even b ⇒ c , sorting network (1968) a ∧ b ⇒ d . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  9. Definitions and motivation x 1 + x 2 + 2 x 3 + 4 x 4 < 3 c = a ∨ b a d = a ∧ b b a ⇒ c , Bather’s odd-even b ⇒ c , sorting network (1968) a ∧ b ⇒ d . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  10. Definitions and motivation x 1 + x 2 + x 3 + x 3 + x 4 + x 4 + x 4 + x 4 < 3 c = a ∨ b a d = a ∧ b b a ⇒ c , Bather’s odd-even b ⇒ c , sorting network (1968) a ∧ b ⇒ d . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  11. Definitions and motivation x 1 + x 2 + x 3 + x 3 + x 4 + x 4 + x 4 + x 4 < 3 c = a ∨ b a x y 1 1 x y 2 2 x y =0 3 3 x y 3 4 d = a ∧ b x y b 4 5 x y 4 6 x y 4 7 x y a ⇒ c , 4 8 Bather’s odd-even b ⇒ c , sorting network (1968) a ∧ b ⇒ d . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  12. Definitions and motivation x 1 + x 2 + x 3 + x 3 + x 4 + x 4 + x 4 + x 4 < 3 c = a ∨ b a x y 1 1 x y 2 2 x y 3 =0 3 x 3 d = a ∧ b x b 4 x 4 x 4 x a ⇒ c , 4 Codish and Zazon-Ivry’s odd-even b ⇒ c , selection network (2012) a ∧ b ⇒ d . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  13. Definitions and motivation 3 x 1 + 2 x 2 + 4 x 3 ≤ 5 , 30001 x 1 + 19999 x 2 + 39998 x 3 ≤ 50007 Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  14. Definitions and motivation 3 x 1 + 2 x 2 + 4 x 3 ≤ 5 , 30001 x 1 + 19999 x 2 + 39998 x 3 ≤ 50007 (¯ x 1 ∨ ¯ x 3 ) ∧ (¯ x 2 ∨ ¯ x 3 ) Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  15. Definitions and motivation Mixed Radix Base Technique by Niklas E´ en and Niklas S¨ orensson (2006) – authors of MiniSat+ . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  16. Definitions and motivation Mixed Radix Base Technique by Niklas E´ en and Niklas S¨ orensson (2006) – authors of MiniSat+ . Positive integer d = � d 0 , . . . , d m − 1 � . Base B is a sequence of positive integers � r 0 , . . . , r m − 1 � . The value of d is v = d 0 w 0 + d 1 w 1 + d 2 w 2 + · · · + d m − 1 w m − 1 where w 0 = 1 and for i ≥ 0, w i +1 = w i r i . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  17. Definitions and motivation Mixed Radix Base Technique by Niklas E´ en and Niklas S¨ orensson (2006) – authors of MiniSat+ . Positive integer d = � d 0 , . . . , d m − 1 � . Base B is a sequence of positive integers � r 0 , . . . , r m − 1 � . The value of d is v = d 0 w 0 + d 1 w 1 + d 2 w 2 + · · · + d m − 1 w m − 1 where w 0 = 1 and for i ≥ 0, w i +1 = w i r i . Example: The number � 2 , 4 , 10 � B in base B = � 3 , 5 � is interpreted as: 2 × 1 + 4 × 3 + 10 × 15 = 164 (values of w i ’s in boldface). Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  18. Definitions and motivation For PB-constraint with coefficients { a 1 , . . . , a n } do: 1 Find a ”suitable” finite base B for the set of coefficients. 2 For each element r i of B construct a sorting network where the inputs to i -th sorter will be those digits d (from the coefficients) where d i is non-zero, plus the potential carry bits from the ( i − 1)-th sorter. Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  19. Description of the system PB-solver KP-MiniSat+ based on MiniSat+ with the following modifications: 4-Odd-Even Selection Network (based on Multiway Merging Network of Lee and Batcher (1995)). Simplifying inequality assertions (from NaPS by Sakai et al. (2015)). Optimal base algorithm by Codish et al. (2011). Binary minimization strategy (from NaPS ). ROBDDs instead of BDDs (by Ab´ ıo et al. (2012)). Merging carry bits. COMiniSatPS instead of MiniSat . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  20. Description of the system Assume k ≤ n , ¯ x = � x 1 , . . . , x n � – sequence of Boolean literals. If k = 0, there is nothing to do. If k = 1, use a direct network ( x 1 ⇒ y 1 , . . . , x n ⇒ y 1 ). If k > 1: Split the input into subsequences of either the same literals (of length at least 2) or sorted 5 singletons. Sort subsequences by length, in a non-increasing order. In loop: merge each 4 (or less) consecutive subsequences into one (using 4-Odd-Even Merging Network as a sub-procedure) and select at most k largest items until one subsequence remains. Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  21. Description of the system 0 1 1 1 1 1 1 1 1 0 1 1 sort 5 1 0 1 1 1 0 oe_4merge 11 oe_4combine 8 6 5 6 0 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 0 0 sort 5 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 sort 5 0 0 0 1 oe_4merge 7 0 0 0 0 3 1 0 0 0 0 1 1 sort 3 1 0 oe_4merge 18 1 0 1 6 Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  22. Description of the system oe 4 combine on � x 0 , x 1 , . . . � and � y 0 , y 1 , . . . � : 1 Performs a zip operation: � x 0 , y 0 , x 1 , y 1 , x 2 , y 2 , . . . � . 2 Compare [ y i : x i +2 ], for i = 0 , 1 , . . . , resulting in � x ′ 0 , y ′ 0 , x ′ 1 , y ′ 1 , . . . � . 3 Compare [ y ′ i : x ′ i +1 ], for i = 0 , 1 , . . . , to get � x ′′ 0 , y ′′ 0 , x ′′ 1 , y ′′ 1 , . . . � . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  23. Description of the system oe 4 combine on � x 0 , x 1 , . . . � and � y 0 , y 1 , . . . � : 1 Performs a zip operation: � x 0 , y 0 , x 1 , y 1 , x 2 , y 2 , . . . � . 2 Compare [ y i : x i +2 ], for i = 0 , 1 , . . . , resulting in � x ′ 0 , y ′ 0 , x ′ 1 , y ′ 1 , . . . � . 3 Compare [ y ′ i : x ′ i +1 ], for i = 0 , 1 , . . . , to get � x ′′ 0 , y ′′ 0 , x ′′ 1 , y ′′ 1 , . . . � . 1 1 x 0 1 1 y 0 1 1 x 1 1 1 y 1 1 1 x 2 0 1 y 2 1 0 x 3 0 0 x 4 Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  24. Description of the system y ′ i = max( y i , x i +2 ) ≡ y i ∨ x i +2 i = 0 , 1 , . . . x ′ i = min( y i − 2 , x i ) ≡ y i − 2 ∧ x i i = 2 , 3 , . . . y ′′ i = max( y ′ i , x ′ i +1 ) = y ′ i ∨ x ′ i +1 = y i ∨ x i +2 ∨ ( y i − 1 ∧ x i +1 ) , x ′′ i = min( y ′ i − 1 , x ′ i ) = y ′ i − 1 ∧ x ′ i = ( y i − 1 ∨ x i +1 ) ∧ y i − 2 ∧ x i = ( y i − 1 ∧ y i − 2 ∧ x i ) ∨ ( y i − 2 ∧ x i ∧ x i +1 ) = ( y i − 1 ∧ x i ) ∨ ( y i − 2 ∧ x i +1 ) Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

  25. Description of the system Propagating 1’s from inputs to outputs: y i ⇒ y ′′ i , x i +2 ⇒ y ′′ i , y i − 1 ∧ x i +1 ⇒ y ′′ i , y i − 1 ∧ x i ⇒ x ′′ i , y i − 2 ∧ x i +1 ⇒ x ′′ i , otherwise: y ′′ i ⇒ y i − 1 ∨ x i +2 , y ′′ i ⇒ y i ∨ x i +1 , x ′′ i ⇒ x i , x ′′ i ⇒ y i − 2 , x ′′ i ⇒ y i − 1 ∨ x i +1 . Competitive Sorter-based Encoding of PB-Constraints into SAT Micha� l Karpi´ nski, Marek Piotr´ ow

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