Factoring Out Assumptions to Speed Up MUS Extraction Jean-Marie Lagniez 1 Armin Biere 2 11 July 2013 1 Univ. Lille-Nord de France – CRIL/CNRS UMR8188 – Lens, F-62307, France 2 Institute for Formal Models and Verification Johannes Kepler University, Linz, Austria
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z UNSAT The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z SAT The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z UNSAT The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z MUS ! The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive 2 / 16 �
Minimal Unsatisfiable Set ( MUS ) x ∨ y ∨ z x ∨ ¬ y x ∨ ¬ z ¬ x ∨ y ∨ z x ∨ w w ∨ z ∨ ¬ y ¬ x ∨ ¬ y ¬ x ∨ ¬ z w ∨ ¬ x ∨ ¬ z MUS ! The formula is unsatisfiable : why? Subset of constraints minimally unsatisfiable Two approaches: → constructive → destructive SAT Incremental 2 / 16 �
From SAT to Incremental SAT Solving the SAT problem Modern SAT solvers are based on the CDCL paradigm Dynamic heuristics: → VSIDS , polarity, cleaning learned clauses and restart Solving incrementally SAT Successive calls of a SAT solver Keeping a lot of information between the different runs → VSIDS , polarity, cleaning learned clauses and restart 3 / 16 �
From SAT to Incremental SAT Solving the SAT problem Modern SAT solvers are based on the CDCL paradigm Dynamic heuristics: → VSIDS , polarity, cleaning learned clauses and restart Solving incrementally SAT Successive calls of a SAT solver Keeping a lot of information between the different runs → VSIDS , polarity, cleaning learned clauses and restart → learned clauses 3 / 16 �
From SAT to Incremental SAT Solving the SAT problem Modern SAT solvers are based on the CDCL paradigm Dynamic heuristics: → VSIDS , polarity, cleaning learned clauses and restart Solving incrementally SAT Successive calls of a SAT solver Keeping a lot of information between the different runs → VSIDS , polarity, cleaning learned clauses and restart → learned clauses Adding selectors 3 / 16 �
Selectors a 1 ∨ x ∨ y ∨ z a 2 ∨ x ∨ ¬ y a 3 ∨ x ∨ ¬ z a 4 ∨ ¬ x ∨ y ∨ z a 5 ∨ x ∨ w a 6 ∨ w ∨ z ∨ ¬ y a 7 ∨ ¬ x ∨ ¬ y a 8 ∨ ¬ x ∨ ¬ z a 9 ∨ w ∨ ¬ x ∨ ¬ z To activate/deactivate the i th clause : → assign a i to false to activate the clause → assign a i to true to deactivate the clause Used to know which initial clauses participating to the creation of each learned clause a 1 ∨ x ∨ y ∨ z a 2 ∨ x ∨ ¬ y a 1 ∨ a 2 ∨ x ∨ z 4 / 16 �
Selectors a 1 ∨ x ∨ y ∨ z a 2 ∨ x ∨ ¬ y a 3 ∨ x ∨ ¬ z a 4 ∨ ¬ x ∨ y ∨ z a 5 ∨ x ∨ w a 6 ∨ w ∨ z ∨ ¬ y a 7 ∨ ¬ x ∨ ¬ y a 8 ∨ ¬ x ∨ ¬ z a 9 ∨ w ∨ ¬ x ∨ ¬ z To activate/deactivate the i th clause : → assign a i to false to activate the clause → assign a i to true to deactivate the clause Used to know which initial clauses participating to the creation of each learned clause a 1 ∨ x ∨ y ∨ z a 2 ∨ x ∨ ¬ y a 1 ∨ a 2 ∨ x ∨ z Selectors impact on the size of the clauses 4 / 16 �
Factoring-out Assumptions Introducing abbreviations to factor out assumptions The replaced part consists of all assumptions and previously added abbreviations Connections between the abbreviations and the replaced literals is stored in a definition map ( p 1 ∨ · · · ∨ p n ∨ a 1 ∨ · · · ∨ a m ) is factored out into ( p 1 ∨ · · · ∨ p n ∨ ℓ ) and ℓ �→ a 1 ∨ · · · ∨ a m � �� � G [ ℓ ] 5 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses factoring G 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } factoring G 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 factoring G 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 factoring G a 2 ℓ 1 a 1 a 4 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring G a 2 ℓ 1 a 1 a 4 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring G a 3 ℓ 2 a 2 ℓ 1 a 1 a 4 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring α ′ α 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 1 ∨ a 4 { α 1 , . . . } 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 3 G a 3 ℓ 2 a 2 ℓ 1 a 1 a 4 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring α ′ α 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 1 ∨ a 4 { α 1 , . . . } 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 3 G a 3 ℓ 2 a 2 ℓ 1 a 1 a 4 ℓ 3 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring α ′ α 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 1 ∨ a 4 { α 1 , . . . } 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 3 α ′ α 4 : p 6 ∨ p 8 ∨ ℓ 2 ∨ a 5 { α 2 , . . . } 4 : p 6 ∨ p 8 ∨ ℓ 4 G a 3 ℓ 2 a 2 ℓ 1 a 1 a 4 ℓ 3 6 / 16 �
Definition Map Under assumptions {¬ a 1 , ¬ a 2 , ¬ a 3 , ¬ a 4 , ¬ a 5 , ¬ a 6 , . . . } learned clauses antecedents factored clauses α ′ α 1 : p 2 ∨ p 7 ∨ a 1 ∨ a 2 ∨ a 4 { . . . } 1 : p 2 ∨ p 7 ∨ ℓ 1 α 2 : p 2 ∨ a 2 ∨ a 3 α ′ { . . . } 2 : p 2 ∨ ℓ 2 factoring α ′ α 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 1 ∨ a 4 { α 1 , . . . } 3 : p 7 ∨ p 4 ∨ p 6 ∨ ℓ 3 α ′ α 4 : p 6 ∨ p 8 ∨ ℓ 2 ∨ a 5 { α 2 , . . . } 4 : p 6 ∨ p 8 ∨ ℓ 4 G a 5 ℓ 4 a 3 ℓ 2 a 2 ℓ 1 a 1 a 4 ℓ 3 6 / 16 �
Recommend
More recommend