operational and denotational semantics for classical
play

Operational and Denotational Semantics for Classical Processes - PowerPoint PPT Presentation

robert.atkey@strath.ac.uk Operational and Denotational Semantics for Classical Processes Robert Atkey University of Strathclyde, Glasgow 6th January 2017 Girard/Abramsky, early 90s: (Linear Logic) Proofs as Processes Processes realise


  1. robert.atkey@strath.ac.uk Operational and Denotational Semantics for Classical Processes Robert Atkey University of Strathclyde, Glasgow 6th January 2017

  2. Girard/Abramsky, early 90s: (Linear Logic) Proofs as Processes ▶ Processes realise proofs ▶ Process reductions in lock-step with Cut-reduction ▶ Not a completely neat fit (Bellin, Scott, 1994) ▶ Fruitful idea: GoI, Interaction Categories, Game Semantics, ... Caires, Pfenning: Intuitionistic Linear Logic and Session Types ▶ Assign proof terms to DILL proofs ▶ Careful “channel management”: propositions as sessions ▶ (Wadler, 2012) Classical LL version: CP

  3. Damiano Mazza, The True Concurrency of Differential Interaction Nets , 2015. However, although linear logic has kept providing, even in recent times, useful tools for ensuring properties of process algebras, especially via type systems (Kobayashi et al., 1999; Yoshida et al., 2004; Caires and Pfenning, 2010; Honda and Laurent, 2010), all further investigations have failed to bring any deep logical insight into concurrency theory, in the sense that no concurrent primitive has found a convincing counterpart in linear logic, or anything even remotely resembling the perfect correspondence between functional languages and intuitionistic logic. In our opinion, we must simply accept that linear logic is not the right framework for carrying out Abramsky’s “proofs as processes” program (which, in fact, more than 20 years after its inception has yet to see a satisfactory completion).

  4. My Goal: What is the observable result of a CP process? ▶ An Operational Semantics ▶ A notion of “observed behaviour” ▶ A notion of “observational equivalence” ▶ A denotational semantics with an adequacy proof

  5. Wadler’s “Classical Processes” (a term language for Girard’s Classical Linear Logic)

  6. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A ⊥ lp A ` B A & B ? A

  7. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A positive ⊥ lp A ` B A & B ? A

  8. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A positive ⊥ lp A ` B A & B ? A negative

  9. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A positive ⊥ lp A ` B A & B ? A negative � �� � ���� � �� � additive exponentials multiplicative

  10. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A output ⊥ lp A ` B A & B ? A negative � �� � ���� � �� � additive exponentials multiplicative

  11. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A output ⊥ lp A ` B A & B ? A input � �� � ���� � �� � additive exponentials multiplicative

  12. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A output ⊥ lp A ` B A & B ? A input � �� � ���� � �� � additive exponentials topology

  13. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A output ⊥ lp A ` B A & B ? A input � �� � ���� � �� � data exponentials topology

  14. Propositions as Sessions A , B ::= 1 lp A ⊗ B A ⊕ B ! A output ⊥ lp A ` B A & B ? A input � �� � ���� � �� � data lpservers topology

  15. Propositions as Sessions Output a choice: Bit = 1 ⊕ 1 Input a choice: Bit ⊥ = ⊥ & ⊥

  16. Propositions as Sessions Duality flips input and output: 1 ⊥ ⊥ ⊥ = ⊥ = 1 A ⊥ ` B ⊥ A ⊥ ⊗ B ⊥ ( A ⊗ B ) ⊥ ( A ` B ) ⊥ = = A ⊥ & B ⊥ A ⊥ ⊕ B ⊥ ( A ⊕ B ) ⊥ ( A & B ) ⊥ = = ( ! A ) ⊥ ? A ⊥ ( ? A ) ⊥ ! A ⊥ = =

  17. Another way of writing Server, using A B A B: Server ! Bit Bit Bit Propositions as Sessions Receive two bits and return a bit: Server = ! ( Bit ⊥ ` Bit ⊥ ` Bit ⊗ 1) Emit two bits and receive a bit: Client = Server ⊥ = ? ( Bit ⊗ Bit ⊗ Bit ⊥ ` ⊥ )

  18. Propositions as Sessions Receive two bits and return a bit: Server = ! ( Bit ⊥ ` Bit ⊥ ` Bit ⊗ 1) Emit two bits and receive a bit: Client = Server ⊥ = ? ( Bit ⊗ Bit ⊗ Bit ⊥ ` ⊥ ) Another way of writing Server, using A ⊸ B = A ⊥ ` B: Server = ! ( Bit ⊸ Bit ⊸ Bit ⊗ 1)

  19. Processes as Proofs ⊢ P :: x 1 : A 1 , . . . , x n : A n � �� � unconnected channels

  20. Processes as Proofs Structural ⊢ x ↔ y :: x : A , y : A ⊥ (Ax) ⊢ Q :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A (Cut) (Mix 0 ) ⊢ ν x . ( P | Q ) :: Γ , ∆ ⊢ 0 ::

  21. Processes as Proofs Multiplicative ⊢ P :: Γ ( 1 ) ( ⊥ ) ⊢ x [] :: x : 1 ⊢ x () . P :: Γ , x : ⊥ ⊢ P :: Γ , y : A ⊢ Q :: ∆ , x : B ⊢ P :: Γ , y : A , x : B ( ⊗ ) ( ` ) ⊢ x [ y ] . ( P | Q ) :: Γ , ∆ , x : A ⊗ B ⊢ x ( y ) . P :: Γ , x : A ` B

  22. Processes as Proofs Additive ⊢ P :: Γ , x : A i ( ⊕ i ) ⊢ x [ i ] . P :: Γ , x : A 0 ⊕ A 1 ⊢ P :: Γ , x : A 0 ⊢ Q :: Γ , x : A 1 (&) ⊢ x . case ( P , Q ) :: Γ , x : A 0 & A 1

  23. Processes as Proofs Exponential ⊢ P :: ? Γ , y : A ⊢ P :: Γ , y : A (!) (?) ⊢ ! x [ y ] . P :: ? Γ , x : ! A ⊢ ? x ( y ) . P :: Γ , x : ? A ⊢ P :: Γ , x 1 : ? A , x 2 : ? A ⊢ P :: Γ (C) (W) ⊢ P { x 1 / x 2 } :: Γ , x 1 : ? A ⊢ P :: Γ , x : ? A

  24. An “AND” server: ! x y y p y q case p 0 case q 0 y 0 y 1 y 0 y 1 case q 0 y 0 y 1 y 1 y x Server A binary binary operation client: ? x y y 1 y 1 case y 0 y 1 y x Client Processes as Proofs Some syntactic sugar: def x [ 0 ] . P x [ y ] . ( y [0] . y [] | P ) = def x [ 1 ] . P x [ y ] . ( y [1] . y [] | P ) = def case x . { 0 �→ P ; 1 �→ Q } x . case ( x () . P , x () . Q ) =

  25. A binary binary operation client: ? x y y 1 y 1 case y 0 y 1 y x Client Processes as Proofs Some syntactic sugar: def x [ 0 ] . P x [ y ] . ( y [0] . y [] | P ) = def x [ 1 ] . P x [ y ] . ( y [1] . y [] | P ) = def case x . { 0 �→ P ; 1 �→ Q } x . case ( x () . P , x () . Q ) = An “AND” server: ⊢ ! x [ y ] . y ( p ) . y ( q ) . case p . { 0 �→ case q . { 0 �→ y [ 0 ] . y []; 1 �→ y [ 0 ] . y [] } ; 1 �→ case q . { 0 �→ y [ 0 ] . y []; 1 �→ y [ 1 ] . y [] }} :: x : Server

  26. Processes as Proofs Some syntactic sugar: def x [ 0 ] . P x [ y ] . ( y [0] . y [] | P ) = def x [ 1 ] . P x [ y ] . ( y [1] . y [] | P ) = def case x . { 0 �→ P ; 1 �→ Q } x . case ( x () . P , x () . Q ) = An “AND” server: ⊢ ! x [ y ] . y ( p ) . y ( q ) . case p . { 0 �→ case q . { 0 �→ y [ 0 ] . y []; 1 �→ y [ 0 ] . y [] } ; 1 �→ case q . { 0 �→ y [ 0 ] . y []; 1 �→ y [ 1 ] . y [] }} :: x : Server A binary binary operation client: ⊢ ? x ( y ) . y [ 1 ] . y [ 1 ] . case y . { 0 �→ y () . 0; 1 �→ y () . 0 } :: x : Client

  27. Dynamics of Classical Processes ( Cut -Elimination?)

  28. Joined by a Cut : P x A Q x A x P Q Cut-Elimination as Execution Two processes: ⊢ Q :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A

  29. Cut-Elimination as Execution Two processes: ⊢ Q :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A Joined by a Cut : ⊢ Q :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A ⊢ ν x . ( P | Q ) :: Γ , ∆

  30. Cut -elimination yields... . . . . . . P x A i Q i x A i x P Q i (the proof tree has become smaller, and data was moved) Cut-Elimination as Execution . . . . . . . . . ⊢ Q 0 :: ∆ , x : A ⊥ ⊢ Q 1 :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A i 0 1 ⊢ x [ i ] . P :: Γ , x : A 0 ⊕ A i ⊢ x . case ( Q 0 , Q 1 ) :: ∆ , x : A ⊥ 0 & A ⊥ 1 (Cut) ⊢ ν x . ( x [ i ] . P | x . case ( Q 0 , Q 1 )) :: Γ , ∆

  31. Cut-Elimination as Execution . . . . . . . . . ⊢ Q 0 :: ∆ , x : A ⊥ ⊢ Q 1 :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A i 0 1 ⊢ x [ i ] . P :: Γ , x : A 0 ⊕ A i ⊢ x . case ( Q 0 , Q 1 ) :: ∆ , x : A ⊥ 0 & A ⊥ 1 (Cut) ⊢ ν x . ( x [ i ] . P | x . case ( Q 0 , Q 1 )) :: Γ , ∆ Cut -elimination yields... . . . . . . ⊢ Q i :: ∆ , x : A ⊥ ⊢ P :: Γ , x : A i i ⊢ ν x . ( P | Q i ) :: Γ , ∆ (the proof tree has become smaller, and data was moved)

  32. Cut-Elimination as Execution Orientation of Principal Cut s as Reductions : ν x . ( x [] | x () . P ) P − → ν x . ( x [ y ] . ( P | Q ) | R ) ν y . ( P | ν x . ( Q | R )) − → ν x . ( x [ i ] . P | x . case ( Q 0 , Q 1 )) ν x . ( P | Q i ) − → ν x . ( ! x [ y ] . P | ? x ( y ) . Q ) ν y . ( P | Q ) − → ν x . ( ! x [ y ] . P | Q { x / x ′ } ) ν x . ( ! x [ y ] . P | ν x ′ . ( ! x ′ [ y ] . P | Q )) − → ν x . ( ! x [ y ] . P | Q ) Q − →

  33. Cut-Elimination as Execution What if we are stuck? ν z . ( x () . P | Q )

  34. Cut-Elimination as Execution What if we are stuck? ν z . ( x () . P | Q ) x () .ν z . ( P | Q ) − → ν z . ( x [ y ] . ( P | Q ) | R ) x [ y ] . ( ν z . ( P | R ) | Q ) − → ν z . ( x [ y ] . ( P | Q ) | R ) x [ y ] . ( P | ν z . ( Q | R )) − → ν z . ( x ( y ) . P | Q ) x ( y ) .ν z . ( P | Q ) − → ν z . ( x [ i ] . P | Q ) x [ i ] .ν z . ( P | Q ) − → ν z . ( x . case ( P , Q ) | R ) x . case ( ν z . ( P | R ) , ν z . ( Q | R )) − → ν z . ( ! x [ y ] . P | Q ) ! x [ y ] .ν z . ( P | Q ) − → ν z . ( ? x ( y ) . P | Q ) ? x ( y ) .ν z . ( P | Q ) − →

Recommend


More recommend