Us ∈ M obility R esearch G roup http://mrg.doc.ic.ac.uk/
www.scribble.org
Online tool : http://scribble.doc.ic.ac.uk/
End-to-End Switching Programme by DCC
End-to-End Switching Programme by DCC
Interactions with Industries
Interactions with Industries
Selected Publications 2016/2017 • [ECOOP’17] Alceste Scala, Raymond Hu, Ornela Darda, NY: A Linear Decomposition of Multiparty Sessions for Safe Distributed Programming.. • [COORDINATION’17] Keigo Imai, NY and Shoji Yuen: Session-ocaml: a session-based library with polarities and lenses. • [FoSSaCS’17] Julien Lange , NY: On the Undecidability of Asynchronous Session Subtyping. • [FASE’17] Raymond Hu , NY: Explicit Connection Actions in Multiparty Session Types. • [CC’17] Rumyana Neykova , NY: Let It Recover: Multiparty Protocol-Induced Recovery. • [POPL’17] Julien Lange , Nicholas Ng , Bernardo Toninho , NY: Fencing off Go: Liveness and Safety for Channel-based Programming. • [FPL’16] Xinyu Niu , Nicholas Ng , Tomofumi Yuki , Shaojun Wang , NY, Wayne Luk : EURECA Compilation: Automatic Optimisation of Cycle-Reconfigurable Circuits. • [ECOOP’16] Alceste Scala, NY: Lightweight Session Programming in Scala • [CC’16] Nicholas Ng, NY: Static Deadlock Detection for Concurrent Go by Global Session Graph Synthesis. • [FASE’16] Raymond Hu, NY: Hybrid Session Verification through Endpoint API Generation. • [TACAS’16] Julien Lange, NY: Characteristic Formulae for Session Types. • [ESOP’16] Dimitrios Kouzapas, Jorge A. Pérez, NY: On the Relative Expressiveness of Higher-Order Session Processes. • [POPL’16] Dominic Orchard, NY: Effects as sessions, sessions as effects .
Selected Publications 2016/2017 • [ECOOP’17] Alceste Scala, Raymond Hu, Ornela Darda, NY :A Linear Decomposition of Multiparty Sessions for Safe Distributed Programming. • [COORDINATION’17] Keigo Imai, NY and Shoji Yuen: Session-ocaml: a session- based library with polarities and lenses. • [FoSSaCS’17] Julien Lange , NY : On the Undecidability of Asynchronous Session Subtyping. • [FASE’17] Raymond Hu , NY : Explicit Connection Actions in Multiparty Session Types. • [CC’17] Rumyana Neykova , NY: Let It Recover: Multiparty Protocol-Induced Recovery. • [POPL’17] Julien Lange , Nicholas Ng , Bernardo Toninho , NY: Fencing off Go: Liveness and Safety for Channel-based Programming. • [FPL’16] Xinyu Niu , Nicholas Ng , Tomofumi Yuki , Shaojun Wang , NY, Wayne Luk: EURECA Compilation: Automatic Optimisation of Cycle-Reconfigurable Circuits. • [ECOOP’16] Alceste Scala, NY: Lightweight Session Programming in Scala • [CC’16] Nicholas Ng, NY: Static Deadlock Detection for Concurrent Go by Global Session Graph Synthesis. • [FASE’16] Raymond Hu, NY: Hybrid Session Verification through Endpoint API Generation. • [TACAS’16] Julien Lange, NY: Characteristic Formulae for Session Types. • [ESOP’16] Dimitrios Kouzapas, Jorge A. Pérez, NY: On the Relative Expressiveness of Higher-Order Session Processes. • [POPL’16] Dominic Orchard, NY: Effects as Sessions, Sessions as Effects .
Verification framework for Go Overview (2) Model (3) Termina- Address type and Check safety and process gap checking tion checking liveness Pass to termination Create input model Transform and verify prover and formula Behavioural types (1) Type inference SSA IR Go source code Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go func main() { ch, done := make(chan int), make(chan int) go send(ch) // Spawn as goroutine. go func() { for i := 0; i < 2; i++ { print("Working...") } }() go recv(ch, done) go recv(ch, done) // Who is ch receiving from? print("Done:", <-done, <-done) // 2 receivers, 2 replies } func send(ch chan int) { ch <- 1 } // Send to channel. func recv(in, out chan int) { out <- <-in } // Fwd in to out. Send/receive blocks goroutines if channel full/empty resp. Close a channel close(ch) Guarded choice select { case <-ch:; case <-ch2: } Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go Deadlock detection func main() { ch, done := make(chan int), make(chan int) go send(ch) // Spawn as goroutine. go func() { for i := 0; i < 2; i++ { print("Working...") } }() go recv(ch, done) go recv(ch, done) // Who is ch receiving from? print("Done:", <-done, <-done) // 2 receivers, 2 replies } func send(ch chan int) { ch <- 1 } // Send to channel. func recv(in, out chan int) { out <- <-in } // Fwd in to out. Run program: $ go run main.go fatal error: all goroutines are asleep - deadlock! Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go Deadlock detection func main() { ch, done := make(chan int), make(chan int) go send(ch) // Spawn as goroutine. go func() { for i := 0; ; i++ { // infinite loop Change to infinite print("Working...") } }() go recv(ch, done) go recv(ch, done) // Who is ch receiving from? print("Done:", <-done, <-done) // 2 receivers, 2 replies } func send(ch chan int) { ch <- 1 } // Send to channel. func recv(in, out chan int) { out <- <-in } // Fwd in to out. Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go Deadlock detection func main() { ch, done := make(chan int), make(chan int) go send(ch) // Spawn as goroutine. go func() { for i := 0; ; i++ { // infinite loop Change to infinite print("Working...") } }() go recv(ch, done) go recv(ch, done) // Who is ch receiving from? print("Done:", <-done, <-done) // 2 receivers, 2 replies } func send(ch chan int) { ch <- 1 } // Send to channel. func recv(in, out chan int) { out <- <-in } // Fwd in to out. Deadlock NOT detected (some goroutines are running) Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go Deadlock detection Go has a runtime deadlock detector, panics (crash) if deadlock Deadlock if all goroutines are blocked Some packages (e.g. net for networking) disables it import _ "net" // Load "net" package Add benign import func main() { ch := make(chan int) send(ch) print(<-ch) } func send(ch chan int) { ch <- 1 } Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Concurrency in Go Deadlock detection Go has a runtime deadlock detector, panics (crash) if deadlock Deadlock if all goroutines are blocked Some packages (e.g. net for networking) disables it import _ "net" // Load "net" package Add benign import func main() { ch := make(chan int) send(ch) print(<-ch) } func send(ch chan int) { ch <- 1 } Deadlock NOT detected Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I | if e then P else Q Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I | if e then P else Q | newchan( y : σ ); P Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I | if e then P else Q | newchan( y : σ ); P | P | Q | 0 | ( ν c ) P Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I | if e then P else Q | newchan( y : σ ); P | P | Q | 0 | ( ν c ) P | X h ˜ e , ˜ u i D := X (˜ x ) = P := P { D i } i ∈ I in P Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Go Programs as Processes Go Program P , Q := π ; P π := u ! h e i | u ?( y ) | τ | close u ; P | select { π i ; P i } i ∈ I | if e then P else Q | newchan( y : σ ); P | P | Q | 0 | ( ν c ) P | X h ˜ e , ˜ u i D := X (˜ x ) = P := P { D i } i ∈ I in P Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Abstracting Go with Behavioural Types Types := u | u | τ α := T , S α ; T | T � S | N { α i ; T i } i ∈ I | ( T | S ) | 0 | ( new a ) T | close u ; T | t h ˜ u i := T { t (˜ y i ) = T i } i ∈ I in S Types of a CCS-like process calculus Abstracts Go concurrency primitives Send/Recv, new (channel), parallel composition (spawn) Go-specific: Close channel, Select (guarded choice) Nobuko Yoshida mrg.doc.ic.ac.uk Open Problems of Session Types
Recommend
More recommend