efficient extraction of skolem functions from qrat proofs
play

Efficient Extraction of Skolem Functions from QRAT Proofs Marijn - PowerPoint PPT Presentation

Efficient Extraction of Skolem Functions from QRAT Proofs Marijn J.H. Heule Joint work with Martina Seidl and Armin Biere FMCAD, October 23, 2014 1/22 Introduction and Challenges From Clausal Proofs to Skolem Functions Running Example


  1. Efficient Extraction of Skolem Functions from QRAT Proofs Marijn J.H. Heule Joint work with Martina Seidl and Armin Biere FMCAD, October 23, 2014 1/22

  2. Introduction and Challenges From Clausal Proofs to Skolem Functions Running Example Validating Skolem Functions Experimental Results Conclusions 2/22

  3. Introduction to QBF A quantified Boolean formula (QBF) is a propositional formula where variables are existentially ( ∃ ) or universally ( ∀ ) quantified. Consider the formula ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) 1 0 c 0 b ⊤ A model is: a 1 c b ⊤ 0 1 Consider the formula ∃ b ∀ a ∃ c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) 0 a 0 ⊥ b 0 ⊥ A counter-model is: 1 a c 1 1 ⊥ 3/22

  4. Introduction to Skolem functions for QBF A Skolem function f x ( U x ) for a QBF formula π.ψ defines the truth value of an existential variable x based on the set U x of universal variables that occur earlier in the prefix than x Consider the formula ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) 1 0 c 0 b ⊤ A model is: a 1 c b ⊤ 0 1 The set of Skolem functions F (defining all existentials) is F = { f b ( a ) = ¬ a , f c ( a ) = a } The set of Skolem functions can be much smaller than a model 4/22

  5. Challenges for Quantified Boolean Formulas (QBF) Preprocessing is crucial to solve most QBF instances efficiently. Proofs are useful for applications and to validate solver output. Main challenges regarding QBF and preprocessing [Janota’13]: 1. produce proofs that can be validated in polynomial time; 2. develop methods to validate all QBF preprocessing; and 3. narrow the performance gap between solving with and without proof generation. In our IJCAR’14 paper [1], we meet all three challenges! [1] Marijn J. H. Heule, Matina Seidl and Armin Biere: A Unified Proof System for QBF Preprocessing. IJCAR 2014, LNCS 8562, pp 91-106 (2014) Here we show how to make Skolem functions out of the proofs. 5/22

  6. From Clausal Proofs to Skolem Functions 6/22

  7. Clausal Proof System Learn: add a clause * Preserve satisfiability Unsatisfiable * Learn empty clause init π.ψ Satisfiable * Forget last clause Forget: remove a clause * Preserve unsatisfiablity 7/22

  8. Redundancy Concepts in the QRAT Proof System Informal definitions of the redundancy concepts in the QRAT proof system. They can be computed in polynomial time. Definition (Asymmetric Tautologies (AT)) An asymmetric tautology is a clause that becomes a tautology after adding “hidden literals”. ATs are logically implied by a formula. Definition (Quantified Resolution AT (QRAT)) A quantified resolution AT is a clause that contains a literal for which all “outer resolvents” are ATs. Definition (Extended Universal Reduction (EUR)) A universal literal is redundant if assigning it to false cannot influence the value of universal literals. 8/22

  9. Rules of the QRAT Proof System Rule Preconditions Postconditions π.ψ C is an asymmetric (N1) π.ψ \{ C } tautology π ′ = π ∃ X with π.ψ C is an asymmetric (N2) π ′ .ψ ∪ { C } tautology X = { x | x ∈ vars ( C ) , x �∈ vars ( π ) } π.ψ C ∈ ψ , Q ( π, l ) = ∃ (E1) π.ψ \{ C } C has QRAT on l w.r.t. ψ π ′ = π ∃ X with π.ψ C �∈ ψ , Q ( π, l ) = ∃ (E2) π ′ .ψ ∪ { C } C has QRAT on l w.r.t. ψ X = { x | x ∈ vars ( C ) , x �∈ vars ( π ) } π.ψ ∪ { C } l ∈ C , Q ( π, l ) = ∀ , ¬ l �∈ C , (U1) π.ψ ∪ { C \{ l }} C has QRAT on l w.r.t. ψ π.ψ ∪ { C } l ∈ C , Q ( π, l ) = ∀ , ¬ l �∈ C , (U2) π.ψ ∪ { C \{ l }} C has EUR on l w.r.t. ψ 9/22

  10. Rules of the QRAT Proof System Rule Preconditions Postconditions π.ψ C is an asymmetric Preserves Logical Equivalence (N1) π.ψ \{ C } tautology π ′ = π ∃ X with π.ψ C is an asymmetric Preserves Logical Equivalence (N2) π ′ .ψ ∪ { C } tautology X = { x | x ∈ vars ( C ) , x �∈ vars ( π ) } π.ψ C ∈ ψ , Q ( π, l ) = ∃ Weakens the Formula (E1) π.ψ \{ C } C has QRAT on l w.r.t. ψ π ′ = π ∃ X with π.ψ C �∈ ψ , Q ( π, l ) = ∃ Strengthens the Formula (E2) π ′ .ψ ∪ { C } C has QRAT on l w.r.t. ψ X = { x | x ∈ vars ( C ) , x �∈ vars ( π ) } π.ψ ∪ { C } l ∈ C , Q ( π, l ) = ∀ , ¬ l �∈ C , Strengthens the Formula (U1) π.ψ ∪ { C \{ l }} C has QRAT on l w.r.t. ψ π.ψ ∪ { C } l ∈ C , Q ( π, l ) = ∀ , ¬ l �∈ C , Strengthens the Formula (U2) π.ψ ∪ { C \{ l }} C has EUR on l w.r.t. ψ 9/22

  11. Pseudo-Code of Skolem Function Computation ComputeSkolem (prefix π , QRAT proof P ) let ψ be an empty formula 1 foreach existential variable e do f e ( U ) := ∗ // initialize F 2 while ( P is not empty) do 3 � rule R , clause C , literal l � := P .pop() 4 if ( R = E1) then 5 let e be var ( l ) 6 f e ( U ) := IfThenElse ( F ( OF ( π, ψ, l ))) , polarity ( l ) , f e ( U )) 7 if ( R = E1 or R = N1) then // Forget rules 8 ψ := ψ ∪ { C } 9 if ( R = E2 or R = N2) then // Learn rules 10 ψ := ψ \ { C } 11 10/22

  12. Adding a Skolem Function The outer clause of D w.r.t. a literal l under prefix π is: OC ( π, D , l ) := { k | k ∈ D , π ( k ) ≤ π ( l ) , and k � = l } The outer formula of ψ w.r.t. a literal l under prefix π is: OF ( π, ψ, l ) := {OC ( π, D , ¬ l ) | D ∈ ψ, ¬ l ∈ D } How to understand f e ( U ) := IfThenElse ( F ( OF ( π, ψ, l ))) , polarity ( l ) , f e ( U )) ? If a clause C has QRAT on literal l ∈ C w.r.t. ψ , then ◮ any assignment that falsifies OF ( π, ψ, l ) satisfies C ◮ if OF ( π, ψ, l ) is satisfied, we can safely assign l to true 11/22

  13. Running Example 12/22

  14. Running Example Consider again π.ψ := ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) QRAT proof P using the rules E1 (Forget) and E2 (Learn): E2 ( ¬ a ∨¬ b ) , E1 ( ¬ a ∨ c ) , E1 ( ¬ b ∨¬ c ) , E1 ( ¬ a ∨¬ b ) , E1 ( a ∨ b ) Rule OF ( π, ψ, l ) Skolem set F ψ init ∅ n \ a f b ( a ) = ∗ , f c ( a ) = ∗ 13/22

  15. Running Example Consider again π.ψ := ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) QRAT proof P using the rules E1 (Forget) and E2 (Learn): E2 ( ¬ a ∨¬ b ) , E1 ( ¬ a ∨ c ) , E1 ( ¬ b ∨¬ c ) , E1 ( ¬ a ∨¬ b ) , E1 ( a ∨ b ) Rule OF ( π, ψ, l ) Skolem set F ψ init ∅ n \ a f b ( a ) = ∗ , f c ( a ) = ∗ E1 ( a ∨ b ) ∅ ∅ f b ( a ) = ⊤ , f c ( a ) = ∗ 13/22

  16. Running Example Consider again π.ψ := ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) QRAT proof P using the rules E1 (Forget) and E2 (Learn): E2 ( ¬ a ∨¬ b ) , E1 ( ¬ a ∨ c ) , E1 ( ¬ b ∨¬ c ) , E1 ( ¬ a ∨¬ b ) , E1 ( a ∨ b ) Rule OF ( π, ψ, l ) Skolem set F ψ init ∅ n \ a f b ( a ) = ∗ , f c ( a ) = ∗ E1 ( a ∨ b ) ∅ ∅ f b ( a ) = ⊤ , f c ( a ) = ∗ E1 ( ¬ a ∨ ¬ b ) ( a ∨ b ) ( a ) f b ( a ) = ¬ a , f c ( a ) = ∗ 13/22

  17. Running Example Consider again π.ψ := ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) QRAT proof P using the rules E1 (Forget) and E2 (Learn): E2 ( ¬ a ∨¬ b ) , E1 ( ¬ a ∨ c ) , E1 ( ¬ b ∨¬ c ) , E1 ( ¬ a ∨¬ b ) , E1 ( a ∨ b ) Rule OF ( π, ψ, l ) Skolem set F ψ init ∅ n \ a f b ( a ) = ∗ , f c ( a ) = ∗ E1 ( a ∨ b ) ∅ ∅ f b ( a ) = ⊤ , f c ( a ) = ∗ E1 ( ¬ a ∨ ¬ b ) ( a ∨ b ) ( a ) f b ( a ) = ¬ a , f c ( a ) = ∗ ( a ∨ b ) ∧ E1 ( ¬ b ∨ ¬ c ) ∅ f b ( a ) = ¬ a , f c ( a ) = ⊥ ( ¬ a ∨ ¬ b ) 13/22

  18. Running Example Consider again π.ψ := ∀ a ∃ b , c . ( a ∨ b ) ∧ ( ¬ a ∨ c ) ∧ ( ¬ b ∨ ¬ c ) QRAT proof P using the rules E1 (Forget) and E2 (Learn): E2 ( ¬ a ∨¬ b ) , E1 ( ¬ a ∨ c ) , E1 ( ¬ b ∨¬ c ) , E1 ( ¬ a ∨¬ b ) , E1 ( a ∨ b ) Rule OF ( π, ψ, l ) Skolem set F ψ init ∅ n \ a f b ( a ) = ∗ , f c ( a ) = ∗ E1 ( a ∨ b ) ∅ ∅ f b ( a ) = ⊤ , f c ( a ) = ∗ E1 ( ¬ a ∨ ¬ b ) ( a ∨ b ) ( a ) f b ( a ) = ¬ a , f c ( a ) = ∗ ( a ∨ b ) ∧ E1 ( ¬ b ∨ ¬ c ) ∅ f b ( a ) = ¬ a , f c ( a ) = ⊥ ( ¬ a ∨ ¬ b ) ( a ∨ b ) ∧ E1 ( ¬ a ∨ c ) ( ¬ a ∨¬ b ) ∧ ( ¬ b ) f b ( a ) = ¬ a , f c ( a ) = ¬ f b ( a ) ( ¬ b ∨ ¬ c ) 13/22

  19. Validating Skolem Functions 14/22

  20. Checks to Validate Skolem Functions Two tests are required to validate Skolem functions: 1. Can we falsify a clause in formula ψ while satisfying the Skolem functions F ( U ) ? solve ( ¬ ψ ∧ F ( U )) = UNSAT ? 2. Check that all Skolem functions depend only on universal variables that occur earlier in the prefix. Problem: our method could create a Skolem function f x ( U x ) := f y ( U y ) with π ( x ) < π ( y ) Solution: convert Skolem functions to And-Inverter-Graphs (AIGs) and check for reachability. 15/22

  21. Check Reachability in AIGs Consider the formula π.ψ : Skolem functions for π.ψ : ∀ a ∃ b ∀ c ∃ d , e . e ( a ∨ b ) ∧ ( ¬ a ∨ ¬ b ∨ d ) ∧ b d 10 ( a ∨ c ∨ ¬ d ) ∧ ( a ∨ ¬ b ∨ ¬ e ) ∧ 2 6 ( ¬ a ∨ c ∨ e ) ∧ ( ¬ c ∨ ¬ e ) a c Our algorithm could have produced f b ( a ) := f d ( a , c ) , but that is not problematic because f d ( a , c ) does not depend on c . How to simplify the circuit and preserve the dependencies? 16/22

  22. Experimental Results 17/22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend