SAT solving: Resolution Assumption: conjunctive normal form (CNF) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 7 / 39
SAT solving: Resolution Assumption: conjunctive normal form (CNF) Derivation rule form: antecendent 1 . . . antecendent n Rule name consequent Erika ´ Abrah´ am - SMT solving and Symbolic Computation 7 / 39
SAT solving: Resolution Assumption: conjunctive normal form (CNF) Derivation rule form: antecendent 1 . . . antecendent n Rule name consequent ( l ′ 1 ∨ . . . ∨ l ′ ( l 1 ∨ . . . ∨ l n ∨ x ) m ∨ ¬ x ) Rule res ( l 1 ∨ . . . ∨ l n ∨ l ′ 1 ∨ . . . ∨ l ′ m ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 7 / 39
SAT solving: Resolution Assumption: conjunctive normal form (CNF) Derivation rule form: antecendent 1 . . . antecendent n Rule name consequent ( l ′ 1 ∨ . . . ∨ l ′ ( l 1 ∨ . . . ∨ l n ∨ x ) m ∨ ¬ x ) Rule res ( l 1 ∨ . . . ∨ l n ∨ l ′ 1 ∨ . . . ∨ l ′ m ) C x ∨ C ¬ x ∨ C is equi-satisfiable to Resolvents ( C x , C ¬ x ) ∨ C Erika ´ Abrah´ am - SMT solving and Symbolic Computation 7 / 39
SAT solving: Resolution c 1 : ( ¬ a ∨ d ∨ e ) c 2 : ( ¬ a ∨ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 8 / 39
SAT solving: Resolution c 1 : ( ¬ a ∨ d ∨ e ) c 2 : ( ¬ a ∨ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) c 1 : ( ¬ a ∨ d ∨ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 2 : ( ¬ a ∨ d ∨ ¬ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) ( ¬ a ∨ d ) ( ¬ a ∨ ¬ d ) c 6 : ( a ∨ ¬ b ) ( ¬ a ) ( a ) () Erika ´ Abrah´ am - SMT solving and Symbolic Computation 8 / 39
SAT solving: Resolution c 1 : ( ¬ a ∨ d ∨ e ) c 2 : ( ¬ a ∨ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) c 1 : ( ¬ a ∨ d ∨ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 2 : ( ¬ a ∨ d ∨ ¬ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) ( ¬ a ∨ d ) ( ¬ a ∨ ¬ d ) c 6 : ( a ∨ ¬ b ) ( ¬ a ) ( a ) () Problem: combinatorial blowup Erika ´ Abrah´ am - SMT solving and Symbolic Computation 8 / 39
SAT solving: Enumeration c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Conflict Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Backjumping Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Conflict Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Backjumping Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: Enumeration a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 9 / 39
SAT solving: The DPLL algorithm c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Pure literal detection Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Boolean constraint propagation Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Conflict Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Backjumping Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Boolean constraint propagation Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Conflict Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) � c 8 : ( ¬ b ∨ ¬ c ) Backjumping Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: The DPLL algorithm a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 10 / 39
SAT solving: Conflict-directed clause learning c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Boolean constraint propagation Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Decision Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Boolean constraint propagation Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 3 c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 3 c 7 : ( b ∨ c ) � c 4 c 8 : ( ¬ b ∨ ¬ c ) Conflict Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 3 c 7 : ( b ∨ c ) � c 4 c 8 : ( ¬ b ∨ ¬ c ) Conflict resolution and backtracking Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 3 c 7 : ( b ∨ c ) � c 4 c 8 : ( ¬ b ∨ ¬ c ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 9 : ( ¬ a ∨ ¬ d ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . b c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c c 8 c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) d c 5 : ( a ∨ b ) e c 6 : ( a ∨ ¬ b ) c 3 c 7 : ( b ∨ c ) � c 4 c 8 : ( ¬ b ∨ ¬ c ) c 9 : ( ¬ a ∨ ¬ d ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 9 : ( ¬ a ∨ ¬ d ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) c 9 : ( ¬ a ∨ ¬ d ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 9 : ( ¬ a ∨ ¬ d ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
SAT solving: Conflict-directed clause learning a c 1 : ( ¬ a ∨ d ∨ e ) . . . d c 9 c 2 : ( ¬ a ∨ d ∨ ¬ e ) . . . c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 5 : ( a ∨ b ) c 6 : ( a ∨ ¬ b ) c 7 : ( b ∨ c ) c 8 : ( ¬ b ∨ ¬ c ) c 9 : ( ¬ a ∨ ¬ d ) c 4 : ( ¬ a ∨ ¬ d ∨ ¬ e ) c 3 : ( ¬ a ∨ ¬ d ∨ e ) c 9 : ( ¬ a ∨ ¬ d ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 11 / 39
Satisfiability modulo theories solving Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving. Erika ´ Abrah´ am - SMT solving and Symbolic Computation 12 / 39
Satisfiability modulo theories solving Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving. SMT-LIB as standard input language since 2004. Competitions since 2005. SMT-COMP 2014 competition: 32 logical categories, 20 solvers. Linear real arithmetic (since 2005): 6 solvers. Non-linear real arithmetic (since 2010): 4 solvers. 67426 benchmark instances. Erika ´ Abrah´ am - SMT solving and Symbolic Computation 12 / 39
Satisfiability modulo theories solving Propositional logic is sometimes too weak for modelling. We need more expressive logics and decision procedures for them. Logics: quantifier-free fragments of first-order logic over various theories. Our focus: SAT-modulo-theories (SMT) solving. SMT-LIB as standard input language since 2004. Competitions since 2005. SMT-COMP 2014 competition: 32 logical categories, 20 solvers. Linear real arithmetic (since 2005): 6 solvers. Non-linear real arithmetic (since 2010): 4 solvers. 67426 benchmark instances. SMT applications: verification (model checking, static analysis, termination analysis); test case generation; controller synthesis; predicate abstraction; equivalence checking; scheduling; planning; product design automation and optimisation, . . . Erika ´ Abrah´ am - SMT solving and Symbolic Computation 12 / 39
SMT-LIB theories Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories Quantifier-free equality logic with uninterpreted functions ( a = c ∧ b = d ) → f ( a , b ) = f ( c , d ) Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories Quantifier-free bit-vector arithmetic ( a | b ) ≤ ( a & b ) Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories Quantifier-free array theory i = j → read ( write ( a , i , v ) , j ) = v Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories Quantifier-free integer/rational difference logic x − y ∼ 0 , ∼∈ { <, ≤ , = , ≥ , > } Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories (Quantifier-free) real/integer linear arithmetic 3 x + 7 y = 8 Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories (Quantifier-free) real/integer non-linear arithmetic x 2 + 2 xy + y 2 ≥ 0 Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
SMT-LIB theories Combined theories 2 f ( x ) + 5 y > 0 Source: http://smtlib.cs.uiowa.edu/logics.shtml Erika ´ Abrah´ am - SMT solving and Symbolic Computation 13 / 39
Eager vs. lazy SMT solving We focus on lazy SMT solving. Alternative eager approach: transform problems into propositional logic and use SAT solving for satisfiability checking. Condition: Logic is not more expressive than propositional logic. Erika ´ Abrah´ am - SMT solving and Symbolic Computation 14 / 39
(Full/less) lazy SMT solving Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ ′ propositional logic formula in CNF Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ ′ propositional logic formula in CNF SAT solver Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ ′ propositional logic formula in CNF SAT solver theory constraints Theory solver(s) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ ′ propositional logic formula in CNF SAT solver SAT theory constraints or + lemmas UNSAT Theory solver(s) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
(Full/less) lazy SMT solving ϕ quantifier-free FO formula Boolean abstraction Tseitin’s transformation ϕ ′ propositional logic formula in CNF SAT solver SAT or UNSAT SAT theory constraints or + lemmas UNSAT Theory solver(s) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 15 / 39
Less lazy SMT solving Erika ´ Abrah´ am - SMT solving and Symbolic Computation 16 / 39
Less lazy SMT solving ( x < 0 ∨ x > 2) ∧ ( x 2 = 1 ∨ x 2 < 0) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 16 / 39
Less lazy SMT solving ( x < 0 ∨ x > 2) ∧ ( x 2 = 1 ∨ x 2 < 0) ( a ∨ b ) ∧ ( c ∨ d ) Erika ´ Abrah´ am - SMT solving and Symbolic Computation 16 / 39
Recommend
More recommend