multiparty session types and their applications
play

Multiparty Session Types and their Applications - PowerPoint PPT Presentation

Multiparty Session Types and their Applications http://mrg.doc.ic.ac.uk/ Nobuko Yoshida, Rumyana Neykova Imperial College London 1 Outline Idioms for Interaction Multiparty Session Types Scribble and Applications to a Large-scale


  1. Multiparty Session Types and their Applications http://mrg.doc.ic.ac.uk/ Nobuko Yoshida, Rumyana Neykova Imperial College London 1

  2. Outline ➤ Idioms for Interaction ➤ Multiparty Session Types ➤ Scribble and Applications to a Large-scale Cyberinfrastructure ➤ Recent Results on Multiparty Session Types 2

  3. Programming languages are tools which offer frameworks of abstraction for such activities – promoting or limiting them • Imperative • Functional • Logical

  4. UNSTRUCTURED: STRUCTURED:

  5. Quicksort in pure lambda: Quicksort with combinators:

  6. Quicksort in ML:

  7. ENCODING

  8. Current: Communication is Ubiquitous ➤ The way to organise software is increasingly based on communications (Cloud Computing, many cores, message-passing parallel computation, ...) ➤ Question ➣ How to formally abstract/specify/implement/control communications? ➣ How to apply mobile processes and their type theories to real distributed applications and programming languages? 3

  9. Current: Communication is Ubiquitous ➤ The way to organise software is increasingly based on communications (Cloud Computing, many cores, message-passing parallel computation, ...) ➤ Question ⇒ Multiparty session type theory = ➣ How to formally abstract/specify/implement/control communications? ➣ How to apply mobile processes and their type theories to real distributed applications and programming languages? ⇒ large-scale cyberinfrastructure for e-Science = 4

  10. �⌦⌥ ⌃ ��⌥�/ ⇤��⇧⌥ "⌃⇧⇤⇧ ⇤⇧/⌥ � ⌫ 0◆1 ⌘��2⌥⌦⇤ 3,44⇣5# - 6⌥ �7 ⇤� �⇥⇧⌅✏ ⌦✓�⌥�⇧⌃�� ⇤�⇥⌦⇤⇥�⌥ ��� ��⌥�/⇧⌃� �⌦⌥ ⌃ ��⇥⌃✏ ◆ ⌃✏ �⌥✓�⌃✏& � ⌧⌥ ⌅⇡⇤⇧�⌥ ⌥⌃�� ✏ ⇤ ⌦�⌃⇤ ⌃⇤⌅✓ ⌦��⇧⌃� ���� ��⇤$ ���⇡$��⌥ ⌃✏ �⌃⇡$��⌥ 3⌥&�& �⇥�✓# ⇥�� �⇧⌃⌥# ⇥⌃✏⌥�⇡' ⇤⌥� ⌦ �⌥� #  ⇤⌥⌅⌅⇧⇤⌥7# ⇤� ⌃�⇧⇤⇤⌥✏ /⇧ $⇧�$⇡⌘⌥⌥✏ ⌃⌥⇤'��↵& 8

  11. �⌦⌥ ⌃ ��⌥�/ ⇤��⇧⌥ "⌃⇧⇤⇧ ⇤⇧/⌥ 9

  12. ⇢$ ⌅⌅⌥⌃�⌥ � �$⌥ ⌃⌥⌥✏ ⇤� ⌘⌥⌦⇧�✓# ⌦ ⇤ ⌅��⇥⌥# ⌘���� �# ⇧�⌘⌅⌥�⌥⌃⇤ ⌃✏ � ⌃ �⌥ �⌅ ⇥⌦↵�⇤⇥� �⌃����⌃ ↵���⌦✏� ↵⇤⇣⇥⇣⇧⇣ � & � ⇢���⇥⌃⇧⌦ ⇤⇧�⌃ ⇥� ⌃⌦⌥ ⇥ ⇢���⌥⌦⇤ �⌥ �⌥ ��✏⌥�⇧⌃� ⌃✏ ✓⌃⌦$��⌃⇧ ⇤⇧�⌃ ⇥ :⌥ ✏⌅�⌦↵⇡��⌥⌥✏��# ⌘����⌥ ⌃✏ ⌅⇧/⌥⌃⌥ ⇥ :✓⌃ �⇧⌦ �⌥ �⌥ ��⌃⇧⇤��⇧⌃� ⌃✏ �⌥⌦�/⌥�✓ ⇥ ⇠��⇧⌦ ⌅ ⌦�⌃⇤� ⇧⌃⇤ �⌃ �⌥ �⌥ / ⌅⇥⌥ � ◆$ �⌥✏ ⌃✏ ⇥⌥✏ �/⌥� ⌅�⌃�⇡⇤⌥�� ⌘⌥�⇧�✏ 3⌥&�& �4 ✓⌥ � ⇧⌃ ��"7& ;

  13. �$✓ ⇣⇥⌅⇤⇧⌘ �⇤✓ ◆⌥⇧�⌃ �✓⌘⌥+ � ⌧��⇧⌃ ⇣⇧⌅⌃⌥� 3<44<7= ⌘�↵⌃� �⇤⌃ ⇥✓⌃ ⌃�◆⌃✏ ⇣ ⇧⇣�↵⌅⇥⌃⇤ ↵⇤⇣�⇤���⌦✏�� ⇥✓⌃� ���⌃ ⌦⇥ ⌥⌦�⌃�⇥⌦⌫ ⌃ & � ⇢ ⌃ ✏⌥⌦�⇧�⌥ ⌦���⇥⌃⇧⌦ ⇤⇧�⌃ ⌘��⇤�⌦�⌅  ⇥�↵⌃� � � ⇢ ⌃ �⌥ � ⇤⌥�⇧ ⌅⇧⌥✏  ✏⌃⇠ ⇧⇣��⌅✏⌦⇧�⇥⌦⇣✏� � ↵⇤⇣�⇤���⌦✏� �✏�⌅��⌃� ⌃✏ ⇥⇣⇣ ⇧✓�⌦✏� & � ⇡⇧� �⌫ ⌃ ⇥⇤�� ⇤⇧⌦ /⌥�⇧>⌦ ⇤⇧�⌃ 3✏⌥ ✏⌅�⌦↵⇡��⌥⌥✏��#  �⌥⇤✓ ⌃✏ ⌅⇧/⌥⌃⌥7 '⇧⇤$�⇥⇤ �⇥�⇥⌃⇢�↵�⇧⌃ ⌃�↵ ⇣�⌦⇣✏ ↵⇤⇣⌫ ⌃�� 3 ↵⇣ �✏⇣�⌦� ⇥⌦�⌃ ⇧⇣�↵ ⌃�⌦⇥� 7& � ?%⇤⌥⌃✏ �⌅⌥ ⇤� ⇣�⌦⇧� ◆⌃⇤⌦⌧⇧�⇥⌦⇣✏� ⌃✏ @⌥%⇧�⌅⌥ ⌥�✏��⌦⇧ �⇣✏⌦⇥⇣⇤⌦✏� & A4

  14. :⇧ ⌅��⇥⌥ �⌥⇤'⌥⌥⌃ "⌃✏⇥⇤�✓ ⌃✏ ⌫⌦ ✏⌥�⇧ �⇧⌃ �✓ ◆⌥⇧�⌃ �✓⌘⌥ BC⌫⌧⇠D;,# ?◆�CD;9E ⇥ ⇣⇧⌅⌃⌥�# )�⌃✏ ⌃✏ 6�$⇧✏ 2�⇧⌃⌥✏ ��⇢ �◆⇡⇢:⇠ 3<44<7 ⇥ 1��� ⌅⇧ ⇤⇧�⌃ �� ��⇢ �◆⇡⇢:⇠ B?◆�CD48E ⇥ ◆⌦�⇧��⌅⌥ ⇤ �⌥⌦$⌃�⌅��✓ AA

  15. �⇥ ⇤⌅⇥⇧ ⌃⇥⌥� ⌦↵�� �✏⇣⌘✓ � ◆�

  16. ��⌅�⌥⌫⇠✏ ⇡✏⇢�✏✏ � ⌧⇠�⇢⇥⇧ ⌅ ⌧ �⇣⌅⌧✏��⌅ ⌃� ⌅⇥⇧ ✏���⌥ �⇧!✏� "↵�#$%&�' ( )↵%&*+ � ,�� ✏⇥' -⌥ ⌧⌅ ⌅ ⌧ .⌥�⌘�⌧⌅ /⌥� ✏⌧ 012 0 32�$ ⌦◆◆✓ � 4⌥⇥�⌅���⌅⇢�⌥ ⌥5 012 0 32�$ "( )↵%�+ � ⇣⇥�⇡⇡�✏ ⌅⇢ �✏⇣⌘ ⌥�⌥⌫⇧ � ,⇠�⇢�!⌅⇥⇢⇧ ✏���⌥ �⇧!✏� "↵)↵$%*+ � 61

  17. ��⌅�⌥⌫⇠✏ ⇡✏⇢�✏✏ � ⌧⇠�⇢⇥⇧ ⌅ ⌧ �⇣⌅⌧✏��⌅ ⌃� ⌅⇥⇧ ✏���⌥ �⇧!✏� "↵�#$%&�' ( )↵%&*+ � ,�� ✏⇥' -⌥ ⌧⌅ ⌅ ⌧ .⌥�⌘�⌧⌅ /⌥� ✏⌧ 012 0 32�$ ⌦◆◆✓ � 4⌥⇥�⌅���⌅⇢�⌥ ⌥5 012 0 32�$ "( )↵%�+ � ⇣⇥�⇡⇡�✏ ⌅⇢ �✏⇣⌘ ⌥�⌥⌫⇧ � ,⇠�⇢�!⌅⇥⇢⇧ ✏���⌥ �⇧!✏� "↵)↵$%*+ � 6�

  18. Session Types Overview � Properties � Communication safety (no communication mismatch) � Communication fidelity (the communication follow the protocol) � Progress (no deadlock/stuck in a session)

  19. Dynamic Monitoring [RV’13, COORDINATION’14, FMSD’15] Global Type Projection Local Type Local Type Local Type Dynamic Dynamic Dynamic Monitoring Monitoring Monitoring Program Program Program Carol Bob Alice

  20. ��������� �������� �����������

  21. Buyer: A local projection

  22. OOI agent negotiation 1/5 I https://confluence.oceanobservatories.org/display/syseng/ CIAD+COI+OV+Negotiate+Protocol 11 / 42

  23. OOI agent negotiation 2/5 type <yml> "SAPDoc1" from "SAPDoc1.yml" as SAP; global protocol Negotiate(role Consumer as C, role Producer as P) { } 12 / 42

  24. OOI agent negotiation 3/5 (choice) type <yml> "SAPDoc1" from "SAPDoc1.yml" as SAP; global protocol Negotiate(role Consumer as C, role Producer as P) { propose(SAP) from C to P; choice at P { accept() from P to C; confirm() from C to P; } or { reject() from P to C; } or { propose(SAP) from P to C; } } 13 / 42

  25. OOI agent negotiation 4/5 type <yml> "SAPDoc1" from "SAPDoc1.yml" as SAP; global protocol Negotiate(role Consumer as C, role Producer as P) { propose(SAP) from C to P; choice at P { accept() from P to C; confirm() from C to P; } or { reject() from P to C; } or { propose(SAP) from P to C; choice at C { accept() from C to P; confirm() from P to C; } or { reject() from C to P; } or { propose(SAP) from C to P; } } } 14 / 42

  26. OOI agent negotiation 5/5 (recursion) type <yml> "SAPDoc1" from "SAPDoc1.yml" as SAP; global protocol Negotiate(role Consumer as C, role Producer as P) { propose(SAP) from C to P; rec X { choice at P { accept() from P to C; confirm() from C to P; } or { reject() from P to C; } or { propose(SAP) from P to C; choice at C { accept() from C to P; confirm() from P to C; } or { reject() from C to P; } or { propose(SAP) from C to P; continue X; } } 15 / 42

  27. Local protocol projection (Negotiation Consumer) // Projection for Consumer // Global propose(SAP) to P; propose(SAP) from C to P; rec START { rec START { choice at P { choice at P { accept() from P; accept() from P to C; confirm() to P; confirm() from C to P; } or { } or { reject() from P; reject() from P to C; } or { } or { propose(SAP) from P; propose(SAP) from P to C; choice at C { choice at C { accept() to P; accept() from C to P; confirm() from P; confirm() from P to C; } or { } or { reject() to P; reject() from C to P; } or { } or { propose(SAP) to P; propose(SAP) from C to P; continue START; continue START; } } } } } } 19 / 42

  28. FSM generation (Negotiation Consumer) 20 / 42

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend