Compression of Propositional Resolution Proofs by Lowering Subproofs - - PowerPoint PPT Presentation

compression of propositional resolution proofs by
SMART_READER_LITE
LIVE PREVIEW

Compression of Propositional Resolution Proofs by Lowering Subproofs - - PowerPoint PPT Presentation

Compression of Propositional Resolution Proofs by Lowering Subproofs Joseph Boudou 1 Bruno Woltzenlogel Paleo 2 1 Universit Paul Sabatier, Toulouse 2 Vienna University of Technology SMT Workshop, 2013 Overview Introduction Motivations


slide-1
SLIDE 1

Compression of Propositional Resolution Proofs by Lowering Subproofs

Joseph Boudou1 Bruno Woltzenlogel Paleo2

1Université Paul Sabatier, Toulouse 2Vienna University of Technology

SMT Workshop, 2013

slide-2
SLIDE 2

Overview Introduction Motivations Proofs’ representation Redundancies and corresponding algorithms Vertical redundancy Horizontal redundancy LowerUnivalents Principles Algorithm and implementation Experiments Conclusion

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 2 / 22

slide-3
SLIDE 3

Introduction Motivations

Why compressing propositional part of SMT proofs?

SMT solvers are embeded in other tools

◮ Sledgehammer’s extension to SMT solver ◮ SMTCoq

Some tools need the proof to be

◮ checked; ◮ tranlated; ◮ analysed.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 3 / 22

slide-4
SLIDE 4

Introduction Proofs’ representation

Proof as a tree

¯ b,c ¯ a,b

b

¯ a,c ¯ a,b ¯ a, ¯ b, ¯ c

¯ b

¯ a, ¯ c

¯ c

¯ a a

a

Proof as a directed acyclic graph (DAG)

⊥ ¯ a a ¯ a,c ¯ a,¯ c ¯ b,c ¯ a,b ¯ a,¯ b,¯ c

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 4 / 22

slide-5
SLIDE 5

Introduction Proofs’ representation

Proof

Definition (Proof)

A proof ψ is a directed acyclic graph

◮ having a root noted ρ(ψ); ◮ with nodes labeled with clauses; ◮ with edges oriented from the resolvent to the premise; ◮ with edges labeled with the premise’s literal removed in

the resolvent;

◮ which is either an axiom or a resolution proof.

Definition (Axiom)

An axiom is a proof with only one node.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 5 / 22

slide-6
SLIDE 6

Introduction Proofs’ representation

Resolution Given two proofs ϕL and ϕR with conclusion Γ

L and Γ R and a

literal ℓ s.t. ¯ ℓ ∈ Γ

L and ℓ ∈ Γ R, the resolution proof ψ of ϕL and

ϕR on ℓ, noted ψ = ϕL ⊙ℓ ϕR, is such that:

◮ ψ’s nodes are the union of ϕL and ϕR nodes plus a new

root node;

◮ there is an edge from ρ(ψ) to ρ(ϕL) labeled with ¯

ℓ;

◮ there is an edge from ρ(ψ) to ρ(ϕR) labeled with ℓ; ◮ ψ’s conclusion is

  • Γ

L \ {¯

ℓ}

  • ∪ (Γ

R \ {ℓ}).

¯ b b ¯ a a ⊙¯

c

bc a ¯ abc = c ¯ b bc b ¯ a a ¯ abc

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 6 / 22

slide-7
SLIDE 7

Introduction Proofs’ representation

Deletion

Deletion of an edge

◮ The resolvent is replaced by the other premise. ◮ Some subsequent resolutions may have to be deleted too.

Deletion of a subproof ϕ

◮ Deletion of every edge coming to ρ(ϕ). ◮ The operation is commutative and associative.

Notation

ψ \ (ϕ1,...,ϕn) denotes the deletions of subproofs ϕ1,...,ϕn from the proof ψ.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 7 / 22

slide-8
SLIDE 8

Redundancies and corresponding algorithms

Introduction Redundancies and corresponding algorithms Vertical redundancy Horizontal redundancy LowerUnivalents Conclusion

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 8 / 22

slide-9
SLIDE 9

Redundancies and corresponding algorithms Vertical redundancy

Regular proof

Definition (Tseitin 1970)

A proof is regular iff on every path from its root to any of its axiom, any literal appears at most once as edge label.

Theorem (Goerdt 1990)

Given a set of axioms and a clause Γ, the smallest regular proof of Γ might be exponentially bigger than the smallest irregular proof of Γ.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 9 / 22

slide-10
SLIDE 10

Redundancies and corresponding algorithms Vertical redundancy

RecyclePivotsWithIntersection (RPI)

Partial Regularization

◮ Delete an outgoing edge labeled with ℓ iff ¯

ℓ appears on every path from the root to the node.

Definition (Safe literal)

A literal is safe for a node η if it can be added to η’s clause without changing proof’s conclusion.

Two traversals

↑ Collect safe literals and mark edges to be deleted. ↓ Delete edges.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 10 / 22

slide-11
SLIDE 11

Redundancies and corresponding algorithms Vertical redundancy

⊥ ¯ c c ¯ b,c b a ¯ a,b a, ¯ c a,c ¯ a, ¯ b,c

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 11 / 22

slide-12
SLIDE 12

Redundancies and corresponding algorithms Vertical redundancy

⊥ ¯ c c

c

¯ b,c b a ¯ a,b a, ¯ c a,c

c

¯ a, ¯ b,c

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 11 / 22

slide-13
SLIDE 13

Redundancies and corresponding algorithms Vertical redundancy

⊥ ¯ c c

c

¯ b,c b a ¯ a,b a, ¯ c a,c

c

¯ a, ¯ b,c Original proof ⊥ ¯ c c ¯ b,c b a ¯ a,b a, ¯ c a,c ¯ a, ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 11 / 22

slide-14
SLIDE 14

Redundancies and corresponding algorithms Vertical redundancy

⊥ ¯ c c

c

¯ b,c b a ¯ a,b a, ¯ c a,c

c

¯ a, ¯ b,c Original proof

5 resolutions

⊥ ¯ c c ¯ b,c b,c a ¯ a,b a, ¯ c a,c ¯ a, ¯ b,c Compressed proof

4 resolutions

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 11 / 22

slide-15
SLIDE 15

Redundancies and corresponding algorithms Horizontal redundancy

Definition

A node is an horizontal redundancy iff it has at least two incoming edges labeled with the same literal.

Reducing horizontal redundancy

◮ postponing resolution until resolvents are resolved.

Example

⊥ ¯ c c ¯ b,c b,c ¯ a, ¯ b,c a,c

a

¯ a,b

a

⊥ ¯ c c ¯ a,c a,c ¯ a, ¯ b,c ¯ a,b

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 12 / 22

slide-16
SLIDE 16

Redundancies and corresponding algorithms Horizontal redundancy

LowerUnits (LU)

Definition (Unit)

A unit is a subproof with a conclusion clause having exactly

  • ne literal.

Theorem

A unit can always be lowered.

Two traversals

Collect units with more than one resolvent. ↓ Delete units and reintroduce them at the bottom of the proof.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 13 / 22

slide-17
SLIDE 17

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-18
SLIDE 18

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof ⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-19
SLIDE 19

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof ¯ b ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-20
SLIDE 20

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof ¯ b ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-21
SLIDE 21

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof a, ¯ b ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-22
SLIDE 22

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof ¯ a a, ¯ b a,b a, ¯ b, ¯ c ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-23
SLIDE 23

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof a ¯ a a, ¯ b a,b a, ¯ b, ¯ c ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-24
SLIDE 24

Redundancies and corresponding algorithms Horizontal redundancy

⊥ ¯ c c ¯ b, ¯ c b ¯ b,c a, ¯ b, ¯ c ¯ a a,b Original proof

5 resolutions

⊥ a ¯ a a, ¯ b a,b a, ¯ b, ¯ c ¯ b,c Compressed proof

3 resolutions

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 14 / 22

slide-25
SLIDE 25

LowerUnivalents

Introduction Redundancies and corresponding algorithms LowerUnivalents Principles Algorithm and implementation Experiments Conclusion

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 15 / 22

slide-26
SLIDE 26

LowerUnivalents Principles

Goals

◮ Lower more subproofs. ◮ Allow fast combination after RPI.

Idea

◮ If a unit with conclusion clause {a} is already marked for

lowering, a subproof with conclusion clause {¯ a,b} may be lowered too.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 16 / 22

slide-27
SLIDE 27

LowerUnivalents Principles

Definition (Valent literal)

In a proof ψ, a literal ℓ is valent for the subproof ϕ iff ¯ ℓ belongs to the conclusion of ψ \ (ϕ) but not to the conclusion of ψ.

Definition (Univalent subproof)

A subproof ϕ with conclusion Γ is univalent w.r.t. a set ∆ of literals iff ϕ has exactly one valent literal ℓ, ℓ ∆ and Γ ⊆ ∆ ∪ {ℓ}. ℓ is called the univalent literal of ϕ w.r.t. ∆.

Theorem

Given a proof ψ, if there is a sequence U = (ϕ1 ...ϕn) of ψ’s subproofs and a sequence (ℓ1 ...ℓn) of literals such that ∀i ∈ [1...n], ℓi is the univalent literal of ϕi w.r.t. ∆i−1 = { ¯ ℓ1 ... ¯ ℓi−1}, then the conclusion of ψ′ = ψ \ (U) ⊙ℓn ϕn ... ⊙ℓ1 ϕ1 subsumes the conclusion of ψ.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 17 / 22

slide-28
SLIDE 28

LowerUnivalents Algorithm and implementation

Input: a proof ψ Output: a compressed proof ψ′ Univalents ← ∅ ; ∆ ← ∅ ; for every subproof ϕ, in a top-down traversal do ψ′ ← ϕ\Univalents ; if ψ′ is univalent w.r.t. ∆ then let ℓ be the univalent literal ; push ¯ ℓ onto ∆ ; push ψ′ onto Univalents ; // At this point, ψ′ = ψ \ Univalents while Univalents ∅ do ϕ ← pop from Univalents; ℓ ← pop from ∆ ; if ℓ in the conclusion of ψ′ then ψ′ ← ϕ ⊙ℓ ψ′ ;

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 18 / 22

slide-29
SLIDE 29

LowerUnivalents Algorithm and implementation

∆ = ∅ ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-30
SLIDE 30

LowerUnivalents Algorithm and implementation

∆ = {¯ a} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-31
SLIDE 31

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-32
SLIDE 32

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-33
SLIDE 33

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-34
SLIDE 34

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a, ¯ b a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-35
SLIDE 35

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ⊥ ¯ a, ¯ b a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-36
SLIDE 36

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof a ¯ a, ¯ b ¯ a,b ¯ a, ¯ b, ¯ c ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-37
SLIDE 37

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof ¯ a a ¯ a, ¯ b ¯ a,b ¯ a, ¯ b, ¯ c ¯ b,c Compressed proof

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-38
SLIDE 38

LowerUnivalents Algorithm and implementation

∆ = {¯ a, ¯ b} ⊥ ¯ a a ¯ a, ¯ c ¯ a,c ¯ a, ¯ b, ¯ c ¯ a,b ¯ b,c Original proof

4 resolutions

⊥ ¯ a a ¯ a, ¯ b ¯ a,b ¯ a, ¯ b, ¯ c ¯ b,c Compressed proof

3 resolutions

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 19 / 22

slide-39
SLIDE 39

LowerUnivalents Experiments

Configuration

◮ Algorithms implemented in Scala for the Skeptik library. ◮ 5 000 SMT proofs produced by the VeriT solver. ◮ Experiments performed on the Vienna Scientific Cluster.

Results

Algorithm Compression Speed LowerUnits 7.5 % 22.4 n/ms LowerUnivalents 8.0 % 20.4 n/ms LU composed after RPI 21.7 % 15.1 n/ms LUniv combined after RPI 22.0 % 17.8 n/ms

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 20 / 22

slide-40
SLIDE 40

Conclusion

Goals achieved

◮ LowerUnivalents compresses more than LowerUnits. ◮ LowerUnivalents combines efficiently after RPI.

Future works

◮ Combine LowerUnivalents after other algorithms. ◮ Get rid of order dependency. ◮ Lower subproofs to the middle of the proof. ◮ Explore other kinds of redundancies.

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 21 / 22

slide-41
SLIDE 41

Conclusion

Thank you for your attention. Any question ? Skeptik

◮ http://github.com/Paradoxika/Skeptik

  • J. Boudou, B. Woltzenlogel Paleo

Compression of Propositional Resolution Proofs SMT 2013 22 / 22