Preprocessing Techniques Marijn J.H. Heule - - PowerPoint PPT Presentation

preprocessing techniques
SMART_READER_LITE
LIVE PREVIEW

Preprocessing Techniques Marijn J.H. Heule - - PowerPoint PPT Presentation

Preprocessing Techniques Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 19, 2019 1 / 47 Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause


slide-1
SLIDE 1

Preprocessing Techniques

Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 19, 2019

1 / 47

slide-2
SLIDE 2

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

2 / 47

slide-3
SLIDE 3

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

3 / 47

slide-4
SLIDE 4

Interaction between different solving approaches

encoding reencoding preprocessing inprocessing Translator Simplifier Clause Learner

4 / 47

slide-5
SLIDE 5

Interaction between different solving approaches

encoding reencoding preprocessing inprocessing Translator Simplifier Clause Learner

It all comes down to adding and removing redundant clauses

4 / 47

slide-6
SLIDE 6

Redundant clauses

A clause is redundant with respect to a formula if adding it to the formula preserves satisfiability. For unsatisfiable formulas, all clauses can be added, including the empty clause ⊥.

5 / 47

slide-7
SLIDE 7

Redundant clauses

A clause is redundant with respect to a formula if adding it to the formula preserves satisfiability. For unsatisfiable formulas, all clauses can be added, including the empty clause ⊥. A clause is redundant with respect to a formula if removing it from the formula preserves unsatisfiability. For satisfiable formulas, all clauses can be removed.

5 / 47

slide-8
SLIDE 8

Redundant clauses

A clause is redundant with respect to a formula if adding it to the formula preserves satisfiability. For unsatisfiable formulas, all clauses can be added, including the empty clause ⊥. A clause is redundant with respect to a formula if removing it from the formula preserves unsatisfiability. For satisfiable formulas, all clauses can be removed. Challenge regarding redundant clauses: How to check redundancy in polynomial time? Ideally find redundant clauses in linear time

5 / 47

slide-9
SLIDE 9

Preprocessing and Inprocessing in Practice

500 1000 1500 2000 2500 3000 3500 4000 4500 5000 50 100 150 200 250 Runtime (sec) Number of solved application benchmarks of SAT Competition 2013

pre- & inprocessing disabled

  • nly clause elimination enabled

base line without clause elimination Lingeling version aqw (base line)

6 / 47

slide-10
SLIDE 10

Outline Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

7 / 47

slide-11
SLIDE 11

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

8 / 47

slide-12
SLIDE 12

Tautologies and Subsumption

Definition (Tautology) A clause C is a tautology if its contains two complementary literals x and ¯ x. Example The clause (a ∨ b ∨ ¯ b) is a tautology. Definition (Subsumption) Clause C subsumes clause D if and only if C ⊂ D. Example The clause (a ∨ b) subsumes clause (a ∨ b ∨ ¯ c).

9 / 47

slide-13
SLIDE 13

Self-Subsuming Resolution

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x

10 / 47

slide-14
SLIDE 14

Self-Subsuming Resolution

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example Assume a CNF contains both antecedents . . . (a ∨ b ∨ x)(a ∨ b ∨ c ∨ ¯ x) . . . If D is added, then D ∨ ¯ x can be removed which in essence removes ¯ x from D ∨ ¯ x . . . (a ∨ b ∨ x)(a ∨ b ∨ c ) . . . Initially in the SATeLite preprocessor, [EenBiere’07] now common in most solvers (i.e., as pre- and inprocessing)

10 / 47

slide-15
SLIDE 15

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption (a ∨ b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ∨ ¯ c ) ∧ ( a ∨ ¯ b ∨ c ) ∧ (¯ a ∨ ¯ b ∨ d ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ∨ d ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-16
SLIDE 16

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ∨ ¯ c ) ∧ ( a ∨ ¯ b ∨ c ) ∧ (¯ a ∨ ¯ b ∨ d ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ∨ d ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-17
SLIDE 17

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ) ∧ ( a ∨ ¯ b ∨ c ) ∧ (¯ a ∨ ¯ b ∨ d ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ∨ d ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-18
SLIDE 18

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ) ∧ ( a ∨ c ) ∧ (¯ a ∨ ¯ b ∨ d ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ∨ d ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-19
SLIDE 19

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ) ∧ ( a ∨ c ) ∧ (¯ a ∨ ¯ b ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ∨ d ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-20
SLIDE 20

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ∨ b ) ∧ ( a ∨ c ) ∧ (¯ a ∨ ¯ b ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-21
SLIDE 21

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ) ∧ ( a ∨ c ) ∧ (¯ a ∨ ¯ b ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-22
SLIDE 22

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ (¯ a ) ∧ ( a ) ∧ (¯ a ∨ ¯ b ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-23
SLIDE 23

Self-Subsuming Example

Self-Subsuming Resolution C ∨ x D ∨ ¯ x D C ⊆ D (a ∨ b ∨ x) (a ∨ b ∨ c ∨ ¯ x) (a ∨ b ∨ c) resolvent D subsumes second antecedent D ∨ ¯ x Example: Remove literals using self-subsumption ( b ∨ c ) ∧ ( ¯ a ∨ b ∨ c ) ∧ ( ) ∧ ( a ) ∧ (¯ a ∨ ¯ b ) ∧ ( ¯ a ∨ ¯ b ∨ ¯ d ) ∧ (a ∨ ¯ c ) ∧ ( a ∨ ¯ c ∨ ¯ d )

11 / 47

slide-24
SLIDE 24

Implementing Subsumption

Definition (Subsumption) Clause C subsumes clause D if and only if C ⊂ D. Example The clause (a ∨ b) subsumes clause (a ∨ b ∨ ¯ c). Forward Subsumption for each clause C in formula F do if C is subsumed by a clause D in F \ C then remove C from F

12 / 47

slide-25
SLIDE 25

Implementing Subsumption

Definition (Subsumption) Clause C subsumes clause D if and only if C ⊂ D. Example The clause (a ∨ b) subsumes clause (a ∨ b ∨ ¯ c). Forward Subsumption for each clause C in formula F do if C is subsumed by a clause D in F \ C then remove C from F Backward Subsumption for each clause C in formula F do remove all clauses D in F that are subsumed by C

12 / 47

slide-26
SLIDE 26

Implementing Subsumption

Definition (Subsumption) Clause C subsumes clause D if and only if C ⊂ D. Example The clause (a ∨ b) subsumes clause (a ∨ b ∨ ¯ c). Forward Subsumption for each clause C in formula F do if C is subsumed by a clause D in F \ C then remove C from F Backward Subsumption for each clause C in formula F do pick a literal x in C remove all clauses D in F x that are subsumed by C

12 / 47

slide-27
SLIDE 27

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

13 / 47

slide-28
SLIDE 28

Variable Elimination [DavisPutnam’60]

Definition (Resolution) Given two clauses C = (x ∨ a1 ∨ · · · ∨ ai) and D = (¯ x ∨ b1 ∨ · · · ∨ bj), the resolvent of C and D on variable x (denoted by C ⊗x D) is (a1 ∨ · · · ∨ ai ∨ b1 ∨ · · · ∨ bj) Resolution on sets of clauses Fx and F¯

x (denoted by Fx ⊗x F¯ x)

generates all non-tautological resolvents of C ∈ Fx and D ∈ F¯

x.

14 / 47

slide-29
SLIDE 29

Variable Elimination [DavisPutnam’60]

Definition (Resolution) Given two clauses C = (x ∨ a1 ∨ · · · ∨ ai) and D = (¯ x ∨ b1 ∨ · · · ∨ bj), the resolvent of C and D on variable x (denoted by C ⊗x D) is (a1 ∨ · · · ∨ ai ∨ b1 ∨ · · · ∨ bj) Resolution on sets of clauses Fx and F¯

x (denoted by Fx ⊗x F¯ x)

generates all non-tautological resolvents of C ∈ Fx and D ∈ F¯

x.

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

14 / 47

slide-30
SLIDE 30

Variable Elimination [DavisPutnam’60]

Definition (Resolution) Given two clauses C = (x ∨ a1 ∨ · · · ∨ ai) and D = (¯ x ∨ b1 ∨ · · · ∨ bj), the resolvent of C and D on variable x (denoted by C ⊗x D) is (a1 ∨ · · · ∨ ai ∨ b1 ∨ · · · ∨ bj) Resolution on sets of clauses Fx and F¯

x (denoted by Fx ⊗x F¯ x)

generates all non-tautological resolvents of C ∈ Fx and D ∈ F¯

x.

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

Proof procedure [DavisPutnam60] VE is a complete proof procedure. Applying VE until fixpoint results in either the empty formula (satisfiable) or empty clause (unsatisfiable)

14 / 47

slide-31
SLIDE 31

Example VE by clause distribution [DavisPutnam’60]

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

15 / 47

slide-32
SLIDE 32

Example VE by clause distribution [DavisPutnam’60]

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

Example of clause distribution Fx

  • (x ∨ c)

(x ∨ ¯ d) (x ∨ ¯ a ∨ ¯ b) F¯

x

   (¯ x ∨ a) (a ∨ c) (a ∨ d) (a ∨ ¯ a ∨ ¯ b) (¯ x ∨ b) (b ∨ c) (b ∨ d) (b ∨ ¯ a ∨ ¯ b) (¯ x ∨ ¯ e ∨ f ) (c ∨ ¯ e ∨ f ) (d ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f )

15 / 47

slide-33
SLIDE 33

Example VE by clause distribution [DavisPutnam’60]

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

Example of clause distribution Fx

  • (x ∨ c)

(x ∨ ¯ d) (x ∨ ¯ a ∨ ¯ b) F¯

x

   (¯ x ∨ a) (a ∨ c) (a ∨ d) (a ∨ ¯ a ∨ ¯ b) (¯ x ∨ b) (b ∨ c) (b ∨ d) (b ∨ ¯ a ∨ ¯ b) (¯ x ∨ ¯ e ∨ f ) (c ∨ ¯ e ∨ f ) (d ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f )

15 / 47

slide-34
SLIDE 34

Example VE by clause distribution [DavisPutnam’60]

Definition (Variable elimination (VE)) Given a CNF formula F, variable elimination (or DP resolution) removes a variable x by replacing Fx and F¯

x by Fx ⊗x F¯ x

Example of clause distribution Fx

  • (x ∨ c)

(x ∨ ¯ d) (x ∨ ¯ a ∨ ¯ b) F¯

x

   (¯ x ∨ a) (a ∨ c) (a ∨ d) (a ∨ ¯ a ∨ ¯ b) (¯ x ∨ b) (b ∨ c) (b ∨ d) (b ∨ ¯ a ∨ ¯ b) (¯ x ∨ ¯ e ∨ f ) (c ∨ ¯ e ∨ f ) (d ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f ) In the example: |Fx ⊗ F¯

x| > |Fx| + |F¯ x|

Exponential growth of clauses in general

15 / 47

slide-35
SLIDE 35

VE by substitution [EenBiere07]

General idea Detect gates (or definitions) x = GATE(a1, . . . , an) in the formula and use them to reduce the number of added clauses

16 / 47

slide-36
SLIDE 36

VE by substitution [EenBiere07]

General idea Detect gates (or definitions) x = GATE(a1, . . . , an) in the formula and use them to reduce the number of added clauses Possible gates gate Gx G¯

x

AND(a1, . . . , an) (x ∨ ¯ a1 ∨ · · · ∨ ¯ an) (¯ x ∨ a1), . . . , (¯ x ∨ an) OR(a1, . . . , an) (x ∨ ¯ a1), . . . , (x ∨ ¯ an) (¯ x ∨ a1 ∨ · · · ∨ an) ITE(c, t, f ) (x ∨ ¯ c ∨ ¯ t), (x ∨ c ∨ ¯ f ) (¯ x ∨ ¯ c ∨ t), (¯ x ∨ c ∨ f )

16 / 47

slide-37
SLIDE 37

VE by substitution [EenBiere07]

General idea Detect gates (or definitions) x = GATE(a1, . . . , an) in the formula and use them to reduce the number of added clauses Possible gates gate Gx G¯

x

AND(a1, . . . , an) (x ∨ ¯ a1 ∨ · · · ∨ ¯ an) (¯ x ∨ a1), . . . , (¯ x ∨ an) OR(a1, . . . , an) (x ∨ ¯ a1), . . . , (x ∨ ¯ an) (¯ x ∨ a1 ∨ · · · ∨ an) ITE(c, t, f ) (x ∨ ¯ c ∨ ¯ t), (x ∨ c ∨ ¯ f ) (¯ x ∨ ¯ c ∨ t), (¯ x ∨ c ∨ f ) Variable elimination by substitution [EenBiere07] Let Rx = Fx \ Gx; R¯

x = F¯ x \ G¯ x.

Replace Fx ∧ F¯

x by Gx ⊗x R¯ x ∧ G¯ x ⊗x Rx.

Always less than Fx ⊗x F¯

x !

16 / 47

slide-38
SLIDE 38

VE by substitution [EenBiere’07]

Example of gate extraction: x = AND(a, b) Fx = (x ∨ c) ∧ (x ∨ ¯ d) ∧ (x ∨ ¯ a ∨ ¯ b) F¯

x = (¯

x ∨ a) ∧ (¯ x ∨ b) ∧ (¯ x ∨ ¯ e ∨ f )

17 / 47

slide-39
SLIDE 39

VE by substitution [EenBiere’07]

Example of gate extraction: x = AND(a, b) Fx = (x ∨ c) ∧ (x ∨ ¯ d) ∧ (x ∨ ¯ a ∨ ¯ b) F¯

x = (¯

x ∨ a) ∧ (¯ x ∨ b) ∧ (¯ x ∨ ¯ e ∨ f ) Example of substitution Rx Gx

  • (x ∨ c)

(x ∨ ¯ d) (x ∨ ¯ a ∨ ¯ b) G¯

x

x ∨ a) (a ∨ c) (a ∨ d) (¯ x ∨ b) (b ∨ c) (b ∨ d) R¯

x

(¯ x ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f )

17 / 47

slide-40
SLIDE 40

VE by substitution [EenBiere’07]

Example of gate extraction: x = AND(a, b) Fx = (x ∨ c) ∧ (x ∨ ¯ d) ∧ (x ∨ ¯ a ∨ ¯ b) F¯

x = (¯

x ∨ a) ∧ (¯ x ∨ b) ∧ (¯ x ∨ ¯ e ∨ f ) Example of substitution Rx Gx

  • (x ∨ c)

(x ∨ ¯ d) (x ∨ ¯ a ∨ ¯ b) G¯

x

x ∨ a) (a ∨ c) (a ∨ d) (¯ x ∨ b) (b ∨ c) (b ∨ d) R¯

x

(¯ x ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f ) using substitution: |Fx ⊗ F¯

x| < |Fx| + |F¯ x|

17 / 47

slide-41
SLIDE 41

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

18 / 47

slide-42
SLIDE 42

Bounded Variable Addition

Main Idea Given a CNF formula F, can we construct a (semi)logically equivalent F ′ by introducing a new variable x / ∈ VAR(F) such that |F ′| < |F|?

19 / 47

slide-43
SLIDE 43

Bounded Variable Addition

Main Idea Given a CNF formula F, can we construct a (semi)logically equivalent F ′ by introducing a new variable x / ∈ VAR(F) such that |F ′| < |F|? Reverse of Variable Elimination For example, replace the clauses (a ∨ c) (a ∨ d) (b ∨ c) (b ∨ d) (c ∨ ¯ e ∨ f ) (d ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f ) by (¯ x ∨ a) (¯ x ∨ b) (¯ x ∨ ¯ e ∨ f ) (x ∨ c) (x ∨ d) (x ∨ ¯ a ∨ ¯ b)

19 / 47

slide-44
SLIDE 44

Bounded Variable Addition

Main Idea Given a CNF formula F, can we construct a (semi)logically equivalent F ′ by introducing a new variable x / ∈ VAR(F) such that |F ′| < |F|? Reverse of Variable Elimination For example, replace the clauses (a ∨ c) (a ∨ d) (b ∨ c) (b ∨ d) (c ∨ ¯ e ∨ f ) (d ∨ ¯ e ∨ f ) (¯ a ∨ ¯ b ∨ ¯ e ∨ f ) by (¯ x ∨ a) (¯ x ∨ b) (¯ x ∨ ¯ e ∨ f ) (x ∨ c) (x ∨ d) (x ∨ ¯ a ∨ ¯ b) Challenge: how to find suitable patterns for replacement?

19 / 47

slide-45
SLIDE 45

Factoring Out Subclauses

Example Replace (a ∨ b ∨ c ∨ d) (a ∨ b ∨ c ∨ e) (a ∨ b ∨ c ∨ f ) by (x ∨ d) (x ∨ e) (x ∨ f ) (¯ x ∨ a ∨ b ∨ c) adds 1 variable and 1 clause reduces number of literals by 2 Not compatible with VE, which would eliminate x immediately! . . . so this does not work . . .

20 / 47

slide-46
SLIDE 46

Bounded Variable Addition

Example Smallest pattern that is compatible: Replace (a ∨ d) (a ∨ e) (b ∨ d) (b ∨ e) (c ∨ d) (c ∨ e) by (¯ x ∨ a) (¯ x ∨ b) (¯ x ∨ c) (x ∨ d) (x ∨ e) adds 1 variable removes 1 clause

21 / 47

slide-47
SLIDE 47

Bounded Variable Addition

Possible Patterns (X1 ∨ L1) . . . (X1 ∨ Lk) . . . . . . (Xn ∨ L1) . . . (Xn ∨ Lk) ≡

n

  • i=1

k

  • j=1

(Xi ∨ Lj) replaced by

n

  • i=1

(y ∨ Xi) ∧

k

  • j=1

(¯ y ∨ Lj) Every k clauses share sets of literals Lj There are n sets of literals Xi that appear in clauses with Lj

22 / 47

slide-48
SLIDE 48

Bounded Variable Addition

Possible Patterns (X1 ∨ L1) . . . (X1 ∨ Lk) . . . . . . (Xn ∨ L1) . . . (Xn ∨ Lk) ≡

n

  • i=1

k

  • j=1

(Xi ∨ Lj) replaced by

n

  • i=1

(y ∨ Xi) ∧

k

  • j=1

(¯ y ∨ Lj) Every k clauses share sets of literals Lj There are n sets of literals Xi that appear in clauses with Lj Reduction: nk − n − k clauses are removed by replacement

22 / 47

slide-49
SLIDE 49

Bounded Variable Addition on AtMostOneZero (1)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ x4) ∧ (x2 ∨ x4) ∧ (x3 ∨ x4) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x1 ∨ x5) ∧ (x2 ∨ x5) ∧ (x3 ∨ x5) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x1 ∨ x6) ∧ (x2 ∨ x6) ∧ (x3 ∨ x6) ∧ (x4 ∨ x6) ∧ (x5 ∨ x6) ∧ (x1 ∨ x7) ∧ (x2 ∨ x7) ∧ (x3 ∨ x7) ∧ (x4 ∨ x7) ∧ (x5 ∨ x7) ∧ (x1 ∨ x8) ∧ (x2 ∨ x8) ∧ (x3 ∨ x8) ∧ (x4 ∨ x8) ∧ (x5 ∨ x8) ∧ (x1 ∨ x9) ∧ (x2 ∨ x9) ∧ (x3 ∨ x9) ∧ (x4 ∨ x9) ∧ (x5 ∨ x9) ∧ (x1 ∨ x10) ∧ (x2 ∨ x10) ∧ (x3 ∨ x10) ∧ (x4 ∨ x10) ∧ (x5 ∨ x10)

23 / 47

slide-50
SLIDE 50

Bounded Variable Addition on AtMostOneZero (1)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ x4) ∧ (x2 ∨ x4) ∧ (x3 ∨ x4) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x1 ∨ x5) ∧ (x2 ∨ x5) ∧ (x3 ∨ x5) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x1 ∨ x6) ∧ (x2 ∨ x6) ∧ (x3 ∨ x6) ∧ (x4 ∨ x6) ∧ (x5 ∨ x6) ∧ (x1 ∨ x7) ∧ (x2 ∨ x7) ∧ (x3 ∨ x7) ∧ (x4 ∨ x7) ∧ (x5 ∨ x7) ∧ (x1 ∨ x8) ∧ (x2 ∨ x8) ∧ (x3 ∨ x8) ∧ (x4 ∨ x8) ∧ (x5 ∨ x8) ∧ (x1 ∨ x9) ∧ (x2 ∨ x9) ∧ (x3 ∨ x9) ∧ (x4 ∨ x9) ∧ (x5 ∨ x9) ∧ (x1 ∨ x10) ∧ (x2 ∨ x10) ∧ (x3 ∨ x10) ∧ (x4 ∨ x10) ∧ (x5 ∨ x10) Replace (xi ∨ xj) with i ∈ {1..5}, j ∈ {6..10} by (xi ∨ y), (xj ∨ ¯ y)

23 / 47

slide-51
SLIDE 51

Bounded Variable Addition on AtMostOneZero (2)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ x4) ∧ (x2 ∨ x4) ∧ (x3 ∨ x4) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x1 ∨ x5) ∧ (x2 ∨ x5) ∧ (x3 ∨ x5) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x1 ∨ y) ∧ (x2 ∨ y) ∧ (x3 ∨ y) ∧ (x4 ∨ y) ∧ (x5 ∨ y) ∧ (x6 ∨ ¯ y) ∧ (x7 ∨ ¯ y) ∧ (x8 ∨ ¯ y) ∧ (x9 ∨ ¯ y) ∧ (x10 ∨ ¯ y)

24 / 47

slide-52
SLIDE 52

Bounded Variable Addition on AtMostOneZero (2)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ x4) ∧ (x2 ∨ x4) ∧ (x3 ∨ x4) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x1 ∨ x5) ∧ (x2 ∨ x5) ∧ (x3 ∨ x5) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x1 ∨ y) ∧ (x2 ∨ y) ∧ (x3 ∨ y) ∧ (x4 ∨ y) ∧ (x5 ∨ y) ∧ (x6 ∨ ¯ y) ∧ (x7 ∨ ¯ y) ∧ (x8 ∨ ¯ y) ∧ (x9 ∨ ¯ y) ∧ (x10 ∨ ¯ y) Replace matched pattern (x1 ∨ z) ∧ (x2 ∨ z) ∧ (x3 ∨ z) ∧ (x4 ∨ ¯ z) ∧ (x5 ∨ ¯ z) ∧ (y ∨ ¯ z)

24 / 47

slide-53
SLIDE 53

Bounded Variable Addition on AtMostOneZero (3)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ z) ∧ (x2 ∨ z) ∧ (x3 ∨ z) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x4 ∨ ¯ z) ∧ (x5 ∨ ¯ z) ∧ (y ∨ ¯ z) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x4 ∨ y) ∧ (x5 ∨ y) ∧ (x6 ∨ ¯ y) ∧ (x7 ∨ ¯ y) ∧ (x8 ∨ ¯ y) (x9 ∨ ¯ y) ∧ (x10 ∨ ¯ y)

25 / 47

slide-54
SLIDE 54

Bounded Variable Addition on AtMostOneZero (3)

Example encoding of AtMostOneZero (x1, x2, . . . , xn) (x1 ∨ x2) ∧ (x9 ∨ x10) ∧ (x8 ∨ x10) ∧ (x7 ∨ x10) ∧ (x6 ∨ x10) ∧ (x1 ∨ x3) ∧ (x2 ∨ x3) ∧ (x8 ∨ x9) ∧ (x7 ∨ x9) ∧ (x6 ∨ x9) ∧ (x1 ∨ z) ∧ (x2 ∨ z) ∧ (x3 ∨ z) ∧ (x7 ∨ x8) ∧ (x6 ∨ x8) ∧ (x4 ∨ ¯ z) ∧ (x5 ∨ ¯ z) ∧ (y ∨ ¯ z) ∧ (x4 ∨ x5) ∧ (x6 ∨ x7) ∧ (x4 ∨ y) ∧ (x5 ∨ y) ∧ (x6 ∨ ¯ y) ∧ (x7 ∨ ¯ y) ∧ (x8 ∨ ¯ y) (x9 ∨ ¯ y) ∧ (x10 ∨ ¯ y) Replace matched pattern (x6 ∨ w) ∧ (x7 ∨ w) ∧ (x8 ∨ w) ∧ (x9 ∨ ¯ w) ∧ (x10 ∨ ¯ w) ∧ (¯ y ∨ ¯ w)

25 / 47

slide-55
SLIDE 55

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

26 / 47

slide-56
SLIDE 56

Blocked Clauses [Kullmann’99]

Definition (Blocking literal) A literal x in a clause C of a CNF F blocks C w.r.t. F if for every clause D ∈ F¯

x, the resolvent (C \ {x}) ∪ (D \ {¯

x})

  • btained from resolving C and D on l is a tautology.

With respect to a fixed CNF and its clauses we have: Definition (Blocked clause) A clause is blocked if it contains a literal that blocks it.

27 / 47

slide-57
SLIDE 57

Blocked Clauses [Kullmann’99]

Definition (Blocking literal) A literal x in a clause C of a CNF F blocks C w.r.t. F if for every clause D ∈ F¯

x, the resolvent (C \ {x}) ∪ (D \ {¯

x})

  • btained from resolving C and D on l is a tautology.

With respect to a fixed CNF and its clauses we have: Definition (Blocked clause) A clause is blocked if it contains a literal that blocks it. Example Consider the formula (a ∨ b) ∧ (a ∨ ¯ b ∨ ¯ c) ∧ (¯ a ∨ c). First clause is not blocked. Second clause is blocked by both a and ¯ c. Third clause is blocked by c

27 / 47

slide-58
SLIDE 58

Blocked Clauses [Kullmann’99]

Definition (Blocking literal) A literal x in a clause C of a CNF F blocks C w.r.t. F if for every clause D ∈ F¯

x, the resolvent (C \ {x}) ∪ (D \ {¯

x})

  • btained from resolving C and D on l is a tautology.

With respect to a fixed CNF and its clauses we have: Definition (Blocked clause) A clause is blocked if it contains a literal that blocks it. Example Consider the formula (a ∨ b) ∧ (a ∨ ¯ b ∨ ¯ c) ∧ (¯ a ∨ c). First clause is not blocked. Second clause is blocked by both a and ¯ c. Third clause is blocked by c Proposition Removal of an arbitrary blocked clause preserves satisfiability.

27 / 47

slide-59
SLIDE 59

Blocked Clause Elimination (BCE)

Definition (BCE) While there is a blocked clause C in a CNF F, remove C from F. Example Consider (a ∨ b) ∧ (a ∨ ¯ b ∨ ¯ c) ∧ (¯ a ∨ c). After removing either (a ∨ ¯ b ∨ ¯ c) or (¯ a ∨ c), the clause (a ∨ b) becomes blocked (no clause with either ¯ b or ¯ a). An extreme case in which BCE removes all clauses!

28 / 47

slide-60
SLIDE 60

Blocked Clause Elimination (BCE)

Definition (BCE) While there is a blocked clause C in a CNF F, remove C from F. Example Consider (a ∨ b) ∧ (a ∨ ¯ b ∨ ¯ c) ∧ (¯ a ∨ c). After removing either (a ∨ ¯ b ∨ ¯ c) or (¯ a ∨ c), the clause (a ∨ b) becomes blocked (no clause with either ¯ b or ¯ a). An extreme case in which BCE removes all clauses! Proposition BCE is confluent, i.e., has a unique fixpoint Blocked clauses stay blocked w.r.t. removal

28 / 47

slide-61
SLIDE 61

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-62
SLIDE 62

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-63
SLIDE 63

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-64
SLIDE 64

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-65
SLIDE 65

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-66
SLIDE 66

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-67
SLIDE 67

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-68
SLIDE 68

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-69
SLIDE 69

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-70
SLIDE 70

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-71
SLIDE 71

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-72
SLIDE 72

BCE very effective on circuits [J¨

arvisaloBiereHeule’10] BCE converts the Tseitin encoding to Plaisted Greenbaum BCE simulates Pure literal elimination, Cone of influence, etc. Example of circuit simplification by BCE on Tseitin encoding (c1) (¯ c1 ∨ t1 ∨ ¯ t2) (c1 ∨ ¯ t1) (c1 ∨ t2) (¯

  • 0 ∨ t3 ∨ c0)

  • 0 ∨ ¯

t3 ∨ ¯ c0) (o0 ∨ t3 ∨ ¯ c0) (o0 ∨ ¯ t3 ∨ c0) (t1 ∨ ¯ t3 ∨ ¯ c0) (¯ t1 ∨ t3) (¯ t1 ∨ c0) (t2 ∨ ¯ a0 ∨ ¯ b0) (¯ t2 ∨ a0) (¯ t2 ∨ b0) (¯ t3 ∨ a0 ∨ b0) (¯ t3 ∨ ¯ a0 ∨ ¯ b0) (t3 ∨ a0 ∨ ¯ b0) (t3 ∨ ¯ a0 ∨ b0)

a0 b0 c0 and xor

  • r

and xor t3 t2

c1 t1 t ¬

29 / 47

slide-73
SLIDE 73

BCE: Solution Reconstruction Input: stack S of eliminated blocked clauses formula F (without the blocked clauses) assignment α that satisfies F Output: an assignment that satisfies F ∧ S

1: while S.size () do 2:

C, l := S.pop ()

3:

if α falsifies C then α := αl

4: end while 5: return α

30 / 47

slide-74
SLIDE 74

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

31 / 47

slide-75
SLIDE 75

Hyper Binary Resolution [Bacchus-AAAI02]

Definition (Hyper Binary Resolution Rule)

(x ∨ x1 ∨ x2 ∨ · · · ∨ xn) (¯ x1 ∨ x′) (¯ x2 ∨ x′) . . . (¯ xn ∨ x′) (x ∨ x′) binary edge hyper edge hyper binary edge ¯ x′ x ¯ x1 . . . ¯ x2 ¯ xn x′ ¯ x Hyper Binary Resolution Rule: combines multiple resolution steps into one uses one n-ary clauses and multiple binary clauses special case hyper unary resolution where x = x′

32 / 47

slide-76
SLIDE 76

Hyper Binary Resolution (HBR)

Definition (Hyper Binary Resolution)

Apply the hyper binary resolution rule until fixpoint

Example

Consider (¯ a ∨ b) ∧ (¯ a ∨ c) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ d) ∧ (¯ c ∨ e) ∧ (¯ d ∨ ¯ e ∨ f ). a b c d e f hyper binary resolvents: (¯ a ∨ f ), (¯ b ∨ f ), (¯ c ∨ f ) HBR is confluent, i.e., has a unique fixpoint

33 / 47

slide-77
SLIDE 77

Structural Hashing of AND-gates via HBR

gate g g ⇒ f (g1, . . . gn) g ⇐ f (g1, . . . gn) “positive” “negative” g := or(g1, . . . , gn) (¯ g ∨ g1 ∨ · · · ∨ gn) (g ∨ ¯ g1),. . . ,(g ∨ ¯ gn) g := and(g1, . . . , gn) (¯ g ∨ g1),. . . ,(¯ g ∨ gn) (g ∨ ¯ g1 ∨ · · · ∨ ¯ gn) g := xor(g1, g2) (¯ g ∨ ¯ g1 ∨ ¯ g2), (¯ g ∨ g1 ∨ g2) (g ∨ ¯ g1 ∨ g2), (g ∨ g1 ∨ ¯ g2) g := ite(g1, g2, g3) (¯ g ∨ ¯ g1 ∨ g2), (¯ g ∨ g1 ∨ g3) (g ∨ ¯ g1 ∨ ¯ g2), (g ∨ g1 ∨ ¯ g3)

Definition (Structural Hashing of AND-gates)

Given a Boolean circuit with two equivalent gates, merge the gates.

Example

x a b y x = AND(a,b) : (¯ x ∨ a) ∧ (¯ x ∨ b) ∧ (x ∨ ¯ a ∨ ¯ b) y = AND(a,b) : (¯ y ∨ a) ∧ (¯ y ∨ b) ∧ (y ∨ ¯ a ∨ ¯ b) the two HBRs (¯ x ∨ y) and (x ∨ ¯ y) express that x = y

34 / 47

slide-78
SLIDE 78

Non-transitive Hyper Binary Resolution (NHBR)

A problem with classic HBR is that it adds many transitive binary clauses

Example

Consider (¯ a ∨ b) ∧ (¯ a ∨ c) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ d) ∧ (¯ c ∨ e) ∧ (¯ d ∨ ¯ e ∨ f ). a b c d e f adding (¯ b ∨ f ) or (¯ c ∨ f ) makes (¯ a ∨ f ) transitive

Solution [HeuleJ¨ arvisaloBiere 2013]

Add only non-transitive hyper binary resolvents Can be implemented using an alternative unit propagation style

35 / 47

slide-79
SLIDE 79

Space Complexity of NHBR: Quadratic

Question regarding complexity [Biere 2009]

Are there formulas where the transitively reduced hyper binary resolution closure is quadratic in size w.r.t. to the size of the

  • riginal?

where size = #clauses or size = #literals or size = #variables

36 / 47

slide-80
SLIDE 80

Space Complexity of NHBR: Quadratic

Question regarding complexity [Biere 2009]

Are there formulas where the transitively reduced hyper binary resolution closure is quadratic in size w.r.t. to the size of the

  • riginal?

where size = #clauses or size = #literals or size = #variables

Yes!

Consider the formula Fn =

1≤i≤n

xi ∨ v) ∧ (¯ xi ∨ w) ∧ (¯ v ∨ ¯ w ∨ yi)

  • x1

x2 . . . xn v w y1 y2 . . . yn #variables: 2n + 2 #clauses: 3n #literals: 7n

36 / 47

slide-81
SLIDE 81

Space Complexity of NHBR: Quadratic

Question regarding complexity [Biere 2009]

Are there formulas where the transitively reduced hyper binary resolution closure is quadratic in size w.r.t. to the size of the

  • riginal?

where size = #clauses or size = #literals or size = #variables

Yes!

Consider the formula Fn =

1≤i≤n

xi ∨ v) ∧ (¯ xi ∨ w) ∧ (¯ v ∨ ¯ w ∨ yi)

  • x1

x2 . . . xn v w y1 y2 . . . yn #variables: 2n + 2 #clauses: 3n #literals: 7n n2 hyper binary resolvents: (¯ xi ∨ yj) for 1 ≤ i, j ≤ n

36 / 47

slide-82
SLIDE 82

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

37 / 47

slide-83
SLIDE 83

Redundancy Redundant clauses:

Removal of C ∈ F preserves unsatisfiability of F Assign all x ∈ C to false and check for a conflict in F \ {C}

38 / 47

slide-84
SLIDE 84

Redundancy Redundant clauses:

Removal of C ∈ F preserves unsatisfiability of F Assign all x ∈ C to false and check for a conflict in F \ {C}

Redundant literals:

Removal of x ∈ C preserves satisfiability of F Assign all x′ ∈ C \ {x} to false and check for a conflict in F

38 / 47

slide-85
SLIDE 85

Redundancy Redundant clauses:

Removal of C ∈ F preserves unsatisfiability of F Assign all x ∈ C to false and check for a conflict in F \ {C}

Redundant literals:

Removal of x ∈ C preserves satisfiability of F Assign all x′ ∈ C \ {x} to false and check for a conflict in F

Redundancy elimination during pre- and in-processing

Distillation [JinSomenzi2005] ReVivAl [PietteHamadiSa¨ ıs2008] Unhiding [HeuleJ¨ arvisaloBiere2011]

38 / 47

slide-86
SLIDE 86

Unhide: Binary implication graph (BIG)

unhide: use the binary clauses to detect redundant clauses and literals a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ (¯ g ∨ h) ∧ (¯ a ∨ ¯ e ∨ h) ∧ (¯ b ∨ ¯ c ∨ h) ∧ (a ∨ b ∨ c ∨ d ∨ e ∨ f ∨ g ∨ h)

  • non binary clauses

39 / 47

slide-87
SLIDE 87

Unhide: Transitive reduction (TRD)

transitive reduction: remove shortcuts in the binary implication graph a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ TRD

g → f → h

(¯ g ∨ h) ∧ (¯ a ∨ ¯ e ∨ h) ∧ (¯ b ∨ ¯ c ∨ h) ∧ (a ∨ b ∨ c ∨ d ∨ e ∨ f ∨ g ∨ h)

40 / 47

slide-88
SLIDE 88

Unhide: Hidden tautology elimination (HTE) (1)

HTE removes clauses that are subsumed by an implication in BIG a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ HTE

a → d → f → h

(¯ a ∨ ¯ e ∨ h) ∧ (¯ b ∨ ¯ c ∨ h) ∧ (a ∨ b ∨ c ∨ d ∨ e ∨ f ∨ g ∨ h)

41 / 47

slide-89
SLIDE 89

Unhide: Hidden tautology elimination (HTE) (2)

HTE removes clauses that are subsumed by an implication in BIG a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ HTE

c → f → h

(¯ b ∨ ¯ c ∨ h) ∧ (a ∨ b ∨ c ∨ d ∨ e ∨ f ∨ g ∨ h)

42 / 47

slide-90
SLIDE 90

Unhide: Hidden literal elimination (HLE)

HLE removes literal using the implication in BIG a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ HLE

all but e imply h

also b implies e

(a ∨ b ∨ c ∨ d ∨ e ∨ f ∨ g ∨ h)

43 / 47

slide-91
SLIDE 91

Unhide: TRD + HTE + HLE

unhide: redundancy elimination removes and adds arcs from BIG(F) a b c d e f g h ¯ a ¯ b ¯ c ¯ d ¯ e ¯ f ¯ g ¯ h (¯ a ∨ c) ∧ (¯ a ∨ d) ∧ (¯ b ∨ d) ∧ (¯ b ∨ e) ∧ (¯ c ∨ f ) ∧ (¯ d ∨ f ) ∧ (¯ g ∨ f ) ∧ (¯ f ∨ h) ∧ (e ∨ h)

44 / 47

slide-92
SLIDE 92

Motivation Subsumption Variable Elimination Bounded Variable Addition Blocked Clause Elimination Hyper Binary Resolution Unhiding Redundancy Concluding Remarks

45 / 47

slide-93
SLIDE 93

Many Techniques

Many pre- or in-processing techniques in SAT solvers: (Self-)Subsumption Variable Elimination Blocked Clause Elimination Hyper Binary Resolution Bounded Variable Addition Equivalent Literal Substitution Failed Literal Elimination Autarky Reasoning ...

46 / 47

slide-94
SLIDE 94

Many Techniques

Many pre- or in-processing techniques in SAT solvers: (Self-)Subsumption Variable Elimination Blocked Clause Elimination Hyper Binary Resolution Bounded Variable Addition Equivalent Literal Substitution Failed Literal Elimination Autarky Reasoning ... ... and the list is growing: Propagation Redundant Clauses [CADE’17]

46 / 47

slide-95
SLIDE 95

Preprocessing Techniques

Marijn J.H. Heule http://www.cs.cmu.edu/~mheule/15816-f19/ Automated Reasoning and Satisfiability, September 19, 2019

47 / 47