Compact Closed Freyd Category and -calculus Ken Sakayori & - - PowerPoint PPT Presentation

compact closed freyd category
SMART_READER_LITE
LIVE PREVIEW

Compact Closed Freyd Category and -calculus Ken Sakayori & - - PowerPoint PPT Presentation

Compact Closed Freyd Category and -calculus Ken Sakayori & Takeshi Tsukada (The University of Tokyo) 23 December 2019 This talk is about Categorical type theory correspondenceb/w Closed Freyd categories [Power & Thielecke, 99]


slide-1
SLIDE 1

Compact Closed Freyd Category and π-calculus

Ken Sakayori & Takeshi Tsukada (The University of Tokyo) 23 December 2019

slide-2
SLIDE 2

This talk is about

Categorical type theory correspondenceb/w ◼ Closed Freyd categories [Power & Thielecke, 99]

whose premonoidal category is compact closed

◼ a variant of 𝜌-calculus that is not limited to race/deadlock-free processes

◼ Different from Curry-Howard correspondence for session-typed calculi [Caires et al, 16], [Wadler, 12]

slide-3
SLIDE 3

Closed Freyd / Compact closed category

Closed Freyd category [Power & Thielecke, 99]

◼ Model of the computational 𝜇-calculus [Moggi, 89] ◼ Models computation sensitive to evaluation order using the premonoidal structure

◼ 𝑔 ⊗ 𝑗𝑒 ; 𝑗𝑒 ⊗ 𝑕 ≠ 𝑗𝑒 ⊗ 𝑕 ; 𝑔 ⊗ 𝑗𝑒

Compact closed category ◼ Used to represent circuit diagrams, networks, etc...

[Joyal and Street, 91]

◼ Has been used to model a simple process calculus

[Abramsky et al. 96]

slide-4
SLIDE 4

Closed Freyd / Compact closed category

Closed Freyd category [Power & Thielecke, 99]

◼ Model of the computational 𝜇-calculus [Moggi, 89] ◼ Models computation sensitive to evaluation order using the premonoidal structure

◼ 𝑔 ⊗ 𝑗𝑒 ; 𝑗𝑒 ⊗ 𝑕 ≠ 𝑗𝑒 ⊗ 𝑕 ; 𝑔 ⊗ 𝑗𝑒

Compact closed category ◼ Used to represent circuit diagrams, networks, etc...

[Joyal and Street, 91]

◼ Has been used to model a simple process calculus

[Abramsky et al. 96]

How can we use these categories to model 𝜌-calculus?

slide-5
SLIDE 5

Key Observation

Consider 𝜌-calculus as a process passing calculus

(instead of name passing calculus) [Sangiorgi 93] ◼ Regard as a function located at 𝑏 (i.e. ) ◼ Regard as ത 𝑏 applied to ◼ Then the reduction can be seen as

slide-6
SLIDE 6

Key Observation

Consider 𝜌-calculus as a process passing calculus

(instead of name passing calculus) [Sangiorgi 93] ◼ Regard as a function located at 𝑏 (i.e. ) ◼ Regard as ത 𝑏 applied to

◼ Abstraction 𝜇𝑦. 𝑄, application ത 𝑏⟨𝑦⟩ (functional part) can be modeled using the closed Freyd structure ◼ Address assignment 𝑏@ (−) (≃ connection) can be modeled using the compact closed structure

𝑏 𝜇𝑦. 𝑄

slide-7
SLIDE 7

Outline

◼ Introduction ◼ Syntax of the Target Calculus ◼ Categorical Semantics ◼ Equational Theory of the Calculus ◼ Connection w/ logic ◼ Conclusion

slide-8
SLIDE 8

Outline

◼ Introduction ◼ Syntax of the Target Calculus ◼ Categorical Semantics ◼ Equational Theory of the Calculus ◼ Connection w/ logic ◼ Conclusion

slide-9
SLIDE 9

Target calculus (𝝆𝑮-calculus)

Only replicated inputs are allowed ◼ Reflects the idea that input prefixing represents a

function that can be used arbitrary number of times

(𝜉𝑦𝑧) means “connect 𝑦 and 𝑧”

◼ Creates input and output endpoints of a channel ◼ Communications occur b/w names connected by 𝜉

NB Calculi with similar characteristics have been studied (e.g. [Honda &Laurent 10], [Laird 05])

A subcalculus of the asynchronous 𝜌-calculus

Processes 𝑄, 𝑅 ∷= 0 ∣ 𝑦 Ԧ 𝑧 ∣ 𝑄 𝑅 ∣ ! 𝑦 Ԧ 𝑧 . 𝑄 ∣ 𝜉 𝑦 𝑧 𝑄

slide-10
SLIDE 10

Types for the 𝝆𝑮-calculus

Types

◼ Names are either used as input or output channel

◼ Types have duality ( ) where Γ ∷= ⋅ ∣ Γ, 𝑦: 𝑈 and is the type for processes

Typing rules

slide-11
SLIDE 11

Compact closed Identity-on-obj. strict symmetric monoidal with the right adjoint Cartesian

Compact closed Freyd category (CCFC)

Remark The Kleisli exponential can be defined by

slide-12
SLIDE 12

Examples of CCFC

Category of posets and downward-closed relations

In ,

slide-13
SLIDE 13

Interpretation

The interpretation is a morphism from to in (the category of computation/ compact closed category) where

slide-14
SLIDE 14

Interpretation (by example)

Notation

unit morph.

slide-15
SLIDE 15

adjunction iso.

Interpretation (by example)

counit morph.

slide-16
SLIDE 16

Example (Reduction)

slide-17
SLIDE 17

Example (Reduction)

slide-18
SLIDE 18

Example (Reduction)

slide-19
SLIDE 19

Example (Reduction)

slide-20
SLIDE 20

Example (Reduction)

slide-21
SLIDE 21

Properties of interpretation

  • Prop. (Soundness wrt. reductions)

implies If

and

  • Thm. (Soundness wrt. equational theory)

next topic

If then for every 𝐾.

slide-22
SLIDE 22

Outline

◼ Introduction ◼ Syntax of the Target Calculus ◼ Categorical Semantics ◼ Equational Theory of the Calculus ◼ Connection w/ logic ◼ Conclusion

slide-23
SLIDE 23

◼ Is it a known behavioral equivalence?

◼ Barbed congruence, bisimilarity, testing equivalences...

◼ Are the rules appropriate from operational viewpoint? ◼ What corresponds to composition? What is the corresponding equational logic?

slide-24
SLIDE 24

◼ Is it a known behavioral equivalence?

◼ Barbed congruence, bisimilarity, testing equivalences...

◼ Are the rules appropriate from operational viewpoint? ◼ What corresponds to composition? What is the corresponding equational logic?

Parallel composition + hiding Yes, except for a single rule No

slide-25
SLIDE 25

Equational rules

(E-Beta) (E-FOut) (E-Eta) (E-GC)

(Rules for structural congruence are omitted)

All but (E-Eta) are quite standard

Rules

where

slide-26
SLIDE 26

Equational rules

(E-Beta)

◼ Rule similar to the reduction relation

◼ If 𝐷 = , we have ◼The side condition ensures that there is only

  • ne input that is waiting for the output

◼ 𝐷 is not limited to the contexts of the form [ ] | Q

slide-27
SLIDE 27

Equational rules

(E-GC)

◼ Garbage collection law

(E-Beta)

slide-28
SLIDE 28

Equational rules

(E-FOut)

◼ Well-studied law that equates a free output with a bound output + forwarder

◼ cf. Translation from the 𝜌-calculus to the internal 𝜌-calculus [Boreale 98]

(E-GC) (E-Beta) where

slide-29
SLIDE 29

Equational rules

(E-Eta) (E-FOut) (E-GC) (E-Beta) where

slide-30
SLIDE 30

Problem of the 𝜽-rule

is not valid from the

  • perational viewpoint

Example should not be equal to because these can be distinguished by

slide-31
SLIDE 31

Remarks on

The argument that shows ◼ is widely applicable to i/o-typed asynchronous 𝜌-calculi, not specific to 𝜌𝐺 ◼ uses the existence of race

◼ e.g. ◼ cf. session-typed calculus corresponding to linear logic [Caires et al. 16] is race-free

slide-32
SLIDE 32

Operational Properties

Prop. If without using (E-Eta) then and are weak barbed congruent Prop. If then and are may-testing equivalent

◼ May-testing is a rather coarse equivalence

“contextual equivalence” for the 𝜌-calculus

slide-33
SLIDE 33

Is the 𝜽-rule necessary?

Yes, in order to make the term model a category provided that ◼ morphisms = processes modulo some

“well-behaved” equivalence

◼ composition = “parallel composition + hiding”

Without this rule we obtain a semicategory

(cf. 𝛾-theory of the 𝜇-calculus [Hayashi, 95])

slide-34
SLIDE 34

Is the 𝜽-rule necessary?

Yes, in order to make the term model a category

Without this rule the we obtain a semicategory

(cf. 𝛾-theory of the 𝜇-calculus [Hayashi, 95])

Reason:

◼ says that is a left identity

◼ However, is a right identity i.e, holds for most of the behavioral equivalences

slide-35
SLIDE 35

Theory/model correspondence

Thm.

Processes modulo the equational theory forms a CCFC that classifies CCFCs that satisfy the following strictness condition: The canonical isomorphisms are identities The i/o-type only have type of the following form

slide-36
SLIDE 36

Operational/Categorical reading of

From a (traditional) operational viewpoint, is a process that works as a buffer Whereas the category theoretic observation suggests us to treat as a “wire” instead of a “buffer” ◼

cannot keep a message, it should transmit a message w/o making any “observational event” ◼ In this setting, a “buffer” may be represented as where 𝜐 is a special constant represents an “event”

Digression:

slide-37
SLIDE 37

Operational/Categorical reading of

From a (traditional) operational viewpoint, is a process that works as a buffer Whereas the category theoretic observation suggests us to treat as a “wire” instead of a “buffer” ◼

cannot keep a message, it should transmit a message w/o making any “observational event” ◼ In this setting, a “buffer” may be represented as where 𝜐 is a special constant represents an “event”

Digression:

It might be possible to translate the conventional 𝜌-calculus into 𝜌𝐺-calculus with additional constants

slide-38
SLIDE 38

Outline

◼ Introduction ◼ Syntax of the Target Calculus ◼ Categorical Semantics ◼ Equational Theory of the Calculus ◼ Connection w/ logic ◼ Conclusion

slide-39
SLIDE 39

Connection with Logic

(CCFC) (L/NL-model) (MELL) ???

slide-40
SLIDE 40

Connection with Logic

(CCFC) (L/NL-model) (MELL) MELL + +

Conjecture (informal)

◼ since we are using compact closed categories ◼ because 𝜌𝐺 allows to duplicate names with input type (= ? modality)

◼ Similar rule has been considered in [Atkey et al. 16]

slide-41
SLIDE 41

Related Work

◼ On the relation b/w 𝜌-calculus and linear logic ◼ Processes as “network with ports”

[Abramsky 94], [Abramsky et al. 96], [Bellin & Scott, 94], [Honda & Laurent, 10], ...

◼ C-H correspondence b/w session-typed 𝜌-calculus

and linear logic and their extensions

[Caires et al. 2016], [Wadler 2014] [Atkey et al. 16], [Gay & Dardha 18], [Balzer & Pfenning 17], ...

◼ Game semantic model of asynchronous 𝜌-calculus as an instance of closed Freyd category [Laird 05]

slide-42
SLIDE 42

Conclusion

Conclusion ◼ Established a correspondence between

  • 𝜌F-calculus
  • compact closed Freyd category

◼ Corresponds to degenerated LL? Ongoing and Future Work

◼ “Embedded” the conventional 𝜌-calculus into

𝜌𝐺-calculus with the constant 𝜐 ◼ Further investigation on the logical counterpart

  • f CCFC