. . . . . . . . . . . . . . . . . 1/38 Parallel Automated Reasoning Ruben Martins http://www.cs.cmu.edu/~mheule/15816-f19/ . . . . . . . . . . . . . . . . . . . . . . . Automated Reasoning and Satisfjability, October 3, 2019
. . . . . . . . . . . . . . . . . . 2/38 . . . . . . . . . . . . . . . . . . . . . . Why Parallelization? Power Wall
. . . . . . . . . . . . . . . . . . 3/38 . . . . . . . . . . . . . . . . . . . . . . How to parallelize SAT?
. . . . . . . . . . . . . . . . . . 3/38 . . . . . . . . . . . . . . . . . . . . . . How to parallelize SAT?
. . . . . . . . . . . . . . . . 4/38 Portfolio Approach Basic Idea: unsatisfjability SAT Competition 2011: . . . . . . . . . . . . . . . . . . . . . . . . ▶ Run several solvers in parallel ▶ Stop when the fjrst solver fjnds a solution or proves ▶ ppfolio// wins 11 medals, best solver in competition ▶ This solver is equivalent to type: solver 1 & solver 2 & . . . & solver n
. . . . . . . . . . . . . . . . 4/38 Portfolio Approach Basic Idea: unsatisfjability SAT Competition 2011: . . . . . . . . . . . . . . . . . . . . . . . . Can we do better? ▶ Run several solvers in parallel ▶ Stop when the fjrst solver fjnds a solution or proves ▶ ppfolio// wins 11 medals, best solver in competition ▶ This solver is equivalent to type: solver 1 & solver 2 & . . . & solver n
. . . . . . . . . . . . . . . . 4/38 Portfolio Approach Basic Idea: unsatisfjability SAT Competition 2011: Can we do better? . . . . . . . . . . . . . . . . . . . . . . . . ▶ Run several solvers in parallel ▶ Stop when the fjrst solver fjnds a solution or proves ▶ ppfolio// wins 11 medals, best solver in competition ▶ This solver is equivalent to type: solver 1 & solver 2 & . . . & solver n ▶ Exchange learned clauses ▶ Increase diversity between solvers
. Core 0 Core 1 (extended) . CDCL VSIDS Geometric Learning VSIDS Polarity Heuristic Restart Portfolio Solvers: ManySAT 5/38 . Dynamic (fast) Progress saving . (2% rand.) (2% rand.) CDCL Progress saving VSIDS Luby 512 Core 3 CDCL CDCL false VSIDS Arithmetic Core 2 y i else (2% rand.) . (3% rand.) . . . . . . . . . . . . . . . . . . . . (extended) . . . . . . . . . . . . . . . if # occ ( l ) > # occ ( ¬ l ) x 1 = 100 l = true x i = 1 . 5 × x i − 1 else l = false α = 1200 x 1 = 100 , x 2 = 100 x i = f ( y i − 1 , y i ) , i > 2 if y i − 1 < y i f ( y i − 1 , y i ) = � � � cos ( 1 − y i − 1 y i ) α y i × � � � f ( y i − 1 , y i ) = � � α � cos ( 1 − y i − 1 ) y i × � � � x 1 = 16000 x i = x i − 1 + 16000
. . . . . . . . . . . . . . . . . . 6/38 . . . . . . . . . . . . . . . . . . . . . . Portfolio Solvers: ManySAT
. . . . . . . . . . . . . . . . . 7/38 Portfolio Solvers: HordeSAT What is the impact of diversifjcation and clause exchange? . . . . . . . . . . . . . . . . . . . . . . . ▶ 16 processes with 1 thread each ▶ Random 3-SAT, only satisfjable instances
. . . . . . . . . . . . . . . . . 7/38 Portfolio Solvers: HordeSAT What is the impact of diversifjcation and clause exchange? . . . . . . . . . . . . . . . . . . . . . . . ▶ 16 processes with 1 thread each ▶ Random 3-SAT, only unsatisfjable instances
. . . . . . . . . . . . . . . . . . 8/38 Portfolio Solvers: HordeSAT . . . . . . . . . . . . . . . . . . . . . . How scalable are portfolio approaches?
. . . . . . . . . . . . . . . . . 8/38 Portfolio Solvers: HordeSAT How scalable are portfolio approaches? . . . . . . . . . . . . . . . . . . . . . . . ▶ (#nodes)x(#processes/node)x(#threads/process)
. . . . . . . . . . . . . . . . . 9/38 Search Space Splitting Approach Basic idea: . . . . . . . . . . . . . . . . . . . . . . . How to split the search space? ▶ Split the search space into disjoint subspaces ▶ Each process searches in a disjoint subspace ▶ Load balancing mechanism to maintain all processes busy
. . . . . . . . . . . . . . . . . 9/38 Search Space Splitting Approach Basic idea: . . . . . . . . . . . . . . . . . . . . . . . How to split the search space? ▶ Split the search space into disjoint subspaces ▶ Each process searches in a disjoint subspace ▶ Load balancing mechanism to maintain all processes busy
. . . . . . . . . . . . . . . . . . 10/38 Search Space Splitting . . . . . . . . . . . . . . . . . . . . . . ▶ Guiding path S1: x 1 = 0 , x 2 = 0 ▶ Restricts the search space of a given process
. . . . . . . . . . . . . . . . . . 10/38 Search Space Splitting . . . . . . . . . . . . . . . . . . . . . . ▶ Unused guiding paths are stored in the work queue
. . . . . . . . . . . . . . . . . . 10/38 Search Space Splitting . . . . . . . . . . . . . . . . . . . . . . subspace ▶ If a subspace is unsatisfjable, then the process gets a new
. . . . . . . . . . . . . . . . . . 10/38 Search Space Splitting . . . . . . . . . . . . . . . . . . . . . . processes are always working ▶ Dynamic work stealing procedure guarantees that all
. . . . . . . . . . . . . . . . . . 10/38 . . . . . . . . . . . . . . . . . . . . . . Search Space Splitting
. . . . . . . . . . . . . . . . . . 11/38 . . . . . . . . . . . . . . . . . . . . . . Can we do a better split of the search space?
. . . . . . . . . . . . . . . . . 12/38 Confmict-Driven Clause Learning solvers Highlights: General CDCL situation: . . . . . . . . . . . . . . . . . . . . . . . large clause ▶ goal: fjnd small efgective confmict clauses ▶ decisions: assign variables that occur in recent confmicts ▶ strength: powerful on “easy” problems ▶ hit a confmict that can be generalized / analyzed to a
. . . . . . . . . . . . . . . . . 13/38 Lookahead solvers Highlights: Ideal lookahead situation: . . . . . . . . . . . . . . . . . . . . . . . parts ▶ goal: construct a small binary search tree ▶ decisions: assign variables that cause a large reduction ▶ strength: powerful on small hard problems ▶ split the search space into two equally large but smaller
. . . . . . . . . . . . . . . . . 14/38 Lookahead solvers Highlights: General lookahead situation: . . . . . . . . . . . . . . . . . . . . . . . ▶ goal: construct a small binary search tree ▶ decisions: assign variables that cause a large reduction ▶ strength: powerful on small hard problems ▶ the search space is split into a large and a small part
. CDCL . . . . . . . . . 15/38 Best of both worlds: Combining Lookahead and L . o o k a h e a d C D C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . L
. 16/38 . . . . . . . . . . Best of both worlds: Cube and Conquer . C U B E & C O N Q U E . . . . . . . . . . . . . . . . . . . . . . . . . . . . R
. . . . . . . . . . . . . . . . . 17/38 Cube: key observation Split until the problem becomes easy General lookahead situation: . . . . . . . . . . . . . . . . . . . . . . . ▶ do not have a fjxed cut ofg depth ▶ determine hardness by number of assigned variables ▶ create many thousands or even millions of cubes ▶ the search space is split into a large and a small part
. f f x 9 f t t x 2 t f x 8 t x 7 x 5 Cube: example . t x 2 . t cutofg branch f f t t x 9 x 8 f f t f t x 7 f x 3 . 18/38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . refuted branch F 1 := F ∧ ( x 5 ∧ x 7 ∧ ¬ x 8 ) F 5 := F ∧ ( ¬ x 5 ∧ ¬ x 2 ∧ ¬ x 3 ) F 2 := F ∧ ( x 5 ∧ x 7 ∧ x 8 ∧ x 2 ) F 6 := F ∧ ( ¬ x 5 ∧ x 2 ∧ x 8 ∧ x 9 ) F 3 := F ∧ ( x 5 ∧ ¬ x 7 ∧ x 9 ) F 7 := F ∧ ( ¬ x 5 ∧ x 2 ∧ x 8 ∧ ¬ x 9 ) F 4 := F ∧ ( x 5 ∧ ¬ x 7 ∧ ¬ x 9 )
. . . . . . . . . . . . . . . . . 19/38 Conquer: describing cubes How much information to send to the CDCL solver? . . . . . . . . . . . . . . . . . . . . . . . ▶ Only the decisions ∧ ϕ dec ▶ The full assignment (including failed literals) ∧ ϕ dec ∧ ϕ imp ▶ The simplifjed formula (including local learnt clauses)
Recommend
More recommend