realizability in cyclic proof
play

Realizability in Cyclic Proof Extracting Ordering Information for - PowerPoint PPT Presentation

Realizability in Cyclic Proof Extracting Ordering Information for Infinite Descent 1 School of Computing, University of Kent, Canterbury, UK 2 Department of Computer Science, UCL, London, UK Reuben N. S. Rowe 1 James Brotherston 2 TABLEAUX,


  1. Realizability in Cyclic Proof Extracting Ordering Information for Infinite Descent 1 School of Computing, University of Kent, Canterbury, UK 2 Department of Computer Science, UCL, London, UK Reuben N. S. Rowe 1 James Brotherston 2 TABLEAUX, Brasília, Brazil, Tuesday 26 th September 2017

  2. Motivation: Program Termination shuffle(y); 1 } rev(y); { y x->next list y n 1 } { y x->next x->next list y n 1 } } } { list x n } list y n { y struct ll { int data; ll *next; } 1 list x n n 0 x NULL list x ->next n void rev(ll *x) ll *y = x -> next; { /* reverses list */ } void shuffle(ll *x) { list x n } { if ( x != NULL ) { { list x->next n 1 } 1/15

  3. Motivation: Program Termination rev(y); { list x n } } } 1 } list y n x->next { y shuffle(y); 1 } list y n x->next { y 1 } struct ll { int data; ll *next; } list y n x->next { y ll *y = x -> next; 1 } { list x->next n if ( x != NULL ) { { { list x n } void shuffle(ll *x) { /* reverses list */ } void rev(ll *x) 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 )

  4. Motivation: Program Termination rev(y); } 1 } list y n x->next { y shuffle(y); 1 } list y n x->next { y 1 } struct ll { int data; ll *next; } list y n x->next { y ll *y = x -> next; 1 } { list x->next n if ( x != NULL ) { { /* reverses list */ } void rev(ll *x) 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void shuffle(ll *x) { list ( x , n ) } { } { list ( x , n ) }

  5. Motivation: Program Termination x->next } 1 } list y n x->next { y shuffle(y); 1 } list y n { y struct ll { int data; ll *next; } rev(y); ll *y = x -> next; if ( x != NULL ) { { /* reverses list */ } void rev(ll *x) 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  6. Motivation: Program Termination struct ll { int data; ll *next; } } 1 } list y n x->next { y shuffle(y); 1 } list y n x->next { y rev(y); ll *y = x -> next; if ( x != NULL ) { 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void rev(ll *x) { list ( x , n ) } { . . . } { list ( x , n ) } void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  7. Motivation: Program Termination struct ll { int data; ll *next; } } 1 } list y n x->next { y shuffle(y); 1 } list y n x->next { y rev(y); ll *y = x -> next; if ( x != NULL ) { 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void rev(ll *x) { list ( x , n ) } { . . . } { list ( x , n ) } void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  8. Motivation: Program Termination struct ll { int data; ll *next; } } 1 } list y n x->next { y shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void rev(ll *x) { list ( x , n ) } { . . . } { list ( x , n ) } void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  9. Motivation: Program Termination struct ll { int data; ll *next; } } 1 } list y n x->next { y shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void rev(ll *x) { list ( x , n ) } { . . . } { list ( x , n ) } void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  10. Motivation: Program Termination struct ll { int data; ll *next; } if ( x != NULL ) { ll *y = x -> next; rev(y); shuffle(y); } 1/15 list ( x , n ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next , n − 1 ) void rev(ll *x) { list ( x , n ) } { . . . } { list ( x , n ) } void shuffle(ll *x) { list ( x , n ) } { { list ( x->next , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } { y = x->next ∧ list ( y , n − 1 ) } } { list ( x , n ) }

  11. Motivation: Program Termination struct ll { int data; ll *next; } if ( x != NULL ) { ll *y = x -> next; rev(y); shuffle(y); } 1/15 list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { { list β ( x->next ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } } { list α ( x ) }

  12. Motivation: Program Termination shuffle(y); P x Q y Q y P x struct ll { int data; ll *next; } } 1/15 rev(y); if ( x != NULL ) { ll *y = x -> next; list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { [ [ · ] ] : Formulas → ℘ ( Models ) { list β ( x->next ) ∧ β < α } [ [ · ] ] ⊥ ⊑ [ [ · ] ] 1 ⊑ . . . [ [ · ] ] α ⊑ [ [ · ] ] α + 1 ⊑ . . . ⊑ [ [ · ] ] { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } } { list α ( x ) }

  13. Motivation: Program Termination ll *y = x -> next; struct ll { int data; ll *next; } } shuffle(y); rev(y); 1/15 if ( x != NULL ) { list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { [ [ · ] ] : Formulas → ℘ ( Models ) { list β ( x->next ) ∧ β < α } [ [ · ] ] ⊥ ⊑ [ [ · ] ] 1 ⊑ . . . [ [ · ] ] α ⊑ [ [ · ] ] α + 1 ⊑ . . . ⊑ [ [ · ] ] { y = x->next ∧ list β ( y ) ∧ β < α } ∀ α . [ [ P ( ⃗ x )] ] α ⊆ [ [ Q ( ⃗ y )] ] α ≡ Q ( ⃗ y ) ≤ P ( ⃗ x ) { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } } { list α ( x ) }

  14. Motivation: Program Termination struct ll { int data; ll *next; } conditions, in the form of entailments , e.g. Intra-procedural analysis produces verification } shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { 1/15 list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { { list β ( x->next ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } { y = x->next ∧ list β ( y ) ∧ β < α } x ̸ = NULL ∧ y = x ->next ∧ list ( y ) ⊢ list ( x ) { y = x->next ∧ list β ( y ) ∧ β < α } } { list α ( x ) }

  15. Motivation: Program Termination } (Inference) (Axiom) . . struct ll { int data; ll *next; } . . . . . . 1/15 shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { { list β ( x->next ) ∧ β < α } • • · · • . . . . . • { y = x->next ∧ list β ( y ) ∧ β < α } · · • • { y = x->next ∧ list β ( y ) ∧ β < α } • · { y = x->next ∧ list β ( y ) ∧ β < α } · · . . . P ( ⃗ x ) . . . ⊢ . . . Q ( ⃗ y ) . . . } { list α ( x ) }

  16. Motivation: Program Termination } (Inference) (Axiom) . struct ll { int data; ll *next; } . . . . . . . 1/15 shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { { list β ( x->next ) ∧ β < α } • • · · • . . . . . • { y = x->next ∧ list β ( y ) ∧ β < α } · · • • Q ( ⃗ y ) ≤ ? P ( ⃗ { y = x->next ∧ list β ( y ) ∧ β < α } x ) • · { y = x->next ∧ list β ( y ) ∧ β < α } · · . . . P ( ⃗ x ) . . . ⊢ . . . Q ( ⃗ y ) . . . } { list α ( x ) }

  17. Motivation: Program Termination } (Inference) (Axiom) . struct ll { int data; ll *next; } . . . . . . . 1/15 shuffle(y); rev(y); ll *y = x -> next; if ( x != NULL ) { list ( x ) ⇔ ( n = 0 ∧ x = NULL ) ∨ list ( x ->next ) void rev(ll *x) { list α ( x ) } { . . . } { list α ( x ) } void shuffle(ll *x) { list α ( x ) } { { list β ( x->next ) ∧ β < α } • • · · • . . . . . • { y = x->next ∧ list β ( y ) ∧ β < α } · · • • Q ( ⃗ y ) < ? P ( ⃗ { y = x->next ∧ list β ( y ) ∧ β < α } x ) • · { y = x->next ∧ list β ( y ) ∧ β < α } · · . . . P ( ⃗ x ) . . . ⊢ . . . Q ( ⃗ y ) . . . } { list α ( x ) }

Recommend


More recommend