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
Complexity of Abduction in SL Motivation
Complexity of Abduction in SL Motivation ◮ Calcagno, Distefano, O’Hearn, Yang propose (POPL’09) Compositional shape analysis by means of bi-abduction.
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.
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.
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?).
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?
Complexity of Abduction in SL Outline Separation Logic Abduction Results & Conclusions
Complexity of Abduction in SL Separation Logic A Heap of Problems
Complexity of Abduction in SL Separation Logic A Heap of Problems { ls( x , 0) ∧ ls( y , 0) } append(x,y) { ls( x , 0) }
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?
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)
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) }
Complexity of Abduction in SL Separation Logic Heaps and Stars
Complexity of Abduction in SL Separation Logic Heaps and Stars { ls( x , 0) ∗ ls( y , 0) } append(x,y) { ls( x , 0) }
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.
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
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
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
Complexity of Abduction in SL Separation Logic Semantics
Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values .
Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values .
Complexity of Abduction in SL Separation Logic Semantics ◮ Stack s : Var → Values . ◮ Heap h : Addresses → f Values . ◮ ( s , h ) | = true always.
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 )
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.
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 = ∅ .
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
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
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 ) } .
Complexity of Abduction in SL Separation Logic More semantics
Complexity of Abduction in SL Separation Logic More semantics ◮ ( s , h ) | = A ∗ B iff there are h A , h B such that
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
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
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 .
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
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,
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 )).
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.
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?
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 .
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