the complexity of abduction for separated heap
play

The Complexity of Abduction for Separated Heap Abstractions Nikos - PowerPoint PPT Presentation

Complexity of Abduction in SL The Complexity of Abduction for Separated Heap Abstractions Nikos Gorogiannis Max Kanovich Peter OHearn Queen Mary University of London July 13th, 2011 Complexity of Abduction in SL Motivation Complexity of


  1. Complexity of Abduction in SL The Complexity of Abduction for Separated Heap Abstractions Nikos Gorogiannis Max Kanovich Peter O’Hearn Queen Mary University of London July 13th, 2011

  2. Complexity of Abduction in SL Motivation

  3. Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction.

  4. Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction. ◮ Further papers extend the analysis, apply it to other domains.

  5. Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction. ◮ Further papers extend the analysis, apply it to other domains. ◮ The published algorithms for abduction are incomplete.

  6. Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction. ◮ Further papers extend the analysis, apply it to other domains. ◮ The published algorithms for abduction are incomplete. ◮ Is there a complete algorithm? (is the problem decidable?).

  7. Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction. ◮ Further papers extend the analysis, apply it to other domains. ◮ The published algorithms for abduction are incomplete. ◮ Is there a complete algorithm? (is the problem decidable?). ◮ If yes, what is the complexity for a common abstract domain?

  8. Complexity of Abduction in SL Outline Separation Logic Abduction Results & Conclusions

  9. Complexity of Abduction in SL Separation Logic A Heap of Problems

  10. Complexity of Abduction in SL Separation Logic A Heap of Problems { ls( x , 0) ∧ ls( y , 0) } append(x,y) { ls( x , 0) }

  11. Complexity of Abduction in SL Separation Logic A Heap of Problems { ls( x , 0) ∧ ls( y , 0) } append(x,y) { ls( x , 0) } How do we prevent sharing in the precondition?

  12. Complexity of Abduction in SL Separation Logic A Heap of Problems { ls( x , 0) ∧ ls( y , 0) } append(x,y) { ls( x , 0) } How do we prevent sharing in the precondition? ◮ Reachability?   ∀ z . reach( x , z ) ⇒ ¬ reach( y , z ) ∧   ∀ w . reach( y , w ) ⇒ ¬ reach( x , w ) ∧ ls( x , 0) ∧ ls( y , 0)  

  13. Complexity of Abduction in SL Separation Logic A Heap of Problems { ls( x , 0) ∧ ls( y , 0) } append(x,y) { ls( x , 0) } How do we prevent sharing in the precondition? ◮ Reachability?   ∀ z . reach( x , z ) ⇒ ¬ reach( y , z ) ∧   ∀ w . reach( y , w ) ⇒ ¬ reach( x , w ) ∧ ls( x , 0) ∧ ls( y , 0)   ◮ Separation Logic? { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) }

  14. Complexity of Abduction in SL Separation Logic Heaps and Stars

  15. Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) }

  16. Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) } Suppose for a model, x = 1 and y = 4.

  17. Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) } Suppose for a model, x = 1 and y = 4.   1       2    h 3 0    4      5 0  

  18. Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) } Suppose for a model, x = 1 and y = 4.     1   1      h 1  2   2       3 0 − → h  3 0      4   4    h 2   5 0   5 0  

  19. Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) } Suppose for a model, x = 1 and y = 4.     1   1     satisfies ls( x , 0)  h 1  2   2       3 0 − → h  3 0      4   4 satisfies ls( y , 0)    h 2   5 0   5 0  

  20. Complexity of Abduction in SL Separation Logic Semantics

  21. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values .

  22. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values .

  23. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always.

  24. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y )

  25. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y ) ◮ ( s , h ) | = A ∧ B as usual.

  26. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y ) ◮ ( s , h ) | = A ∧ B as usual. ◮ ( s , h ) | = emp iff h = ∅ .

  27. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y ) ◮ ( s , h ) | = A ∧ B as usual. ◮ ( s , h ) | = emp iff h = ∅ . ◮ ( s , h ) | = x �→ y iff

  28. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y ) ◮ ( s , h ) | = A ∧ B as usual. ◮ ( s , h ) | = emp iff h = ∅ . ◮ ( s , h ) | = x �→ y iff ◮ s ( x ) = u , s ( y ) = v

  29. Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always. ◮ ( s , h ) | (same for � =). = x = y iff s ( x ) = s ( y ) ◮ ( s , h ) | = A ∧ B as usual. ◮ ( s , h ) | = emp iff h = ∅ . ◮ ( s , h ) | = x �→ y iff ◮ s ( x ) = u , s ( y ) = v ◮ h = { ( u , v ) } .

  30. Complexity of Abduction in SL Separation Logic More semantics

  31. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that

  32. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A

  33. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B

  34. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B ◮ h A and h B are domain-disjoint and h = h A ∪ h B .

  35. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B ◮ h A and h B are domain-disjoint and h = h A ∪ h B . ◮ ( s , h ) | = ls( x , y ) iff

  36. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B ◮ h A and h B are domain-disjoint and h = h A ∪ h B . ◮ ( s , h ) | = ls( x , y ) iff ◮ ( s , h ) | = x � = y ∧ x �→ y , or,

  37. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B ◮ h A and h B are domain-disjoint and h = h A ∪ h B . ◮ ( s , h ) | = ls( x , y ) iff ◮ ( s , h ) | = x � = y ∧ x �→ y , or, ◮ ( s , h ) | = x � = y ∧ ∃ z . ( x �→ z ∗ ls( z , y )).

  38. Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that ◮ ( s , h A ) | = A ◮ ( s , h B ) | = B ◮ h A and h B are domain-disjoint and h = h A ∪ h B . ◮ ( s , h ) | = ls( x , y ) iff ◮ ( s , h ) | = x � = y ∧ x �→ y , or, ◮ ( s , h ) | = x � = y ∧ ∃ z . ( x �→ z ∗ ls( z , y )). I.e., non-empty, acyclic list segments.

  39. Complexity of Abduction in SL Separation Logic A Bit More on the Semantics What does it mean for ( s , h ) | = A ∗ true to be true?

  40. Complexity of Abduction in SL Separation Logic A Bit More on the Semantics What does it mean for ( s , h ) | = A ∗ true to be true? That there is a heap h A ⊆ h such that ( s , h A ) | = A .

  41. Complexity of Abduction in SL Separation Logic A Bit More on the Semantics What does it mean for ( s , h ) | = A ∗ true to be true? That there is a heap h A ⊆ h such that ( s , h A ) | = A . We work with symbolic heaps , e.g.,

Recommend


More recommend