decision procedures
play

Decision Procedures An Algorithmic Point of View Revision 1.0 - PowerPoint PPT Presentation

Propositional Encodings Chapter 11 Decision Procedures An Algorithmic Point of View Revision 1.0 D.Kroening O.Strichman Outline 1 Overview 2 Notation 3 A Basic Encoding Algorithm 4 Integration into DPLL 5 Theory Propagation and the DPLL( T )


  1. Propositional Encodings Chapter 11 Decision Procedures An Algorithmic Point of View Revision 1.0 D.Kroening O.Strichman

  2. Outline 1 Overview 2 Notation 3 A Basic Encoding Algorithm 4 Integration into DPLL 5 Theory Propagation and the DPLL( T ) Framework 6 Theory Propagation and the DPLL( T ) Framework 7 Optimizations and Implementation Issues Decision Procedures – Propositional Encodings 2

  3. Propositional Encodings Let T be a first-order Σ -theory such that: T is quantifier-free. There exists a decision procedure, denoted DP T , for the conjunctive fragment of T . Decision Procedures – Propositional Encodings 3

  4. Propositional Encodings Example 1: T is equality logic. DP T is the congruence closure algorithm. Example 2: T is disjunctive linear arithmetic. DP T is the Simplex algorithm. Decision Procedures – Propositional Encodings 4

  5. Propositional Encodings We will now study a framework that combines DP T , and a SAT solver, in various ways, in order to construct a decision procedure for T . Decision Procedures – Propositional Encodings 5

  6. Propositional Encodings We will now study a framework that combines DP T , and a SAT solver, in various ways, in order to construct a decision procedure for T . This method is modular, efficient, competitive (all state-of-the-art SMT solvers work this way). Decision Procedures – Propositional Encodings 5

  7. Propositional Encodings The two main engines in this framework work in tight collaboration: The SAT solver chooses those literals that need to be satisfied in order to satisfy the Boolean structure of the formula, and The theory solver DP T checks whether this choice is consistent in T . Decision Procedures – Propositional Encodings 6

  8. Notation Let l be a Σ -literal. Denote by e ( l ) the Boolean encoder of this literal. Let t be a Σ -formula, Denote by e ( t ) the Boolean formula resulting from substituting each Σ -literal in t with its Boolean encoder. Decision Procedures – Propositional Encodings 7

  9. Notation Let l be a Σ -literal. Denote by e ( l ) the Boolean encoder of this literal. Let t be a Σ -formula, Denote by e ( t ) the Boolean formula resulting from substituting each Σ -literal in t with its Boolean encoder. For a Σ -formula t , the resulting Boolean formula e ( t ) is called the propositional skeleton of t . Decision Procedures – Propositional Encodings 7

  10. Boolean encoders – examples Example I: Let l := x = y be a Σ -literal. Then e ( x = y ) , a Boolean variable, is its encoder. Decision Procedures – Propositional Encodings 8

  11. Boolean encoders – examples Example I: Let l := x = y be a Σ -literal. Then e ( x = y ) , a Boolean variable, is its encoder. Example II: Let t := x = y ∨ x = z be a Σ -formula. Then e ( t ) := e ( x = y ) ∨ e ( x = z ) is its Boolean encoder. Decision Procedures – Propositional Encodings 8

  12. Overview by an example Let T be equality logic. Given an NNF formula ϕ := x = y ∧ (( y = z ∧ x � = z ) ∨ x = z ) , (1) we begin by computing its propositional skeleton: Decision Procedures – Propositional Encodings 9

  13. Overview by an example Let T be equality logic. Given an NNF formula ϕ := x = y ∧ (( y = z ∧ x � = z ) ∨ x = z ) , (1) we begin by computing its propositional skeleton: e ( ϕ ) := e ( x = y ) ∧ (( e ( y = z ) ∧ e ( x � = z )) ∨ e ( x = z )) . (2) Decision Procedures – Propositional Encodings 9

  14. Overview by an example Let T be equality logic. Given an NNF formula ϕ := x = y ∧ (( y = z ∧ x � = z ) ∨ x = z ) , (1) we begin by computing its propositional skeleton: e ( ϕ ) := e ( x = y ) ∧ (( e ( y = z ) ∧ e ( x � = z )) ∨ e ( x = z )) . (2) Note that since we are encoding literals and not atoms , e ( ϕ ) has no negations and hence is trivially satisfiable. Decision Procedures – Propositional Encodings 9

  15. Overview by an example Let B be a Boolean formula, initially set to e ( ϕ ) , i.e., B := e ( ϕ ) . Decision Procedures – Propositional Encodings 10

  16. Overview by an example Let B be a Boolean formula, initially set to e ( ϕ ) , i.e., B := e ( ϕ ) . As a second step, we pass B to a SAT solver. Decision Procedures – Propositional Encodings 10

  17. Overview by an example Let B be a Boolean formula, initially set to e ( ϕ ) , i.e., B := e ( ϕ ) . As a second step, we pass B to a SAT solver. Assume that the SAT solver returns the satisfying assignment α := { e ( x = y ) �→ true , e ( y = z ) �→ true , e ( x � = z ) �→ true , e ( x = z ) �→ false } . Decision Procedures – Propositional Encodings 10

  18. Overview by an example Denote by ˆ Th ( α ) the conjunction of the literals corresponding to this assignment. ˆ Th ( α ) := x = y ∧ y = z ∧ x � = z ∧ ¬ ( x = z ) . Decision Procedures – Propositional Encodings 11

  19. Overview by an example Denote by ˆ Th ( α ) the conjunction of the literals corresponding to this assignment. ˆ Th ( α ) := x = y ∧ y = z ∧ x � = z ∧ ¬ ( x = z ) . The decision procedure DP T now has to decide whether ˆ Th ( α ) is satisfiable. Decision Procedures – Propositional Encodings 11

  20. Overview by an example Denote by ˆ Th ( α ) the conjunction of the literals corresponding to this assignment. ˆ Th ( α ) := x = y ∧ y = z ∧ x � = z ∧ ¬ ( x = z ) . The decision procedure DP T now has to decide whether ˆ Th ( α ) is satisfiable. ˆ Th ( α ) is not satisfiable, which means that the negation of this formula is a tautology. Decision Procedures – Propositional Encodings 11

  21. Overview by an example Thus B is conjoined with e ( ¬ ˆ Th ( α )) , the Boolean encoding of this tautology: e ( ¬ ˆ Th ( α )) := ( ¬ e ( x = y ) ∨ ¬ e ( y = z ) ∨ ¬ e ( x � = z ) ∨ e ( x = z )) . Decision Procedures – Propositional Encodings 12

  22. Overview by an example Thus B is conjoined with e ( ¬ ˆ Th ( α )) , the Boolean encoding of this tautology: e ( ¬ ˆ Th ( α )) := ( ¬ e ( x = y ) ∨ ¬ e ( y = z ) ∨ ¬ e ( x � = z ) ∨ e ( x = z )) . This clause contradicts the current assignment, and hence blocks it from being repeated. Such clauses are called blocking clauses . Decision Procedures – Propositional Encodings 12

  23. Overview by an example Thus B is conjoined with e ( ¬ ˆ Th ( α )) , the Boolean encoding of this tautology: e ( ¬ ˆ Th ( α )) := ( ¬ e ( x = y ) ∨ ¬ e ( y = z ) ∨ ¬ e ( x � = z ) ∨ e ( x = z )) . This clause contradicts the current assignment, and hence blocks it from being repeated. Such clauses are called blocking clauses . We denote by t the formula – also called the lemma – returned by DP T (in this example t := ¬ ˆ Th ( α ) ). Decision Procedures – Propositional Encodings 12

  24. Overview by an example After the blocking clause has been added, the SAT solver is invoked again and suggests another assignment, for example α ′ := { e ( x = y ) �→ true , e ( y = z ) �→ true , e ( x = z ) �→ true , e ( x � = z ) �→ false } . Decision Procedures – Propositional Encodings 13

  25. Overview by an example After the blocking clause has been added, the SAT solver is invoked again and suggests another assignment, for example α ′ := { e ( x = y ) �→ true , e ( y = z ) �→ true , e ( x = z ) �→ true , e ( x � = z ) �→ false } . The corresponding Σ -formula ˆ Th ( α ′ ) := x = y ∧ y = z ∧ x = z ∧ ¬ ( x � = z ) (3) is satisfiable, which proves that ϕ , the original formula, is satisfiable. Indeed, any assignment that satisfies ˆ Th ( α ′ ) also satisfies ϕ . Decision Procedures – Propositional Encodings 13

  26. Overview ˆ Th ( α ) α Propositional DP T - A Decision procedure SAT Solver for a conjunction of Σ-terms e ( t ) t The information flow between the two components of the decision procedure. Decision Procedures – Propositional Encodings 14

  27. Overview There are many improvements to this basic procedure. Decision Procedures – Propositional Encodings 15

  28. Overview There are many improvements to this basic procedure. One such improvement is: “Invoke the decision procedure DP T after partial assignments, rather than waiting for a full assignment.” Decision Procedures – Propositional Encodings 15

  29. Overview There are many improvements to this basic procedure. One such improvement is: “Invoke the decision procedure DP T after partial assignments, rather than waiting for a full assignment.” A contradicting partial assignment leads to a more powerful lemma t , as it blocks all assignments that extend it. Decision Procedures – Propositional Encodings 15

  30. Overview There are many improvements to this basic procedure. One such improvement is: “Invoke the decision procedure DP T after partial assignments, rather than waiting for a full assignment.” A contradicting partial assignment leads to a more powerful lemma t , as it blocks all assignments that extend it. Theory propagation: When the partial assignment is not contradictory, it can be used to derive implications that are propagated back to the SAT solver. Decision Procedures – Propositional Encodings 15

  31. Overview by an example Continuing the example above, consider the partial assignment α := { e ( x = y ) �→ true , e ( y = z ) �→ true } , (4) Decision Procedures – Propositional Encodings 16

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