global escape in multiparty sessions
play

Global Escape in Multiparty Sessions Sara Capecchi joint work with - PowerPoint PPT Presentation

Global Escape in Multiparty Sessions Sara Capecchi joint work with Elena Giachino & Nobuko Yoshida Workshop on Behavioural Types 21 April 2011 Global escape Global escape unexpected condition, computational error Global escape unexpected


  1. Global Escape in Multiparty Sessions Sara Capecchi joint work with Elena Giachino & Nobuko Yoshida Workshop on Behavioural Types 21 April 2011

  2. Global escape

  3. Global escape unexpected condition, computational error

  4. Global escape unexpected condition, computational error controlled structured interruption requested by some participant

  5. Global escape unexpected condition, computational error controlled structured interruption requested by some participant Interactional exceptions (Structured Interactional Exceptions for Session Types. Carbone, Honda, Yoshida. CONCUR’08) not only local but also coordinated actions among communicating peers: exception affects a collection of parallel processes and an escape needs to move into another dialogue in a concerted manner

  6. Goals & Issues

  7. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions;

  8. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions; preserve multiparty session properties: Subject Reduction Communication Safety Session Fidelity Progress

  9. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions; preserve multiparty session properties: Subject Reduction Communication Safety Session Fidelity Progress how to model

  10. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions; preserve multiparty session properties: Subject Reduction Communication Safety Session Fidelity Progress how to model concurrent exceptions

  11. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions; preserve multiparty session properties: Subject Reduction Communication Safety Session Fidelity Progress how to model concurrent exceptions asyncronous notification to multiple partners

  12. Goals & Issues extension of multiparty sessions to flexible exception handling: asynchronous escape at any desired point of a conversation, including nested exceptions; preserve multiparty session properties: Subject Reduction Communication Safety Session Fidelity Progress how to model concurrent exceptions asyncronous notification to multiple partners nested exceptions

  13. Coordinated Actions Model From Coordinated Exception handling- Romanovsky et al. Fault tolerance needs error isolation to define exactly which part of the system to recover, and to prevent errors from unlimited propagation. One way to control complexity is to restrict interaction and communication : exception contexts are defined as regions in which the same exceptions are treated in the same way

  14. Coordinated Actions Model From Coordinated Exception handling- Romanovsky et al. Fault tolerance needs error isolation to define exactly which part of the system to recover, and to prevent errors from unlimited propagation. One way to control complexity is to restrict interaction and communication : exception contexts are defined as regions in which the same exceptions are treated in the same way Atomic actions The activity of a group of components constituites an atomic action if there are no interactions between that group and the rest of the systems for the duration of the activity

  15. Coordinated Actions enclosing action: remove plate Robot turn Robot Sensor robot & extend grab plate arm from press Press Press Sensor

  16. Coordinated Actions enclosing action: remove plate Robot turn Robot Sensor robot & extend grab plate arm from press Press Press Sensor [( s 1 , s 2 ) , { [ s 1 , γ TR , γ HTR ] } ; { [ s 1 , γ GP , γ HGP ] } , γ HRP ] { }

  17. Coordinated Actions enclosing action: remove plate Robot turn Robot Sensor robot & extend grab plate arm from press Press Press Sensor [( s 1 , s 2 ) , { [ s 1 , γ TR , γ HTR ] } ; { [ s 1 , γ GP , γ HGP ] } , γ HRP ] { } Robot = try ( s 1 , s 2 ) { try ( s 1 ) { P R } catch { Q R }} catch { Q ′ R } RobotSensor = try ( s 1 , s 2 ) { try ( s 1 ) { P RS } catch { Q RS } ; try ( s 1 ) { P ′ RS } catch { Q ′ RS }} catch { Q ′′ RS } Press = try ( s 1 , s 2 ) { try ( s 1 ) { P P } catch { Q P }} catch { Q ′ P } PressSensor = try ( s 1 , s 2 ) { try ( s 1 ) { P S } catch { Q PS }} catch { Q ′ PS }

  18. Syntax and Semantics | if e then P else P Conditional a [ 2 .. n ](˜ s ) . P P , Q ::= Multicast Request | P | P Parallel a [ p ](˜ s ) . P | Accept | P ; P Sequencing r ! � ˜ | e � Output | 0 Inaction r ?(˜ x ) . P | Input | ( ν n ) P Hiding | r ⊳ l . P Select | def D in P Recursion r ⊲ { l i : P i } i ∈ I Branch | X � ˜ e ˜ | s � Process call try (˜ r ) { P } catch { P } Try-Catch | | s : L Named queue throw (˜ r ) Throw |

  19. Syntax and Semantics | if e then P else P Conditional a [ 2 .. n ](˜ s ) . P P , Q ::= Multicast Request | P | P Parallel a [ p ](˜ s ) . P | Accept | P ; P Sequencing r ! � ˜ | e � Output | 0 Inaction r ?(˜ x ) . P | Input | ( ν n ) P Hiding | r ⊳ l . P Select | def D in P Recursion r ⊲ { l i : P i } i ∈ I Branch | X � ˜ e ˜ | s � Process call try (˜ r ) { P } catch { P } Try-Catch | | s : L Named queue throw (˜ r ) Throw | [ Thr ] Σ ⊢ try (˜ r ) {C [ throw (˜ r )] | P } catch { Q } −→ Σ ⊎ throw (˜ r ) ⊢ try (˜ r ) {C | P } catch { Q } [ RThr ] r ) ⊢ Q { s ϕ + 1 / s ϕ } s ϕ ∈ ˜ Σ , throw (˜ r ) ⊢ try (˜ r ) { P } catch { Q } −→ Σ , throw (˜ r r ′ ) ∈ Σ implies try (˜ r ′ ) ... � P , ˜ r ′ ⊆ ˜ ( throw (˜ r ) [ ZThr ] Σ ⊢ ( ν ˜ s )( � i E i [ try (˜ r ) { 0 } catch { Q i } ]) i ∈ 1 .. n −→ Σ ⊢ ( ν ˜ s )( � i E i ) i ∈ 1 .. n ( throw (˜ r ) � Σ)

  20. Typing p 1 → p 2 : k � ˜ S � | p 1 → p 2 : k { l i : γ i } i ∈ I | Partial γ ::= [˜ k , γ, γ ] } | γ ; γ | γ � γ | µ t .γ | t { Global G ::= γ ; end | end Sorts S ::= bool | . . . | � G � Goals:

  21. Typing p 1 → p 2 : k � ˜ S � | p 1 → p 2 : k { l i : γ i } i ∈ I | Partial γ ::= [˜ k , γ, γ ] } | γ ; γ | γ � γ | µ t .γ | t { Global G ::= γ ; end | end Sorts S ::= bool | . . . | � G � Goals: to check that the enclosed try-catch block is listening on a smaller set of channels: independence of the components w.r.t. exceptions

  22. Typing p 1 → p 2 : k � ˜ S � | p 1 → p 2 : k { l i : γ i } i ∈ I | Partial γ ::= [˜ k , γ, γ ] } | γ ; γ | γ � γ | µ t .γ | t { Global G ::= γ ; end | end Sorts S ::= bool | . . . | � G � Goals: to check that the enclosed try-catch block is listening on a smaller set of channels: independence of the components w.r.t. exceptions to check that no session request or accept occurs inside a try-catch block

  23. Conclusions Our extension is:

  24. Conclusions Our extension is: consistent: despite asynchrony and nesting of exceptions, communications in default and exception handling conversations do not mix

  25. Conclusions Our extension is: consistent: despite asynchrony and nesting of exceptions, communications in default and exception handling conversations do not mix safe: linearity of communications inside sessions and absence of communication mismatch are enforced carrying out fundamental properties of session types

  26. Conclusions Our extension is: consistent: despite asynchrony and nesting of exceptions, communications in default and exception handling conversations do not mix safe: linearity of communications inside sessions and absence of communication mismatch are enforced carrying out fundamental properties of session types We ensure these properties using:

  27. Conclusions Our extension is: consistent: despite asynchrony and nesting of exceptions, communications in default and exception handling conversations do not mix safe: linearity of communications inside sessions and absence of communication mismatch are enforced carrying out fundamental properties of session types We ensure these properties using: an asynchronous linguistic construct for exceptions signalling

  28. Conclusions Our extension is: consistent: despite asynchrony and nesting of exceptions, communications in default and exception handling conversations do not mix safe: linearity of communications inside sessions and absence of communication mismatch are enforced carrying out fundamental properties of session types We ensure these properties using: an asynchronous linguistic construct for exceptions signalling multi-level queues

Recommend


More recommend