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

global escape in multiparty sessions
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Global Escape in Multiparty Sessions

Sara Capecchi

joint work with Elena Giachino & Nobuko Yoshida

Workshop on Behavioural Types

21 April 2011

slide-2
SLIDE 2

Global escape

slide-3
SLIDE 3

Global escape

unexpected condition, computational error

slide-4
SLIDE 4

Global escape

unexpected condition, computational error controlled structured interruption requested by some participant

slide-5
SLIDE 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

slide-6
SLIDE 6

Goals & Issues

slide-7
SLIDE 7

Goals & Issues

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

slide-8
SLIDE 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

slide-9
SLIDE 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

slide-10
SLIDE 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

slide-11
SLIDE 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

slide-12
SLIDE 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

slide-13
SLIDE 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

slide-14
SLIDE 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

slide-15
SLIDE 15

Coordinated Actions

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

slide-16
SLIDE 16

Coordinated Actions

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

{ [(s1, s2), { [s1, γTR, γHTR] }; { [s1, γGP, γHGP] }, γHRP] }

slide-17
SLIDE 17

Coordinated Actions

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

{ [(s1, s2), { [s1, γTR, γHTR] }; { [s1, γGP, γHGP] }, γHRP] }

Robot = try(s1, s2){try(s1){PR} catch {QR}} catch {Q′R} RobotSensor = try(s1, s2){try(s1){PRS} catch {QRS}; try(s1){P′

RS} catch {Q′RS}} catch {Q′′RS}

Press = try(s1, s2){try(s1){PP} catch {QP}} catch {Q′P} PressSensor = try(s1, s2){try(s1){PS} catch {QPS}} catch {Q′PS}

slide-18
SLIDE 18

Syntax and Semantics

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

slide-19
SLIDE 19

Syntax and Semantics

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

[Thr] Σ ⊢ try(˜

r){C[throw(˜ r)] | P} catch {Q}

−→ Σ ⊎ throw(˜

r) ⊢ try(˜ r){C | P} catch {Q}

[RThr] Σ, throw(˜

r) ⊢ try(˜ r){P} catch {Q} −→ Σ, throw(˜ r) ⊢ Q{sϕ+1/sϕ}sϕ∈˜

r (throw(˜ r′)∈Σ implies try(˜ r′)... P, ˜ r′⊆˜ r)

[ZThr] Σ ⊢ (ν˜

s)(

i Ei[try(˜

r){0} catch {Qi}])i∈1..n −→ Σ ⊢ (ν˜ s)(

i Ei)i∈1..n (throw(˜ r)Σ)

slide-20
SLIDE 20

Typing

Partial

γ

::=

p1 → p2 : k˜

S | p1 → p2 : k{li : γi}i∈I |

{ [˜

k, γ, γ]

} | γ; γ | γ γ | µt.γ | t

Global G ::=

γ; end | end

Sorts S ::= bool | . . . | G Goals:

slide-21
SLIDE 21

Typing

Partial

γ

::=

p1 → p2 : k˜

S | p1 → p2 : k{li : γi}i∈I |

{ [˜

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

slide-22
SLIDE 22

Typing

Partial

γ

::=

p1 → p2 : k˜

S | p1 → p2 : k{li : γi}i∈I |

{ [˜

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

slide-23
SLIDE 23

Conclusions

Our extension is:

slide-24
SLIDE 24

Conclusions

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

slide-25
SLIDE 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

  • f communication mismatch are enforced carrying out

fundamental properties of session types

slide-26
SLIDE 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

  • f communication mismatch are enforced carrying out

fundamental properties of session types We ensure these properties using:

slide-27
SLIDE 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

  • f communication mismatch are enforced carrying out

fundamental properties of session types We ensure these properties using: an asynchronous linguistic construct for exceptions signalling

slide-28
SLIDE 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

  • f 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