Event structures for the reversible early internal -calculus Eva - - PowerPoint PPT Presentation

event structures for the reversible early internal
SMART_READER_LITE
LIVE PREVIEW

Event structures for the reversible early internal -calculus Eva - - PowerPoint PPT Presentation

Event structures for the reversible early internal -calculus Eva Graversen , Iain Phillips, and Nobuko Yoshida Imperial College London 9th of June 2020 1 Background Process calculi describe concurrent processes. RCCS (Danos and


slide-1
SLIDE 1

Event structures for the reversible early internal π-calculus

Eva Graversen, Iain Phillips, and Nobuko Yoshida Imperial College London 9th of June 2020

1

slide-2
SLIDE 2

Background

  • Process calculi describe concurrent processes.
  • RCCS (Danos and Krivine, 04) was the first reversible process
  • calculus. It stored memories in stacks separate from processes

(dynamic reversibility).

  • CCSK (Phillips and Ulidowski, 06) used keys to denote past

actions in CCS while maintaining the structure of the process (static reversibility).

  • Extrusion histories containing past outputs of bound names

and inputs of free names have been used to define stable non-interleaving early operational semantics of π-calculus (Hildebrandt et al., 17).

2

slide-3
SLIDE 3

Background

  • Event structures have been used to define semantics for CCS,

π-calculus, LOTOS, etc. in forwards-only setting.

  • Event structures provide true concurrency semantics, which

describe the causal relationships between actions.

  • Existing true concurrency semantics of reversible process

calculi (Cristescu et al., 15, Aubert and Cristescu, 15) needed to reverse all past actions before mapping to their model of true concurrency.

3

slide-4
SLIDE 4

Motivation

  • Currently existing reversible π-calculus semantics are either

late (Cristescu et al., 13, Medic et al., 18) or reduction semantics (Lanese et al., 10, Tiezzi and Yoshida, 10).

  • This is despite early semantics being more common than late

in forward-only π-calculi.

  • Reduction semantics are unlabelled, late and early are labelled.
  • Early semantics lets the process receive existing free names

from the environment, late do not.

  • Using early semantics gives us some non-structural causation,

e.g. if a♣xq ⑤ ♣ν bqa♣bq receives b after sending b.

4

slide-5
SLIDE 5

Motivation

  • πI-calculus is a variant of π-calculus where output names are

bound.

  • πI-calculus avoids most of the non-structural causation of the

π-calculus, including situations like ♣νxq♣a ①x② ⑤ b ①x② ⑤ x♣yqq.

  • We want true concurrency semantics of a dynamically

reversible early πI-calculus, and we use denotational event structure semantics.

  • We go through a statically reversible early πI-calculus.

5

slide-6
SLIDE 6

πIH-calculus

slide-7
SLIDE 7

πIH-calculus

Hildebrandt et al. defined stable non-interleaving early operational semantics for the π-calculus using extrusion histories. We extend the histories to contain enough information to reverse. a♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqq ⑤ ♣νcq ♣a ①c②q

a①c②

Ý Ý Ñ a♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqq ⑤0

a♣cq

Ý Ý Ñ ♣♣νbq ♣c ①b②q ⑤c♣yqq ⑤0

τ

Ý Ñ ♣νbq ♣0⑤0q ⑤0

6

slide-8
SLIDE 8

πIH-calculus

Hildebrandt et al. defined stable non-interleaving early operational semantics for the π-calculus using extrusion histories. We extend the histories to contain enough information to reverse.

♣❍, ❍q ✩a♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqq ⑤ ♣νcq ♣a ①c②q

a①c②

Ý Ý Ý Ý Ý Ý Ñ

1ra①c②sr0s

♣t♣c, 1ra ①c②sr0sq✉q ✩a♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqq ⑤0

a♣cq

Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ñ

0ra♣xq.♣♣νbq♣x①b②q⑤x♣yqqsr♣♣νbq♣c①b②q⑤c♣yqqs

✄ t♣c, 1ra ①c②sr0sq✉, t♣c, 0ra♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqqsr♣♣νbq ♣c ①b②q ⑤c♣yqqsq✉ ☛ ✩♣♣νbq ♣c ①b②q ⑤c♣yqq ⑤0

τ

Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ñ

0①0r♣c①b②qsr0s,1rc♣yqsr0s②

✄ t♣c, 1ra ①c②sr0sq✉, t♣c, 0ra♣xq. ♣♣νbq ♣x ①b②q ⑤x♣yqqsr♣♣νbq ♣c ①b②q ⑤c♣yqqsq✉ ☛ ✩♣νbq ♣0⑤0q ⑤0

6

slide-9
SLIDE 9

πIH-calculus

Hildebrandt et al. defined stable non-interleaving early operational semantics for the π-calculus using extrusion histories. We extend the histories to contain enough information to reverse.

♣❍, ❍, ❍q ✩a♣xq. ♣x♣bq⑤x♣yqq ⑤a♣cq

a♣cq

Ý Ý Ý Ý Ý Ý Ñ

1ra♣cqsr0s

♣t♣a♣cq, 1ra♣cqsr0sq✉, ❍, ❍q ✩a♣xq. ♣x♣bq⑤x♣yqq ⑤0

a♣cq

Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ñ

0ra♣xq.♣x♣bq⑤x♣yqqsr♣c♣bq⑤c♣yqqs

✄ t♣a♣cq, 1ra♣cqsr0sq✉, t♣a♣cq, 0ra♣xq. ♣x♣bq⑤x♣yqqsr♣c♣bq⑤c♣yqqsq✉, ❍ ☛ ✩♣c♣bq⑤c♣yqq ⑤0

τ

Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ñ

0①0rc♣bqsr0s,1rc♣yqsr0s②

☎ ✝ ✆ t♣a♣cq, 1ra♣cqsr0sq✉, t♣a♣cq, 0ra♣xq. ♣x♣bq⑤x♣yqqsr♣c♣bq⑤c♣yqqsq✉, t♣♣c♣bq, c♣bqq , 0 ①0rc♣bqsr0s, 1rc♣yqsr0s②q✉ ☞ ✍ ✌✩♣νbq ♣0⑤0q ⑤0 6

slide-10
SLIDE 10

From πIH to Event Structures

Our Approach πIH πIK Event Structure Existing Approach Process with past actions Standard process Truely concurrect structure Truely concurrent structure with current state E Denotational semantics Reverse all actions Denotational semantics Redo actions

7

slide-11
SLIDE 11

πIK-calculus

CCSK uses keys to denote past actions and which actions they have synchronised with. (Medic et al., 18) used keys to denote past actions in π-calculus, but due to only dealing with πI-calculus, our semantics are simpler. a♣bq.b♣cq ⑤ a♣xq.x♣yq

a♣bqrn1s

Ý Ý Ý Ý Ý Ñ a♣bqrn1s.b♣cq ⑤ a♣xq.x♣yq

a♣bqrn2s

Ý Ý Ý Ý Ý Ñ a♣bqrn1s.b♣cq ⑤ a♣bqrn2s.brn2s♣yq

τrn3s

Ý Ý Ý Ñ ♣ν cq♣a♣bqrn1s.b♣cqrn3s ⑤ a♣bqrn2s.brn2s♣cqrn3sq

8

slide-12
SLIDE 12

Operational Correspondence

We can construct a πIK process from a πIH process:

  • Use locations as keys
  • Use a second copy of the location to determine where the

action originated

  • Iteratively add actions from the extrusion history back onto

the process

  • Keep another copy of the process where the actions are

instead reversed

  • Use the state of the locations in the second process to

determine which extrusions should be added to the process next.

9

slide-13
SLIDE 13

We want to find the πIK process corresponding to ♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉q ✩a♣xq ⑤ 0 with locations u0 ✏ rb♣yq.y♣xqsra♣xqs, u1 ✏ rb♣aqsr0s, and u2 ✏ rb♣cq.♣b♣yq.y♣xq ⑤ b♣aqsrb♣yq.y♣xq ⑤ b♣aqs. We perform E♣lcopy♣♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉qq ✩ a♣xq ⑤ 0, a♣xq ⑤ 0q ♣♣t♣ ♣ q q✉ ❍ ❍q ✩ ⑤ ♣ q ♣ q ⑤ ♣ qq ✏ ♣♣❍ t♣ ♣ q ① ②q✉ ❍q ✩ ♣ q ♣ qq ✏ ♣♣t♣ ♣ q ① ②q✉ ❍ ❍q ✩ q ✏ ♣♣❍ ❍ ❍q ✩ ♣ qr① ②s ♣ ♣ q ♣ q r① ②s q ♣ q ♣ qq ✏ ♣ qr① ②s

r① ②s♣ q

✏ ♣ qr① ②s ♣♣t♣ ♣ q q✉ ❍ ❍q ✩ ⑤ ♣ q ♣ q ⑤ ♣ qq ✏ ♣ qr s ♣ ♣ qr① ②s

r① ②s♣ q ⑤

♣ qr① ②s q

10

slide-14
SLIDE 14

We want to find the πIK process corresponding to ♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉q ✩a♣xq ⑤ 0 with locations u0 ✏ rb♣yq.y♣xqsra♣xqs, u1 ✏ rb♣aqsr0s, and u2 ✏ rb♣cq.♣b♣yq.y♣xq ⑤ b♣aqsrb♣yq.y♣xq ⑤ b♣aqs. We perform E♣lcopy♣♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉qq ✩ a♣xq ⑤ 0, a♣xq ⑤ 0q E♣♣t♣b♣cq, u2, u2q✉, ❍, ❍q ✩P0 ⑤ P1, b♣yq.y♣xq ⑤ b♣aqq where P0 ✏ E♣♣❍, t♣b♣aq, u0, ①0u0, 1u1②q✉, ❍q ✩a♣xq, a♣xqq and P1 ✏ E♣♣t♣b♣aq, u1, ①0u0, 1u1②q✉, ❍, ❍q ✩0, 0q ✏ ♣♣❍ ❍ ❍q ✩ ♣ qr① ②s ♣ ♣ q ♣ q r① ②s q ♣ q ♣ qq ✏ ♣ qr① ②s

r① ②s♣ q

✏ ♣ qr① ②s ♣♣t♣ ♣ q q✉ ❍ ❍q ✩ ⑤ ♣ q ♣ q ⑤ ♣ qq ✏ ♣ qr s ♣ ♣ qr① ②s

r① ②s♣ q ⑤

♣ qr① ②s q

10

slide-15
SLIDE 15

We want to find the πIK process corresponding to ♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉q ✩a♣xq ⑤ 0 with locations u0 ✏ rb♣yq.y♣xqsra♣xqs, u1 ✏ rb♣aqsr0s, and u2 ✏ rb♣cq.♣b♣yq.y♣xq ⑤ b♣aqsrb♣yq.y♣xq ⑤ b♣aqs. We perform E♣lcopy♣♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉qq ✩ a♣xq ⑤ 0, a♣xq ⑤ 0q E♣♣t♣b♣cq, u2, u2q✉, ❍, ❍q ✩P0 ⑤ P1, b♣yq.y♣xq ⑤ b♣aqq where P0 ✏ E♣♣❍, t♣b♣aq, u0, ①0u0, 1u1②q✉, ❍q ✩a♣xq, a♣xqq and P1 ✏ E♣♣t♣b♣aq, u1, ①0u0, 1u1②q✉, ❍, ❍q ✩0, 0q P0 ✏ E♣♣❍, ❍, ❍q ✩ b♣aqr①0u0, 1u1②s.S♣a♣xq, y♣xq, r①0u0, 1u1②s, yq, b♣yq.y♣xqq P0 ✏ b♣aqr①0u0, 1u1②s.ar①0u0,1u1②s♣xq ✏ ♣ qr① ②s ♣♣t♣ ♣ q q✉ ❍ ❍q ✩ ⑤ ♣ q ♣ q ⑤ ♣ qq ✏ ♣ qr s ♣ ♣ qr① ②s

r① ②s♣ q ⑤

♣ qr① ②s q

10

slide-16
SLIDE 16

We want to find the πIK process corresponding to ♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉q ✩a♣xq ⑤ 0 with locations u0 ✏ rb♣yq.y♣xqsra♣xqs, u1 ✏ rb♣aqsr0s, and u2 ✏ rb♣cq.♣b♣yq.y♣xq ⑤ b♣aqsrb♣yq.y♣xq ⑤ b♣aqs. We perform E♣lcopy♣♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉qq ✩ a♣xq ⑤ 0, a♣xq ⑤ 0q E♣♣t♣b♣cq, u2, u2q✉, ❍, ❍q ✩P0 ⑤ P1, b♣yq.y♣xq ⑤ b♣aqq where P0 ✏ E♣♣❍, t♣b♣aq, u0, ①0u0, 1u1②q✉, ❍q ✩a♣xq, a♣xqq and P1 ✏ E♣♣t♣b♣aq, u1, ①0u0, 1u1②q✉, ❍, ❍q ✩0, 0q P0 ✏ E♣♣❍, ❍, ❍q ✩ b♣aqr①0u0, 1u1②s.S♣a♣xq, y♣xq, r①0u0, 1u1②s, yq, b♣yq.y♣xqq P0 ✏ b♣aqr①0u0, 1u1②s.ar①0u0,1u1②s♣xq P1 ✏ b♣aqr①0u0, 1u1②s.0 ♣♣t♣ ♣ q q✉ ❍ ❍q ✩ ⑤ ♣ q ♣ q ⑤ ♣ qq ✏ ♣ qr s ♣ ♣ qr① ②s

r① ②s♣ q ⑤

♣ qr① ②s q

10

slide-17
SLIDE 17

We want to find the πIK process corresponding to ♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉q ✩a♣xq ⑤ 0 with locations u0 ✏ rb♣yq.y♣xqsra♣xqs, u1 ✏ rb♣aqsr0s, and u2 ✏ rb♣cq.♣b♣yq.y♣xq ⑤ b♣aqsrb♣yq.y♣xq ⑤ b♣aqs. We perform E♣lcopy♣♣t♣b♣cq, u2q✉, ❍, t♣b♣aq, b♣aq, ①0u0, 1u1②q✉qq ✩ a♣xq ⑤ 0, a♣xq ⑤ 0q E♣♣t♣b♣cq, u2, u2q✉, ❍, ❍q ✩P0 ⑤ P1, b♣yq.y♣xq ⑤ b♣aqq where P0 ✏ E♣♣❍, t♣b♣aq, u0, ①0u0, 1u1②q✉, ❍q ✩a♣xq, a♣xqq and P1 ✏ E♣♣t♣b♣aq, u1, ①0u0, 1u1②q✉, ❍, ❍q ✩0, 0q P0 ✏ E♣♣❍, ❍, ❍q ✩ b♣aqr①0u0, 1u1②s.S♣a♣xq, y♣xq, r①0u0, 1u1②s, yq, b♣yq.y♣xqq P0 ✏ b♣aqr①0u0, 1u1②s.ar①0u0,1u1②s♣xq P1 ✏ b♣aqr①0u0, 1u1②s.0 E♣♣t♣b♣cq, u2, u2q✉, ❍, ❍q ✩P0 ⑤ P1, b♣yq.y♣xq ⑤ b♣aqq ✏ b♣cqru2s.♣b♣aqr①0u0, 1u1②s.ar①0u0,1u1②s♣xq ⑤ b♣aqr①0u0, 1u1②s.0q

10

slide-18
SLIDE 18

Event structure semantics of πIK-calculus

slide-19
SLIDE 19

Bundle Event Structure (Langerak, 92)

Events a, b, c Causation ta, b✉ ÞÑ c Conflict a ✼ b ❍ ta✉ tb✉ ta, c✉ tb, c✉

11

slide-20
SLIDE 20

Reversible Bundle Event Structure (Graversen et al, 18)

Events a, b, c Reversible events a, b Causation ta, b✉ ÞÑ c Conflict a ✼ b Reverse causation tc✉ ÞÑ b Prevention c ⊲ a ❍ ta✉ tb✉ tc✉ ta, c✉ tb, c✉

12

slide-21
SLIDE 21

Denotational Semantics

We generate an event structure inductively on the structure of the process, so t ⑤P⑤ ✉N ✏ ♣E, Init, kq where

  • P is a process with all bound free names distinct
  • N ❹ n♣Pq is the set of names any input in the process can

receive

  • E is an event structure
  • Init is the initial state of the structure, corresponding to past

actions

  • k assigns the keys of the past actions to the events of Init

13

slide-22
SLIDE 22

Sample Rule

t ⑤a♣xq.P⑤ ✉N ✏

nP♣N③sbn♣Pqq

a♣nq♣enq.EPn, ➈

nP♣N③sbn♣Pqq

tn✉ ✂ InitPn, ♣n, eq ÞÑ kPn♣eq

  • for some fresh en ❘ En where

t ⑤Prx :✏ ns⑤ ✉N ✏ ①EPn, InitPn, kPn② Where N is the set of names the input can receive, E is an event structure, Init is the initial state of the structure, k assigns the keys of the past actions to the events of Init

14

slide-23
SLIDE 23

Example

t ⑤a♣xq ⑤ a♣bqrns⑤ ✉ta,b,x✉ ✏ Events a♣aq, a♣bq, a♣xq, a♣bq, τ Reversible events a♣aq, a♣bq, a♣xq, a♣bq, τ Causation ta♣bq✉ ÞÑ a♣bq Conflict a♣aq ✼ a♣bq, a♣aq ✼ a♣xq a♣bq ✼ a♣xq, a♣aq ✼ τ a♣bq ✼ τ, a♣cq ✼ τ, a♣bq ✼ τ Prevention a♣bq ⊲ a♣bq ❍ ta♣xq✉ ta♣aq✉ ta♣bq✉ tτ✉ ta♣xq, a♣bq✉ ta♣aq, a♣bq✉ ta♣bq, a♣bq✉ With initial state ta♣bq✉

15

slide-24
SLIDE 24

Conclusion

  • We have defined the first early reversible π-calculus, πIH.
  • We have used a statically reversible early calculus, πIK, as an

intermediate stage to define true concurrency semantics.

  • Unlike existing true concurrency semantics of dynamically

reversible calculi, this does not require redoing every past action after mapping to an event structure.

16

slide-25
SLIDE 25

Future Work

Event structure semantics of a full reversible π-calculus

  • Handle more complex causations, e.g.

♣νxq♣a ①x② ⑤ b ①x② ⑤ x♣yqq.

  • Initial state will be harder due to actions causing bigger

changes to process. Full version available at arxiv.org/abs/2004.01211

17