A logical view on scheduling in concurrency Emmanuel Beffara I2M, - - PowerPoint PPT Presentation

a logical view on scheduling in concurrency
SMART_READER_LITE
LIVE PREVIEW

A logical view on scheduling in concurrency Emmanuel Beffara I2M, - - PowerPoint PPT Presentation

A logical view on scheduling in concurrency Emmanuel Beffara I2M, CNRS & Universit dAix-Marseille Chocola 3 avril 2014 E. Beffara (I2M) A logical view on scheduling in concurrency Chocola 3 avril 2014 1 / 33 Plan


slide-1
SLIDE 1

A logical view on scheduling in concurrency

Emmanuel Beffara

I2M, CNRS & Université d’Aix-Marseille

Chocola – 3 avril 2014

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 1 / 33

slide-2
SLIDE 2

Plan

Introduction Proofs as processes Processes as untyped proofs Why we should search further Proofs as schedules MLL with actions Soundness and completess Uniform translations Asynchronous translation Synchronous translation Discussion

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 2 / 33

slide-3
SLIDE 3

Logic vs computation

The formulae as types approach: formula ↔ type proof rules ↔ primitive instructions proof ↔ program normalization ↔ evaluation The proof search approach: formula ↔ program proof rules ↔ operational semantics proof construction ↔ execution proof ↔ successful run How can we fit concurrency into this framework? What is a proper denotational semantics for concurrency?

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 3 / 33

slide-4
SLIDE 4

(Logic vs computation) vs concurrency

The formulae as types approach: formula ↔ type proof rules ↔ primitive instructions proof ↔ program normalization ↔ evaluation The proof search approach: formula ↔ program proof rules ↔ operational semantics proof construction ↔ execution proof ↔ successful run How can we fit concurrency into this framework? What is a proper denotational semantics for concurrency?

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 3 / 33

slide-5
SLIDE 5

Proofs as processes

Cut elimination in proof nets is an interactive process: . . 𝑄 . 𝑅 . 𝑆 . ⊗ . ⅋ It is natural to represent it a language for interactive processes: (𝜉𝑨)􏿵(𝜉𝑦𝑧)( ̄ 𝑨⟨𝑦𝑧⟩ | 𝑄 | 𝑅) | 𝑨(𝑦𝑧)𝑆􏿸

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 4 / 33

slide-6
SLIDE 6

Proofs as processes

Cut elimination in proof nets is an interactive process: . . 𝑄 . 𝑅 . 𝑆 It is natural to represent it a language for interactive processes: (𝜉𝑨)􏿵(𝜉𝑦𝑧)( ̄ 𝑨⟨𝑦𝑧⟩ | 𝑄 | 𝑅) | 𝑨(𝑦𝑧)𝑆􏿸

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 4 / 33

slide-7
SLIDE 7

Proofs as processes

Cut elimination in proof nets is an interactive process: . . 𝑄 . 𝑅 . 𝑆 . ⊗ . ⅋ It is natural to represent it a language for interactive processes: (𝜉𝑨)􏿵(𝜉𝑦𝑧)( ̄ 𝑨⟨𝑦𝑧⟩ | 𝑄 | 𝑅) | 𝑨(𝑦𝑧)𝑆􏿸

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 4 / 33

slide-8
SLIDE 8

Proofs as processes

Cut elimination in proof nets is an interactive process: . . 𝑄 . 𝑅 . 𝑆 It is natural to represent it a language for interactive processes: (𝜉𝑨)􏿵(𝜉𝑦𝑧)( ̄ 𝑨⟨𝑦𝑧⟩ | 𝑄 | 𝑅) | 𝑨(𝑦𝑧)𝑆􏿸 → (𝜉𝑦𝑧)(𝑄 | 𝑅 | 𝑆)

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 4 / 33

slide-9
SLIDE 9

Proofs as processes

This idea was first implemented in Gianluigi Bellin and Phil Sco On the π-calculus and linear logic Theoretical Computer Science, 1994 Good points: Adequate representation of proof dynamics Study of information flow through proofs Limitations: Requires a lot of coding Touches processes of a very restricted form Does not provide much insight on the π-calculus

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 5 / 33

slide-10
SLIDE 10

Proofs as processes

This idea was first implemented in Gianluigi Bellin and Phil Sco On the π-calculus and linear logic Theoretical Computer Science, 1994 Good points: Adequate representation of proof dynamics Study of information flow through proofs Limitations: Requires a lot of coding Touches processes of a very restricted form Does not provide much insight on the π-calculus

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 5 / 33

slide-11
SLIDE 11

Proofs as processes

This idea was first implemented in Gianluigi Bellin and Phil Sco On the π-calculus and linear logic Theoretical Computer Science, 1994 Good points: Adequate representation of proof dynamics Study of information flow through proofs Limitations: Requires a lot of coding Touches processes of a very restricted form Does not provide much insight on the π-calculus

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 5 / 33

slide-12
SLIDE 12

Typing processes in linear logic

Axiom and cut: 𝑣→𝑤 ⊢ 𝑣 ∶ ´𝐵⊥, 𝑤 ∶ ˆ𝐵 𝑄 ⊢ Γ,⃗ 𝑦 ∶ 𝐵 𝑅 ⊢ ⃗ 𝑦 ∶ 𝐵⊥, Δ (𝜉⃗ 𝑦)(𝑄 | 𝑅) ⊢ Γ, Δ Multiplicatives: 𝑄 ⊢ Γ,⃗ 𝑦 ∶ 𝐵 𝑅 ⊢ ⃗ 𝑧 ∶ 𝐶, Δ 𝑄 | 𝑅 ⊢ Γ,⃗ 𝑦⃗ 𝑧 ∶ 𝐵 ⊗ 𝐶, Δ 𝑄 ⊢ Γ,⃗ 𝑦 ∶ 𝐵,⃗ 𝑧 ∶ 𝐶 𝑄 ⊢ Γ,⃗ 𝑦⃗ 𝑧 ∶ 𝐵 ⅋ 𝐶 Actions: 𝑄 ⊢ Γ,⃗ 𝑦 ∶ 𝐵 𝑣(⃗ 𝑦).𝑄 ⊢ Γ, 𝑣 ∶ ´𝐵 𝑄 ⊢ Γ,⃗ 𝑦 ∶ 𝐵 ̄ 𝑣(⃗ 𝑦).𝑄 ⊢ Γ, 𝑣 ∶ ˆ𝐵 Exponentials for replication, additives for external choice.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 6 / 33

slide-13
SLIDE 13

Typing processes in linear logic

The system on the previous slide was introduced in EB A concurrent model for linear logic MFPS 2006 but was found to be strongly related to Nobuko Yoshida, Martin Berger, and Kohei Honda Strong normalisation in the π-calculus LICS 2001 Bellin and Sco’s encoding decomposes inside. Independently developped: Luís Caires and Frank Pfenning Session types as intuitionistic linear propositions Concur 2010 appears as a fragment.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 7 / 33

slide-14
SLIDE 14

Typing processes in linear logic

Good things: Typed processes cannot diverge or deadlock. Typing is preserved by reduction up to structural congruence. Extends to differential linear logic through “algebraic” extensions of process calculi. Induces translations of the λ-calculus into the π-calculus. Shortcomings: Typed processes are essentially functional. Only top-level cut elimination matches execution. Many well-behaved interaction paerns are not typable.

𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 8 / 33

slide-15
SLIDE 15

Typing processes in linear logic

Good things: Typed processes cannot diverge or deadlock. Typing is preserved by reduction up to structural congruence. Extends to differential linear logic through “algebraic” extensions of process calculi. Induces translations of the λ-calculus into the π-calculus. Shortcomings: Typed processes are essentially functional. Only top-level cut elimination matches execution. Many well-behaved interaction paerns are not typable.

𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 8 / 33

slide-16
SLIDE 16

Processes as proofs

Dual approach: implement processes as proofs in a suitable logic. Translating all processes requires an untyped proof language. Standard linear logic is not an option because of confluence. Differential linear logic allows for explicit non-determinism: 𝑄 ⊢ Γ 𝑅 ⊢ Γ 𝑄 + 𝑅 ⊢ Γ Its rules allow for an implementation of all processes.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 9 / 33

slide-17
SLIDE 17

Processes as untyped proofs

Dual approach: implement processes as proofs in a suitable logic. Translating all processes requires an untyped proof language. Standard linear logic is not an option because of confluence. Differential linear logic allows for explicit non-determinism: 𝑄 ⊢ Γ 𝑅 ⊢ Γ 𝑄 + 𝑅 ⊢ Γ Its rules allow for an implementation of all processes.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 9 / 33

slide-18
SLIDE 18

Processes as untyped proofs

Dual approach: implement processes as proofs in a suitable logic. Translating all processes requires an untyped proof language. Standard linear logic is not an option because of confluence. Differential linear logic allows for explicit non-determinism: 𝑄 ⊢ Γ 𝑅 ⊢ Γ 𝑄 + 𝑅 ⊢ Γ Its rules allow for an implementation of all processes.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 9 / 33

slide-19
SLIDE 19

Processes as untyped proofs

Dual approach: implement processes as proofs in a suitable logic. Translating all processes requires an untyped proof language. Standard linear logic is not an option because of confluence. Differential linear logic allows for explicit non-determinism: 𝑄 ⊢ Γ 𝑅 ⊢ Γ 𝑄 + 𝑅 ⊢ Γ Its rules allow for an implementation of all processes. Thomas Ehrhard and Olivier Laurent Interpreting a finitary π-calculus in differential interaction nets Concur 2007

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 9 / 33

slide-20
SLIDE 20

Processes as untyped proofs

Good points: Does provide insights on concurrent processes Relates algebraic proof semantics and process semantics Limitations: Not clear how to get logic back into the process language Prefixing is only described very indirectly: π-calculus ⟶ solos calculus ⟶ differential nets

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 10 / 33

slide-21
SLIDE 21

Processes as untyped proofs

Good points: Does provide insights on concurrent processes Relates algebraic proof semantics and process semantics Limitations: Not clear how to get logic back into the process language Prefixing is only described very indirectly: π-calculus ⟶ solos calculus ⟶ differential nets

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 10 / 33

slide-22
SLIDE 22

A few observations

Proof normalization, aka cut elimination: the meaning of a proof is in its normal form, normalization is an explicitation procedure, it really wants to be confluent. Interpretation of concurrent processes: the meaning is the interaction, the final (irreducible) state is less relevant, a given process may behave very differently depending on scheduling decisions. Some information is missing.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 11 / 33

slide-23
SLIDE 23

Proofs as schedules

The principles of our new interpretation: formula ↔ type of interaction proof rules ↔ primitives for building schedules proof ↔ schedule for a program normalization ↔ evaluation according to a schedule This is not exactly: Curry-Howard for processes: proofs are not programs, but behaviours of programs Proof search: the dynamics is not in proof construction but in cut-elimination but a sort of middle ground in between.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 12 / 33

slide-24
SLIDE 24

Proofs as schedules: step 1

The first step: a logical description of all executions. EB and Virgile Mogbil Proofs as executions IFIP TCS 2012 — Chocola 14/3/2013 How we proceed: Back to CCS, for now. Slightly change the logic to represent actions explicitly. Match each execution with cut elimination of some proof.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 13 / 33

slide-25
SLIDE 25

Multiplicative CCS

We consider a CCS-style process calculus. 𝑄, 𝑅 ∶= 1 inaction 𝑏.𝑄 perform 𝑏 then do 𝑄 𝑄 ∣ 𝑅 interaction of 𝑄 and 𝑅 ( (𝜉𝑏)𝑄 scope restriction ) There is one source of non-determinism: the pairing of associated events upon synchronization 𝑏.𝑄 ∣ 𝑏.𝑅 ∣ ̄ 𝑏.𝑆 → ⎧ ⎪ ⎨ ⎪ ⎩ 𝑏.𝑄 ∣ 𝑅 ∣ 𝑆 𝑄 ∣ 𝑏.𝑅 ∣ 𝑆

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 14 / 33

slide-26
SLIDE 26

MLL with actions

The formulas

Types of schedules: 𝐵, 𝐶 ∶= ⟨𝑏⟩𝐵 do action 𝑏 and then act as 𝐵 𝐵 ⊗ 𝐶 two independent parts, one as 𝐵, the other as 𝐶 𝐵 ⅋ 𝐶 𝐵 and 𝐶 are both exhibited, but correlated 𝛽 an unspecified behaviour (type variable) 𝛽⊥ something that can interact with 𝛽 ( ∀𝛽𝐵, ∃𝛽𝐵 quantification over behaviours ) Transforming schedules: 𝐵1, …, 𝐵𝑜 ⊢ 𝐶 behave as type 𝐶 in association with processes behaving as each type 𝐵𝑗 Two-sided version.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 15 / 33

slide-27
SLIDE 27

MLL with actions

The formulas

Types of schedules: 𝐵, 𝐶 ∶= ⟨𝑏⟩𝐵 do action 𝑏 and then act as 𝐵 𝐵 ⊗ 𝐶 two independent parts, one as 𝐵, the other as 𝐶 𝐵 ⅋ 𝐶 𝐵 and 𝐶 are both exhibited, but correlated 𝛽 an unspecified behaviour (type variable) 𝛽⊥ something that can interact with 𝛽 ( ∀𝛽𝐵, ∃𝛽𝐵 quantification over behaviours ) Transforming schedules: ⊢ 𝐵⊥

1 , …, 𝐵⊥ 𝑜 , 𝐶

behave as type 𝐶 in association with processes behaving as each type 𝐵𝑗 Duality: (𝐵 ⊗ 𝐶)⊥ = 𝐵⊥ ⅋ 𝐶⊥, (⟨𝑏⟩𝐵)⊥ = ⟨ ̄ 𝑏⟩(𝐵⊥).

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 15 / 33

slide-28
SLIDE 28

MLL with actions

The formulas

Types of schedules: 𝐵, 𝐶 ∶= ⟨𝑏⟩𝐵 do action 𝑏 and then act as 𝐵 𝐵 ⊗ 𝐶 two independent parts, one as 𝐵, the other as 𝐶 𝐵 ⅋ 𝐶 𝐵 and 𝐶 are both exhibited, but correlated 𝛽 an unspecified behaviour (type variable) 𝛽⊥ something that can interact with 𝛽 ( ∀𝛽𝐵, ∃𝛽𝐵 quantification over behaviours ) Transforming schedules: 𝑄 ⊢ 𝐵⊥

1 , …, 𝐵⊥ 𝑜 , 𝐶

𝑄 can behave as type 𝐶 in association with processes behaving as each type 𝐵𝑗 Duality: (𝐵 ⊗ 𝐶)⊥ = 𝐵⊥ ⅋ 𝐶⊥, (⟨𝑏⟩𝐵)⊥ = ⟨ ̄ 𝑏⟩(𝐵⊥).

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 15 / 33

slide-29
SLIDE 29

MLL with actions

Proof rules

Axiom and cut: 1 ⊢ 𝐵⊥, 𝐵 𝑄 ⊢ Γ, 𝐵 𝑅 ⊢ 𝐵⊥, Δ 𝑄 | 𝑅 ⊢ Γ, Δ Multiplicatives: 𝑄 ⊢ Γ, 𝐵 𝑅 ⊢ 𝐶, Δ 𝑄 | 𝑅 ⊢ Γ, 𝐵 ⊗ 𝐶, Δ 𝑄 ⊢ Γ, 𝐵, 𝐶 𝑄 ⊢ Γ, 𝐵 ⅋ 𝐶 Actions: 𝑄 ⊢ Γ, 𝐵 𝑏.𝑄 ⊢ Γ, ⟨𝑏⟩𝐵 antification: 𝑄 ⊢ Γ, 𝐵 𝛽 ∉ fv(Γ) 𝑄 ⊢ Γ, ∀𝛽𝐵 𝑄 ⊢ Γ, 𝐵[𝐶/𝛽] 𝑄 ⊢ Γ, ∃𝛽𝐵 Ceci n’est pas un système de types.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 16 / 33

slide-30
SLIDE 30

MLL with actions

Proof rules

Axiom and cut: 1 ⊢ 𝐵⊥, 𝐵 𝑄 ⊢ Γ, 𝐵 𝑅 ⊢ 𝐵⊥, Δ 𝑄 | 𝑅 ⊢ Γ, Δ Multiplicatives: 𝑄 ⊢ Γ, 𝐵 𝑅 ⊢ 𝐶, Δ 𝑄 | 𝑅 ⊢ Γ, 𝐵 ⊗ 𝐶, Δ 𝑄 ⊢ Γ, 𝐵, 𝐶 𝑄 ⊢ Γ, 𝐵 ⅋ 𝐶 Actions: 𝑄 ⊢ Γ, 𝐵 𝑏.𝑄 ⊢ Γ, ⟨𝑏⟩𝐵 antification: 𝑄 ⊢ Γ, 𝐵 𝛽 ∉ fv(Γ) 𝑄 ⊢ Γ, ∀𝛽𝐵 𝑄 ⊢ Γ, 𝐵[𝐶/𝛽] 𝑄 ⊢ Γ, ∃𝛽𝐵 Ceci n’est pas un système de types.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 16 / 33

slide-31
SLIDE 31

MLL with actions

Proof nets

MLLa admits proof nets: those of MLL plus unary links for modalities. axiom cut tensor par modality . . 𝐵⊥ . 𝐵 . . 𝜌 . 𝜍 . ⊗ . ⅋ . ⟨𝑏⟩ Modality rules commute with everything, indeed 𝐵 ≃ ⟨𝑏⟩𝐵. Correctness criteria: the same as MLL. We avoid second-order quantification for simplicity, we stick with parametricity in type variables.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 17 / 33

slide-32
SLIDE 32

The cyclic example

The following proof is an annotation for 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒: . 𝛽⊥ . ⟨𝑒⟩𝛽 . ⟨ ̄ 𝑐⟩ . ⟨𝑏⟩ . ⟨ ̄ 𝑑⟩ . ⟨𝑐⟩ . ⅋ . ⟨𝑒⟩ . ⟨𝑑⟩ . ⊗ . ⟨ ̄ 𝑏⟩ . If we use boxes, we have a “head cut elimination” matching execution: 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 18 / 33

slide-33
SLIDE 33

The cyclic example

The following proof is an annotation for 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒: . 𝛽⊥ . ⟨𝑒⟩𝛽 . ⟨ ̄ 𝑐⟩ . ⟨ ̄ 𝑑⟩ . ⟨𝑐⟩ . ⅋ . ⟨𝑒⟩ . ⟨𝑑⟩ . ⊗ . If we use boxes, we have a “head cut elimination” matching execution: 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒 → ̄ 𝑐 | 𝑐. ̄ 𝑑 | 𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 18 / 33

slide-34
SLIDE 34

The cyclic example

The following proof is an annotation for 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒: . 𝛽⊥ . ⟨𝑒⟩𝛽 . ⟨ ̄ 𝑐⟩ . ⟨ ̄ 𝑑⟩ . ⟨𝑐⟩ . ⟨𝑒⟩ . ⟨𝑑⟩ . If we use boxes, we have a “head cut elimination” matching execution: 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒 → ̄ 𝑐 | 𝑐. ̄ 𝑑 | 𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 18 / 33

slide-35
SLIDE 35

The cyclic example

The following proof is an annotation for 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒: . 𝛽⊥ . ⟨𝑒⟩𝛽 . ⟨ ̄ 𝑑⟩ . ⟨𝑒⟩ . ⟨𝑑⟩ . If we use boxes, we have a “head cut elimination” matching execution: 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒 → ̄ 𝑐 | 𝑐. ̄ 𝑑 | 𝑑.𝑒 → ̄ 𝑑 | 𝑑.𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 18 / 33

slide-36
SLIDE 36

The cyclic example

The following proof is an annotation for 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒: . 𝛽⊥ . ⟨𝑒⟩𝛽 . ⟨𝑒⟩ . If we use boxes, we have a “head cut elimination” matching execution: 𝑏. ̄ 𝑐 | 𝑐. ̄ 𝑑 | ̄ 𝑏.𝑑.𝑒 → ̄ 𝑐 | 𝑐. ̄ 𝑑 | 𝑑.𝑒 → ̄ 𝑑 | 𝑑.𝑒 → 𝑒

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 18 / 33

slide-37
SLIDE 37

The results of step 1

Theorem (Soundness)

Typing is preserved by reduction, head cut-elimination steps correspond to execution steps. The definition of “head” cut-elimination requires boxes for modality rules, to keep track of prefixing.

Theorem (Completeness)

For every lock-avoiding run 𝑄1 → … → 𝑄𝑜 there are annotations such that 𝜌1 ∶ 𝑄1 ⊢ Γ → … → 𝜌𝑜 ∶ 𝑄𝑜 ⊢ Γ is a cut elimination sequence.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 19 / 33

slide-38
SLIDE 38

Observations

Every execution correspond to some proof: the proof provides a schedule (pairing between actions), cut elimination provides actual execution. These proofs have very different types: the type is deduced from the execution, it describes control flow according a particular schedule; the type decsribes a way for a process interacts with its environment, no most general type. Step 2: make things more uniform.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 20 / 33

slide-39
SLIDE 39

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . 𝑅 . 𝐵⊥ . 𝐶 . 𝑆 . 𝐶⊥

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-40
SLIDE 40

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . 𝑅 . 𝐵⊥ . 𝐶 . 𝑆 . 𝐶⊥ . 𝐵⊥ . 𝐵

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-41
SLIDE 41

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . 𝑅 . 𝐵⊥ . 𝐶 . ⅋ . 𝑆 . 𝐶⊥ . 𝐵⊥ . 𝐵 . ⊗ . 𝐵 ⊗ 𝐶⊥

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-42
SLIDE 42

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . ⟨𝑏⟩ . 𝑅 . 𝐵⊥ . 𝐶 . ⅋ . 𝑆 . 𝐶⊥ . 𝐵⊥ . 𝐵 . ⊗ . 𝐵 ⊗ 𝐶⊥ . ⟨ ̄ 𝑏⟩

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-43
SLIDE 43

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . ⟨𝑏⟩ . 𝑅 . 𝐵⊥ . 𝐶 . ⅋ . 𝑆 . 𝐶⊥ . 𝐵⊥ . 𝐵 . ⊗ . 𝐵 ⊗ 𝐶⊥ . ⟨ ̄ 𝑏⟩ The type of ̄ 𝑏.𝑆 depends on that of 𝑅, even if only 𝑅 only interacts with 𝑄.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-44
SLIDE 44

The trick for actions prefixes

For annotating a process 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 in an execution step 𝑏.𝑄 | 𝑅 | ̄ 𝑏.𝑆 → 𝑄 | 𝑅 | 𝑆

  • n may need some plumbing:

. . 𝑄 . 𝐵 . ⟨𝑏⟩ . 𝑅 . 𝐵⊥ . 𝐶 . ⅋ . 𝑆 . 𝐶⊥ . 𝛽⊥ . 𝛽 . ⊗ . 𝛽 ⊗ 𝐶⊥ . ⟨ ̄ 𝑏⟩ The construction does not depend on the types: parametricity in 𝛽

  • ne can always proceed the same way.
  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 21 / 33

slide-45
SLIDE 45

Type assignment

“Asynchronous” version

Definition

Terms of MCCS are translated into MLLa formulas as follows: ⌈1⌉𝐵 ∶= ∀𝛽 𝛽⊥ ⅋ 𝛽 ⌈𝑄 | 𝑅⌉𝐵 ∶= ⌈𝑄⌉𝐵 ⊗ ⌈𝑅⌉𝐵 ⌈𝑏.𝑄⌉𝐵 ∶= ∀𝛽 ⟨𝑏⟩𝛽⊥ ⅋ (⌈𝑄⌉𝐵 ⊗ 𝛽) = ∀𝛽 ⟨ ̄ 𝑏⟩𝛽 ⊸ (⌈𝑄⌉𝐵 ⊗ 𝛽) ⌈ ̄ 𝑏.𝑄⌉𝐵 ∶= ∀𝛾 (⌈𝑄⌉𝐵 ⊗ 𝛾⊥) ⅋ ⟨ ̄ 𝑏⟩𝛾 = ∀𝛾 (⌈𝑄⌉𝐵 ⊸ 𝛾) ⊸ ⟨𝑏⟩𝛾 Name hiding is le aside for now.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 22 / 33

slide-46
SLIDE 46

Proof assignment

“Asynchronous” version

Fact

For every 𝑄, the type ⌈𝑄⌉𝐵 has one cut-free proof 𝑄𝐵. For actions: 𝑏.𝑄𝐵 = . ⅋ . ⟨𝑏⟩ . ⊗ . 𝑄𝐵 . 𝛽⊥ . 𝛽 ̄ 𝑏.𝑄𝐵 = . ⅋ . ⊗ . 𝑄𝐵 . ⟨ ̄ 𝑏⟩ . 𝛾⊥ . 𝛾

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 23 / 33

slide-47
SLIDE 47

Soundness and completeness

“Asynchronous” version

Theorem

There is an execution 𝑄 →∗ 1 if and only if ⌈𝑄⌉𝐵 ⊸ ⌈1⌉𝐵 is provable in MLL (without modality rules). From execution to implication: each execution step is provable. From implication to execution: find a first interaction, exploiting the correctness criterion for a proof of ⌈𝑄⌉𝐵 ⊸ ⌈1⌉𝐵.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 24 / 33

slide-48
SLIDE 48

Soundness and completeness

“Asynchronous” version

Theorem

There is an execution 𝑄 →∗ 1 if and only if ⌈𝑄⌉𝐵 ⊸ ⌈1⌉𝐵 is provable in MLL (without modality rules). From execution to implication: each execution step is provable. From implication to execution: find a first interaction, exploiting the correctness criterion for a proof of ⌈𝑄⌉𝐵 ⊸ ⌈1⌉𝐵.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 24 / 33

slide-49
SLIDE 49

Soundness and completeness

“Asynchronous” version: finding the first action

Suppose there is some proof of ⌈𝑏1.𝑄1 | ⋯ | 𝑏𝑜.𝑄𝑜⌉𝐵 ⊸ ⌈1⌉𝐵 but no two 𝑏𝑗 can synchronize: . ⅋ . ⊗ . 𝜌1 . ⟨ ̄ 𝑏1⟩𝛽1 . ⊗ . 𝜌2 . ⟨ ̄ 𝑏2⟩𝛽2 . ⊗ . 𝜌3 . ⟨ ̄ 𝑏3⟩𝛽3 . ⋯ . ⊗ . 𝜌𝑙 . ⟨ ̄ 𝑏𝑙⟩𝛽𝑙 . ⋯

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 25 / 33

slide-50
SLIDE 50

Soundness and completeness

“Asynchronous” version: finding the first action

Suppose there is some proof of ⌈𝑏1.𝑄1 | ⋯ | 𝑏𝑜.𝑄𝑜⌉𝐵 ⊸ ⌈1⌉𝐵 but no two 𝑏𝑗 can synchronize: . ⅋ . ⊗ . 𝜌1 . ⟨ ̄ 𝑏1⟩𝛽1 . ⊗ . 𝜌2 . ⟨ ̄ 𝑏2⟩𝛽2 . ⊗ . 𝜌3 . ⟨ ̄ 𝑏3⟩𝛽3 . ⋯ . ⊗ . 𝜌𝑙 . ⟨ ̄ 𝑏𝑙⟩𝛽𝑙 . ⋯ .

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 25 / 33

slide-51
SLIDE 51

Soundness and completeness

“Asynchronous” version: finding the first action

Suppose there is some proof of ⌈𝑏1.𝑄1 | ⋯ | 𝑏𝑜.𝑄𝑜⌉𝐵 ⊸ ⌈1⌉𝐵 but no two 𝑏𝑗 can synchronize: . ⅋ . ⊗ . 𝜌1 . ⟨ ̄ 𝑏1⟩𝛽1 . ⊗ . 𝜌2 . ⟨ ̄ 𝑏2⟩𝛽2 . ⊗ . 𝜌3 . ⟨ ̄ 𝑏3⟩𝛽3 . ⋯ . ⊗ . 𝜌𝑙 . ⟨ ̄ 𝑏𝑙⟩𝛽𝑙 . ⋯ .

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 25 / 33

slide-52
SLIDE 52

Soundness and completeness

“Asynchronous” version: finding the first action

Suppose there is some proof of ⌈𝑏1.𝑄1 | ⋯ | 𝑏𝑜.𝑄𝑜⌉𝐵 ⊸ ⌈1⌉𝐵 but no two 𝑏𝑗 can synchronize: . ⅋ . ⊗ . 𝜌1 . ⟨ ̄ 𝑏1⟩𝛽1 . ⊗ . 𝜌2 . ⟨ ̄ 𝑏2⟩𝛽2 . ⊗ . 𝜌3 . ⟨ ̄ 𝑏3⟩𝛽3 . ⋯ . ⊗ . 𝜌𝑙 . ⟨ ̄ 𝑏𝑙⟩𝛽𝑙 . ⋯ .

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 25 / 33

slide-53
SLIDE 53

Soundness and completeness

“Asynchronous” version: finding the first action

Suppose there is some proof of ⌈𝑏1.𝑄1 | ⋯ | 𝑏𝑜.𝑄𝑜⌉𝐵 ⊸ ⌈1⌉𝐵 but no two 𝑏𝑗 can synchronize: . ⅋ . ⊗ . 𝜌1 . ⟨ ̄ 𝑏1⟩𝛽1 . ⊗ . 𝜌2 . ⟨ ̄ 𝑏2⟩𝛽2 . ⊗ . 𝜌3 . ⟨ ̄ 𝑏3⟩𝛽3 . ⋯ . ⊗ . 𝜌𝑙 . ⟨ ̄ 𝑏𝑙⟩𝛽𝑙 . ⋯ . Impossible because of acyclicity!

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 25 / 33

slide-54
SLIDE 54

Type assignment

“Synchronous” version

Definition

Terms of MCCS are translated into MLLa formulas as follows: ⌈1⌉𝑇 ∶= ∀𝛽 𝛽⊥ ⅋ 𝛽 = ∀𝛽 𝛽 ⊸ 𝛽 ⌈𝑄 | 𝑅⌉𝑇 ∶= ⌈𝑄⌉𝑇 ⊗ ⌈𝑅⌉𝑇 ⌈𝑏.𝑄⌉𝑇 ∶= ∀𝛽 ⟨𝑏⟩(𝛽⊥ ⅋ (⌈𝑄⌉𝑇 ⊗ 𝛽)) = ∀𝛽 ⟨𝑏⟩(𝛽 ⊸ (⌈𝑄⌉𝑇 ⊗ 𝛽)) ⌈ ̄ 𝑏.𝑄⌉𝑇 ∶= ∀𝛾 ⟨ ̄ 𝑏⟩(⌈𝑄⌉𝑇 ⊗ 𝛾⊥) ⅋ 𝛾 = ∀𝛾 ⟨𝑏⟩(⌈𝑄⌉𝑇 ⊸ 𝛾) ⊸ 𝛾 Spot the difference!

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 26 / 33

slide-55
SLIDE 55

Proof assignment

“Synchronous” version

Fact

For every 𝑄, the type ⌈𝑄⌉𝑇 has one cut-free proof 𝑄𝑇. For actions: 𝑏.𝑄𝑇 = . ⟨𝑏⟩ . ⅋ . ⊗ . 𝑄𝑇 . 𝛽⊥ . 𝛽 ̄ 𝑏.𝑄𝑇 = . ⅋ . ⟨ ̄ 𝑏⟩ . ⊗ . 𝑄𝑇 . 𝛾⊥ . 𝛾

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 27 / 33

slide-56
SLIDE 56

Soundness and completeness

“Synchronous” version

Theorem

There is an execution 𝑄 →∗ 𝑅 if and only if ⌈𝑄⌉𝑇 ⊸ ⌈𝑅⌉𝑇 is provable in MLL (without modality rules). From execution to implication:

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 28 / 33

slide-57
SLIDE 57

Soundness and completeness

“Synchronous” version

Theorem

There is an execution 𝑄 →∗ 𝑅 if and only if ⌈𝑄⌉𝑇 ⊸ ⌈𝑅⌉𝑇 is provable in MLL (without modality rules). From execution to implication: . ⅋ . ⅋ . ⅋ . ⊗ . ⊗ . 𝐵⊥ . 𝐵 . 𝐶⊥ . 𝐶 . ⌈𝑆⌉⊥

𝑇

. ⌈𝑆⌉𝑇 with ⎧ ⎪ ⎨ ⎪ ⎩ 𝐵 = ⟨𝑏⟩(⌈𝑅⌉⊥

𝑇 ⅋ (⌈𝑄⌉𝑇 ⊗ ⌈𝑅⌉𝑇))

𝐶 = ⌈𝑄⌉𝑇 ⊗ ⌈𝑅⌉𝑇 proves ⌈(𝑏.𝑄 | ̄ 𝑏.𝑅) | 𝑆⌉𝑇 ⊸ ⌈(𝑄 | 𝑅) | 𝑆⌉𝑇

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 28 / 33

slide-58
SLIDE 58

Soundness and completeness

“Synchronous” version

Theorem

There is an execution 𝑄 →∗ 𝑅 if and only if ⌈𝑄⌉𝑇 ⊸ ⌈𝑅⌉𝑇 is provable in MLL (without modality rules). From execution to implication: each execution step is provable. From implication to execution: take a proof of ⌈𝑄⌉𝑇 ⊸ ⌈𝑅⌉𝑇 cut it against 𝑄𝑇, eliminate the cut read back process terms from intermediate steps

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 28 / 33

slide-59
SLIDE 59

Pairings

Definition

A pairing is an association between occurrences of dual actions . . 𝑞1 ∶ . . 𝑄 = . 𝑏. . 𝑐. . 𝐵 ∣ . ̄ 𝑏. . 𝑑. . 𝐶 ∣ . ̄ 𝑐. . ̄ 𝑑. . 𝐷 ∣ . 𝑏. .̄ 𝑑 . 𝑞2 ∶

Definition

A determinisation of 𝑄 along a pairing 𝑞 is a renaming 𝜖𝑞(𝑄) of actions in 𝑄 where names are equal only for related actions. 𝜖𝑞1(𝑄) = 𝑏1.𝑐1.𝜖(𝐵) ∣ ̄ 𝑏2.𝑑1.𝜖(𝐶) ∣ ̄ 𝑐2. ̄ 𝑑2.𝜖(𝐷) ∣ 𝑏2. ̄ 𝑑1 𝜖𝑞2(𝑄) = 𝑏1.𝑐1.𝜖(𝐵) ∣ ̄ 𝑏1.𝑑1.𝜖(𝐶) ∣ ̄ 𝑐1. ̄ 𝑑1.𝜖(𝐷) ∣ 𝑏2. ̄ 𝑑2

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 29 / 33

slide-60
SLIDE 60

Pairings vs proofs

Facts about pairings: each run induces a pairing runs are equivalent up to permutation of independent events iff they induce the same pairing if 𝑞 is a consistent pairing of 𝑄 then 𝑞 is the unique maximal consistent pairing of 𝜖𝑞(𝑄) Hence pairings are execution schedules and determinized terms represent them inside the process language.

Observation

Pairings are related to placements of axiom links in proofs of ⌈𝑄⌉𝐵 ⊸ ⌈1⌉𝐵.

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 30 / 33

slide-61
SLIDE 61

Discussion

Some points deserve more investigation: Replication: everything extends smoothly by seing ⌈!𝑄⌉𝐵 = ! ⌈𝑄⌉𝐵. Choice: additives are the natural option Name hiding: the situation is not obvious use quantifiers? existential? nabla? partial scheduling? (𝜉𝑏)𝑄 is 𝑄 with some proof that decides what happens on 𝑏 Name passing: need to fix hiding first!

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 31 / 33

slide-62
SLIDE 62

Further directions

Current state of affairs: A logical description of scheduling in processes Explicitation of control flow through processes Hints for a new study of prefixing in processes Ongoing questions: Which semantics for the logic of schedules? coherence spaces for MLLa, etc CPS-like interpretation of processes? the translation of actions is a kind of double negation A logical account on π-to-solos encoding? by relating to other systems

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 32 / 33

slide-63
SLIDE 63

Further directions

Current state of affairs: A logical description of scheduling in processes Explicitation of control flow through processes Hints for a new study of prefixing in processes Ongoing questions: Which semantics for the logic of schedules? coherence spaces for MLLa, etc CPS-like interpretation of processes? the translation of actions is a kind of double negation A logical account on π-to-solos encoding? by relating to other systems

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 32 / 33

slide-64
SLIDE 64

Work in progress…

  • E. Beffara (I2M)

A logical view on scheduling in concurrency Chocola – 3 avril 2014 33 / 33