interpolation
play

Interpolation Seminar Slides Albert-Ludwigs-Universitt Freiburg - PowerPoint PPT Presentation

Interpolation Seminar Slides Albert-Ludwigs-Universitt Freiburg Betim Musa 27 th June 2015 Motivation program add(int a, int b) { var x,i : int; 0 assume(b 0); 1 x := a; 2 i := 0; while(i < b) { 3 x := x + 1; 4


  1. Interpolation Seminar Slides Albert-Ludwigs-Universität Freiburg Betim Musa 27 th June 2015

  2. Motivation program add(int a, int b) { var x,i : int; ℓ 0 assume(b ≥ 0); ℓ 1 x := a; ℓ 2 i := 0; while(i < b) { ℓ 3 x := x + 1; ℓ 4 i := i + 1; } assert (x == a + b); 27 th June 2015 Betim Musa – Interpolation 2 / 22

  3. Motivation program add(int a, int b) { var x,i : int; Prove correctness (CEGAR ℓ 0 assume(b ≥ 0); approach) ℓ 1 x := a; ℓ 2 i := 0; Idea: Show that all traces from while(i < b) { ℓ 0 to ℓ err are infeasible. ℓ 3 x := x + 1; ℓ 4 i := i + 1; } ℓ err assert (x != a + b); 27 th June 2015 Betim Musa – Interpolation 2 / 22

  4. Motivation program add(int a, int b) { var x,i : int; Prove correctness (CEGAR ℓ 0 assume(b ≥ 0); approach) ℓ 1 x := a; ℓ 2 i := 0; Idea: Show that all traces from while(i < b) { ℓ 0 to ℓ err are infeasible. ℓ 3 x := x + 1; 1 Choose an error trace τ . ℓ 4 i := i + 1; 2 Show that τ is infeasible. } 3 Compute interpolants for τ . ℓ err assert (x != a + b); 27 th June 2015 Betim Musa – Interpolation 2 / 22

  5. Contents A bit of history Interpolation What is an interpolant? Interpolation in Propositional Logic Interpolation in First-Order Logic Conclusion References 27 th June 2015 Betim Musa – Interpolation 3 / 22

  6. Bit of history W. Craig (1957), Linear reasoning. A new form of the Herbrand-Gentzen theorem 27 th June 2015 Betim Musa – Interpolation 4 / 22

  7. Bit of history W. Craig (1957), Linear reasoning. A new form of the Herbrand-Gentzen theorem K. L. McMillan (2003), Interpolation and SAT-Based Model Checking 27 th June 2015 Betim Musa – Interpolation 4 / 22

  8. Bit of history W. Craig (1957), Linear reasoning. A new form of the Herbrand-Gentzen theorem K. L. McMillan (2003), Interpolation and SAT-Based Model Checking A. Cimatti et al. (2007), Efficient Interpolant Generation in SMT 27 th June 2015 Betim Musa – Interpolation 4 / 22

  9. Contents A bit of history Interpolation What is an interpolant? Interpolation in Propositional Logic Interpolation in First-Order Logic Conclusion References 27 th June 2015 Betim Musa – Interpolation 5 / 22

  10. Interpolant An interpolant I for the unsatisfiable pair of formulae A , B has the following properties: 27 th June 2015 Betim Musa – Interpolation 6 / 22

  11. Interpolant An interpolant I for the unsatisfiable pair of formulae A , B has the following properties: A | = I 27 th June 2015 Betim Musa – Interpolation 6 / 22

  12. Interpolant An interpolant I for the unsatisfiable pair of formulae A , B has the following properties: A | = I I ∧ B is unsatisfiable 27 th June 2015 Betim Musa – Interpolation 6 / 22

  13. Interpolant An interpolant I for the unsatisfiable pair of formulae A , B has the following properties: A | = I I ∧ B is unsatisfiable I � A and I � B (symbol condition) 27 th June 2015 Betim Musa – Interpolation 6 / 22

  14. Contents A bit of history Interpolation What is an interpolant? Interpolation in Propositional Logic Interpolation in First-Order Logic Conclusion References 27 th June 2015 Betim Musa – Interpolation 7 / 22

  15. Interpolation in Propositional Logic Ingredients 1 a pair of unsatisfiable formulae A , B 2 a resolution proof of their unsatisfiability 27 th June 2015 Betim Musa – Interpolation 8 / 22

  16. Interpolation in Propositional Logic Resolution A B � �� � ���� Prove unsatisfiability of P ∧ ( ¬ P ∨ R ) ∧ ¬ R 27 th June 2015 Betim Musa – Interpolation 9 / 22

  17. Interpolation in Propositional Logic Resolution A B � �� � ���� Prove unsatisfiability of P ∧ ( ¬ P ∨ R ) ∧ ¬ R ( ¬ P ∨ R ) P ¬ R 27 th June 2015 Betim Musa – Interpolation 9 / 22

  18. Interpolation in Propositional Logic Resolution A B � �� � ���� Prove unsatisfiability of P ∧ ( ¬ P ∨ R ) ∧ ¬ R ( ¬ P ∨ R ) P ¬ R R 27 th June 2015 Betim Musa – Interpolation 9 / 22

  19. Interpolation in Propositional Logic Resolution A B � �� � ���� Prove unsatisfiability of P ∧ ( ¬ P ∨ R ) ∧ ¬ R ( ¬ P ∨ R ) P ¬ R R false 27 th June 2015 Betim Musa – Interpolation 9 / 22

  20. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. ... C 1 C 2 C n ¬ v v false 27 th June 2015 Betim Musa – Interpolation 10 / 22

  21. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. For every vertex v of the proof define the ... interpolant ITP ( v ) as follows: C 1 C 2 C n ¬ v v false 27 th June 2015 Betim Musa – Interpolation 10 / 22

  22. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. For every vertex v of the proof define the ... interpolant ITP ( v ) as follows: C 1 C 2 C n if v is an input node ¬ v v false 27 th June 2015 Betim Musa – Interpolation 10 / 22

  23. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. For every vertex v of the proof define the ... interpolant ITP ( v ) as follows: C 1 C 2 C n if v is an input node 1 if v ∈ A then ¬ v ITP ( v ) = global _ literals ( v ) v 2 else ITP ( v ) = true false 27 th June 2015 Betim Musa – Interpolation 10 / 22

  24. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. For every vertex v of the proof define the ... interpolant ITP ( v ) as follows: C 1 C 2 C n if v is an input node 1 if v ∈ A then ¬ v ITP ( v ) = global _ literals ( v ) v 2 else ITP ( v ) = true else v must have two predecessors v 1 , v 2 and p v is the false pivot variable. 27 th June 2015 Betim Musa – Interpolation 10 / 22

  25. Interpolation in Propositional Logic Given: unsatisfiable formulae A , B and a proof of unsatisfiability. For every vertex v of the proof define the ... interpolant ITP ( v ) as follows: C 1 C 2 C n if v is an input node 1 if v ∈ A then ¬ v ITP ( v ) = global _ literals ( v ) v 2 else ITP ( v ) = true else v must have two predecessors v 1 , v 2 and p v is the false pivot variable. 1 if p v is local to A , then ITP ( v ) = ITP ( v 1 ) ∨ ITP ( v 2 ) 2 else ITP ( v ) = ITP ( v 1 ) ∧ ITP ( v 2 ) 27 th June 2015 Betim Musa – Interpolation 10 / 22

  26. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ( ¬ P ∨ R ) P ¬ R R false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  27. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ( ¬ P ∨ R ) P ¬ R R false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  28. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ( ¬ P ∨ R ) P ¬ R R false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  29. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ITP ( ¬ R ) = TRUE ( ¬ P ∨ R ) P ¬ R R false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  30. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ITP ( ¬ R ) = TRUE ( ¬ P ∨ R ) P ¬ R ITP ( R ) = ITP ( P ) ∨ ITP ( ¬ P ∨ R ) R false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  31. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ITP ( ¬ R ) = TRUE ( ¬ P ∨ R ) P ¬ R ITP ( R ) = ITP ( P ) ∨ ITP ( ¬ P ∨ R ) R ITP ( false ) = ITP ( R ) ∧ ITP ( ¬ R ) false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  32. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ITP ( ¬ R ) = TRUE ( ¬ P ∨ R ) P ¬ R ITP ( R ) = ITP ( P ) ∨ ITP ( ¬ P ∨ R ) R ITP ( false ) = ITP ( R ) ∧ ITP ( ¬ R ) false 27 th June 2015 Betim Musa – Interpolation 11 / 22

  33. Interpolation in Propositional Logic Example A B � �� � ���� Formula: P ∧ ( ¬ P ∨ R ) ∧ ¬ R ITP ( P ) = FALSE ITP ( ¬ P ∨ R ) = R ITP ( ¬ R ) = TRUE ( ¬ P ∨ R ) P ¬ R ITP ( R ) = ITP ( P ) ∨ ITP ( ¬ P ∨ R ) R ITP ( false ) = ITP ( R ) ∧ ITP ( ¬ R ) false The resulting interpolant: ITP ( false ) = ( FALSE ∨ R ) ∧ TRUE = R 27 th June 2015 Betim Musa – Interpolation 11 / 22

  34. Contents A bit of history Interpolation What is an interpolant? Interpolation in Propositional Logic Interpolation in First-Order Logic Conclusion References 27 th June 2015 Betim Musa – Interpolation 12 / 22

  35. Interpolation in First-Order Logic Overview Interesting theories in practice 27 th June 2015 Betim Musa – Interpolation 13 / 22

  36. Interpolation in First-Order Logic Overview Interesting theories in practice Linear Integer Arithmetic Presburger Arithmetic Equality Theory with Uninterpreted Functions Theory of Arrays Theory of Lists 27 th June 2015 Betim Musa – Interpolation 13 / 22

Recommend


More recommend