reversible event structures and controlled and
play

Reversible event structures, and Controlled and Uncontrolled - PowerPoint PPT Presentation

Reversible event structures, and Controlled and Uncontrolled Reversibility in CCSK Eva Graversen & Nobuko Yoshida April 29 1 http://mrg.doc.ic.ac.uk o p c G y R e M o b


  1. Reversible event structures, and Controlled and Uncontrolled Reversibility in CCSK Eva Graversen & Nobuko Yoshida April 29 1

  2. http://mrg.doc.ic.ac.uk 󰈧 o 󰇼 p c 󰇭 G 󰇸 󰇫 󰈝 󰈧 󰇻 y R e M o b 󰇯 󰇱 󰇰 Post-docs: Simon CASTELLAN David CASTRO Francisco FERREIR Raymond HU Rumyana NEYK Nicholas NG Alceste SCALA PhD Students: Assel ALTAYEV Juliana FRANCO Eva GRAVERSEN

  3. CC’18 7 ECOOP’16 1 ’ P O O C E

  4. POPL’17

  5. ICSE’18

  6. Selected Publications 2017/2018 [CC’18] Rumyana Neykova , Raymond Hu, NY, Fahd Abdeljallal: Session Type Providers: Compile-time API Generation for Distributed Protocols with Interaction Refinements in F#. [FoSSaCS’18] Bernardo Toninho, NY: Depending On Session Typed Process. [ESOP’18] Bernardo Toninho, NY: On Polymorphic Sessions And Functions: A Talk of Two (Fully Abstract) Encodings. [ESOP’18] Malte Viering, Tzu-Chun Chen, Patrick Eugster, Raymond Hu , Lukasz Ziarek: A Typing Discipline for Statically Verified Crash Failure Handling in Distributed Systems. [ICSE’18] Julien Lange, Nicholas Ng, Bernardo Toninho, NY : A Static Verification Framework for Message Passing in Go using Behavioural Types [ECOOP’17] Alceste Scala, Raymond Hu, Ornela Darda, NY: A Linear Decomposition of Multiparty Sessions for Safe Distributed Programming.. [COORDINATION’17] Keigo Imai, NY, 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.

  7. Selected Publications 2017/2018 [CC’18] Rumyana Neykova , Raymond Hu, NY, Fahd Abdeljallal: Session Type Providers: Compile-time API Generation for Distributed Protocols with Interaction Refinements in F#. [FoSSaCS’18] Bernardo Toninho, NY: Depending On Session Typed Process. [ESOP’18] Bernardo Toninho, NY: On Polymorphic Sessions And Functions: A Talk of Two (Fully Abstract) Encodings. [ESOP’18] Malte Viering, Tzu-Chun Chen, Patrick Eugster, Raymond Hu , Lukasz Ziarek: A Typing Discipline for Statically Verified Crash Failure Handling in Distributed Systems. [ICSE’18] Julien Lange, Nicholas Ng, Bernardo Toninho, NY : A Static Verification Framework for Message Passing in Go using Behavioural Types. [ECOOP’17] Alceste Scala, Raymond Hu, Ornela Darda, NY: A Linear Decomposition of Multiparty Sessions for Safe Distributed Programming. [COORDINATION’17] Keigo Imai, NY, 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.

  8. Motivation • Reversibility can be used for: • Modelling naturally reversible systems • Debugging • State-space exploration • Event structures have been used to define semantics for CCS, π -calculus, LOTOS, etc. in forwards-only setting. • Categorical definitions can help define choice and parallel composition. 2

  9. CCSK CCSK (Phillips et al. 06) uses keys to denote past actions and which actions they have synchronised with: b r n s τ r m s b r n s a . b ⑤ a Ý Ý Ý Ñ a r m s . b ⑤ a r m s Ý Ý Ñ a r m s . b r n s ⑤ a r m s a r m s . b ⑤ a r m s 3

  10. Forwards CCS Process as Prime Event Structure (Winskel 1982) E ✏ t a , b , b , τ ✉ t a , b , b ✉ a ➔ b a . b ⑤ b Ñ a ➔ τ Ñ t a , b ✉ t a , τ ✉ t a , b ✉ b ✼ τ τ ✼ b t a ✉ t b ✉ ❍ Process Event Structure Configurations 4

  11. Forwards-only Category Overview B a AsymmetricES ExtendedBundleES B e A I generalES PrimeES BundleES StableES B E b 5

  12. Category Overview B a AES EBES A B e I PES BES SES ES B E b P p ✪ Φ p P a ✪ P b ✪ P e ✪ Φ a Φ b Φ e P r P r B r I ReversiblePES RBES SRES RES B er E er A r RAES REBES ✪ R ✶ R ✶ C r ✪ C r ✪ B ar R C er SConfigurationSystems FinitelyEnabledCS I Previously defined Morphisms defined by us Entirely defined by us 6

  13. Outline Configuration Systems Reversible Bundle Event Structures Event structure semantics of CCSK Roll-CCSK 7

  14. Configuration Systems

  15. Configuration System A configuration system has a set of events E ✏ t a , b ✉ , a set of reversible events F ✏ t a , b ✉ , which can be undone a , b , a set C ❸ 2 E configurations of events, and a set Ñ❸ C ✂ ♣ E ❨ F q ✂ C transitions between them: t a , b ✉ a b a b t a ✉ t b ✉ b , a a a b ❍ 8

  16. Morphism Definition (Configuration system-morphism) Let ♣ E 0 , F 0 , C 0 , Ñ 0 q and ♣ E 1 , F 1 , C 1 , Ñ 1 q be configuration systems. A configuration system morphism is a partial function f : E 0 Ñ E 1 such that A ❨ B 1. for any X , Y P C 0 , A ❸ E 0 , and B ❸ F 0 , if X Ý Ý Ý Ñ 0 Y then f ♣ A q❨ f ♣ B q f ♣ X q Ý Ý Ý Ý Ý Ý Ñ 1 f ♣ Y q 2. for any X P C 0 , f ♣ X q P C 1 3. for all e 0 , e ✶ 0 P E 0 , if f ♣ e 0 q ✏ f ♣ e ✶ 0 q ✘ ❑ and e 0 ✘ e ✶ 0 then there exists no X P C 0 such that e 0 , e ✶ 0 P X 9

  17. Coproduct (Choice) t a , b ✉ t c , d ✉ t a , b ✉ t c , d ✉ t b ✉ t a ✉ t c ✉ t d ✉ t b ✉ t a ✉ t c ✉ t d ✉ ✏ � ❍ ❍ ❍ 10

  18. Partially Synchronous Product (Parallel Composition) t a , b ✉ t c ✉ ✏ t b ✉ t a ✉ ✂ ❍ ❍ t♣ a , ✝q , ♣ b , ✝q , ♣✝ , c q✉ t♣ a , c q , ♣ b , ✝q✉ t♣ b , ✝q , ♣✝ , c q✉ t♣ a , ✝q , ♣ b , ✝q✉ t♣ a , ✝q , ♣✝ , c q✉ t♣ a , ✝q , ♣ b , c q✉ t♣ a , c q✉ t♣ b , ✝q✉ t♣✝ , c q✉ t♣ a , ✝q✉ t♣ b , c q✉ ❍ 11

  19. Reversible Bundle Event Structures

  20. Reversible Bundle Event Structure t a , b ✉ t a , c ✉ E ✏ ♣ E , F , Ðß , # , ⊲ q where b c E ✏ t a , b , c ✉ , a a a b F ✏ t a , b ✉ , t b ✉ t a ✉ t c ✉ t c , b ✉ Ðß a , t a ✉ Ðß c , a b # c , b t a ✉ Ðß b , ❍ c ⊲ a 12

  21. Causal If a CS or RBES is causal, an event can be reversed if and only if every event caused by it has been reversed. In a causal CS any reachable configuration is forwards-reachable. Most reversible process calculi are causal. The previous RBES and CS were not causal. 13

  22. Causal CS and RBES t a , b ✉ E ✏ ♣ E , F , ÞÑ , ✼ , ⊲ q where E ✏ t a , b ✉ b b a F ✏ t a , b ✉ t a ✉ t b ✉ t a ✉ Ðß b , a , b b ⊲ a a a b ❍ 14

  23. Event structure semantics of CCSK

  24. CCSK CCSK uses keys to denote past actions and which actions they have synchronised with: b r n s τ r m s b r n s a . b ⑤ a Ý Ý Ý Ñ a r m s . b ⑤ a r m s Ý Ý Ñ a r m s . b r n s ⑤ a r m s a r m s . b ⑤ a r m s 15

  25. CCSK Process as Reversible Bundle Event Structure t a , a , b ✉ E ✏ t a , a , τ, b ✉ t a , τ ✉ Ðß b t a , b ✉ t τ, b ✉ t a , a ✉ a r m s . b ⑤ a r m s Ñ a ✼ τ ✼ a Ñ b ⊲ a t a ✉ t τ ✉ t a ✉ b ⊲ τ ❍ Process Event Structure Configurations 16

  26. Roll-CCSK

  27. ✶ q ⑤ ♣ ♣ ⑤ q ⑤ ✶ ♣ ⑤ ⑤ q③t ✉ Rollback Rollback (Lanese et al., 11) is a way to control when the process reverses, only letting tagged actions and actions caused by them reverse when the roll is reached: roll γ a r m s . b r n s ⑤ a γ r m s . c r o s roll γ a . b ⑤ a γ . c . roll γ 17

  28. Rollback Rollback (Lanese et al., 11) is a way to control when the process reverses, only letting tagged actions and actions caused by them reverse when the roll is reached: roll γ a r m s . b r n s ⑤ a γ r m s . c r o s roll γ a . b ⑤ a γ . c . roll γ Using this method, ♣ a γ . ♣ d . 0 ⑤ c . roll γ q ⑤ b γ ✶ . ♣ c ⑤ d . roll γ ✶ q ⑤ a ⑤ b q③t a , b , c , d ✉ is not able to roll all the way back to the beginning, as executing one roll undoes an action preceding the other. 17

  29. We split the roll into two actions, one triggering the roll, which is reversed when a previous action is rolled back, and one executing the roll: ♣ a γ r m s . ♣ d r n s . 0 ⑤ c r o s . roll γ q ⑤ b γ ✶ r p s . ♣ c r o s ⑤ d r n s . roll γ ✶ q ⑤ a r m s ⑤ b r p sq③t a , b , c , d ✉ start roll γ ♣ a γ r m s . ♣ d r n s . 0 ⑤ c r o s . rolling γ q ⑤ b γ ✶ r p s . ♣ c r o s ⑤ d r n s . roll γ ✶ q ⑤ a r m s ⑤ b r p sq③t a , b , c , d ✉ start roll γ ✶ ♣ a γ r m s . ♣ d r n s . 0 ⑤ c r o s . rolling γ q ⑤ b γ ✶ r p s . ♣ c r o s ⑤ d r n s . rolling γ ✶ q ⑤ a r m s ⑤ b r p sq③t a , b , c , d ✉ roll γ ✶ ♣ a γ r m s . ♣ d . 0 ⑤ c . rolling γ q ⑤ b γ ✶ . ♣ c ⑤ d . roll γ ✶ q ⑤ a r m s ⑤ b q③t a , b , c , d ✉ roll γ ♣ a γ . ♣ d . 0 ⑤ c . roll γ q ⑤ b γ ✶ . ♣ c ⑤ d . roll γ ✶ q ⑤ a ⑤ b q③t a , b , c , d ✉ 18

Recommend


More recommend