SlideShare a Scribd company logo
1 of 22
Download to read offline
Session Types in Abelian Logic
       Yoichi Hirai (Univ. Tokyo, JSPS Fellow)
               2013-03-06 会津東山




      content to be presented in PLACES ’13
同期通信のプリミティブ
    交換




              cliparts
右をブラックボックス化



       input:
      output:
            cliparts
左をブラックボックス化



input:
output:
            cliparts
両方ブラックボックス化



input:     input:
output:   output:
型付きλ に 交換子(静)


├c: α→β   ├c: β→α
矛盾
├c: unit→ ├(): unit
      ├c():  
そうだ、Linearにしよう

c: α⊸βとc: β⊸αを
一回ずつ使う
Linearにしよう(静)
Γ├ t: φ Δ├ s: ψ   Γ, y: φ, z: ψ├ t: θ
 Γ, Δ├ t⊗s: φ⊗ψ   Γ, x: φ⊗ψ├ let x be y⊗z in t: θ
…IMALLのadditive unit抜き断片… に追加


├c⊗c: (α⊸β)⊗ (β⊸α)
調べたらAbelian logicというのの演繹体系(健全且完全)
Linearにしよう(動)
交換したい。

    t⇓v ┃ s⇓w
  ct⇓w ┃ cs⇓v
残りはAbramsky (1994)から拾う。

    t⇓v ┃ s⇓w             等
     t⊗s⇓v⊗w
Linearにしよう(静)
操作的意味論と形を合わせる。

Γ├ t:α ┃Δ├ s:β
Γ├ ct:β┃ Δ├cs:α
Conjunctive hypersequentと呼ぶ。
Abelian logicに健全で完全なまま。
(同じ論理の乗法的断片を白旗が研究している)
nacy states that if t ⇓ v and t ⇓ w hold, then v and w are ident
version.
 anis given to possibly same time, it is derivable. prove a is ea
 ultiple termsderivablemultiple terms thethe samealso derivable
     evaluate a at the the result is also easier to Especially,
 erivable hypersequent, hypersequent, at result is time, it
 n

            決定性と型保存 our com
 Determinacy derivable hypersequent, is used, the calculu
  can(General Determinacy of the Amida also deri
       evaluate a
3.4 version.                                the result is
neral communicatingcommunicating the communicatingcommun
erthat, whenever a term is used, term
    a
ws that, whenever a communicating term is Since the
 and t ⇓ w hold, then v and w are identical. used,
                                                          term
 cordingshown in if t ⇓Sync rule the Sync rule occurrence iden
 nacy states the the Amida tin occurrence introducing the
   types to that the shown ⇓ w hold, then v and w are intr
                     types v and
 erminacy of                           calculus) If
m 2.3.4 (General Determinacy of· the Amida v
ating仮定 to 0at v0
         term.                    t1 time,               rule calculus)
multiple termspossibly multiple termsis · the same time, it is ea
according to tthe the same ⇓ v1initthe·easiertto ⇓ occurrence
                      ⇓   types shown            Sync n prove an 有導出
on is given                                   at
 cating term.
      t1 ⇓(Type Preservation ⇓ calculus) If terms t
    決定性1
  2.3.1     v
 Preservation
                   ·of·0the 0n∼ t1n of 1
                     ·t ⇓        ⇓ v v the Amida calculus) t
neral version.かかる vtAmidaは他に無い。 n ⇓ vn , . . . , If ter
                                              ···     t
                                                              0     n
mϕ0
persequent(General tDeterminacy nthe Amida evaluation se
  : 型保存 · · of: ∼ n :に型がつくt ofϕthe Amida calculus)I
     2.3.1 ·(Typethe Amida calculus) and sequence t0 ⇓
terminacy t ⇓ w  t0 ϕ0  Preservation of : n If an calculus)
                               ϕn · and an evaluation
                                ··
 m 2.3.4         0         0     t1 ⇓ w 1     ···       tn ⇓ wn
 ypersequent         t0 : ϕ then · · ·
vable, ⇓ vn derivable, 0
     tn then                                  tn : ϕn and an evaluati
      t1 ⇓ w 1      ·t·0· ⇓ w0 n ⇓twn w1
                              t      1 ⇓      ···     tn ⇓ wn
 h vitt1n ⇓ identical·0to vtn∼ t1n⇓ v1
              v derivable, i .⇓
                    · ·t ⇓ w
         is⇓v1n ならば、0thenv にも同じ型がつく。           ···     tn ⇓ vn
         v     0    ···
 n each 0v:iϕis identicalv0 : ϕvn.: ϕn · ·
                             to wi0     ·       vn : ϕn
  w.
   i
 duction on the height        ϕ      ···
                          v0 :of0evaluation derivation. Each
                                               vn : ϕn
ivable.
By induction on tthe height tof ⇓ w1
ght tof ⇓ w1
      1          · ·0 ⇓ w0 n ⇓ wnevaluation· derivation.nthe com
                         t      1        ··
         evaluation· derivation. Each component wtn ⇓ in Each
erivable. oneone applicable rule. Also, the order ofof deco
 s onlyonly applicable rule. Also, the order decomp
 n has
y evaluation using the propositions below. We classify theWe
   induction on evaluation using the propositions below.
送受信
  c: α⊸unitとc: unit⊸αを
        一回ずつ使う
 セッション型[Takeuchi, Honda, Kubo94]では

•cはαを送信用 c: !α end

• cはαを受信用    c: ?α end
are modification from Wadler’s translations and descriptions
   チャネルのセッション型をマクロに
   The notation here is different from the original notation            by
   Kubo [131].
           (cf. Wadler, Caires&Pfenning)
            !ϕ ψ ≡ ϕ      ψ                                  output a val
           ?ϕ ψ ≡ ϕ ⊗ ψ                                       input a val
   ⊕{li : ϕi }i∈I ≡ ϕ0 & · · · & ϕn ,   I = {0, . . . , n}             se
2.4.2    Processes as Abbreviations
   &{li : ϕi }i∈I ≡ ϕ0 ⊕ · · · ⊕ ϕn ,   I = {0, . . . , n}          offer
We define the≡sending and receiving constructs of
         end 1
    プロセスをマクロに like {
   where I is a finite downward-closed set of natural numbers
   x u . t ≡ t[(xu)/x]                               send u throug
   notes, the encoding looks opposite of what some would expe
   explains, ≡ let x be y channelstinstead of processes.
   x(y). t we are typing ⊗ x in          receive y through
        The grammar
rules in the next proposition.
he next proposition.


        セッション型つけマクロ
m Theorem 2.4.1 (Process Typing Rules: receivers)and receivers)
  2.4.1 (Process Typing Rules: senders and senders These rules are
e.admissible.
            O
    y : ψ, x : χ     t : : ψ, x : χ
                     yϕ               t:ϕ                      O     Γ, x : χ   tO
                                                                                 :ϕ     Γ, x :u : ψ t : ϕ
                                                                                        ∆ χ
  recv                                                 send              send
   x : ?ψ χ x(y).?ψϕ
          O   x: t: χ            x(y). t : ϕ                   O     Γ, ∆, x : !ψ O
                                                                                  χ    x Γ, ∆, ϕ : !ψ χ
                                                                                         u . t: x

   O       Γ   t:ϕ
                 O          Γ     t:ϕ
  end : end                                                        0:1
  Γ, x         ign x in t : ϕ                                                         0:1
         O         Γ, x : end     ign x in t : ϕ
 esenting the proof, we note that the types of variable x change in the rules.
  Before presenting the proof, we note that the types of variable x chang
 cts the intuition of session types: the session type of a channel changes after
  This reflects the intuition of session types: the session type of a channel
 munication occurs through the channel.
  some communication occurs through the channel.
 fter expanding abbreviations, the first rule is actually one of the original
  Proof After expanding abbreviations, the first rule is actually one o
  rules:                        O       y : ψ, x : χ     t:ϕ
               ⊗L                                                         .
for convergence of the Amida calculus.

             カットあると
  Nested Channel Pairs

              評価できず困る
  Consider a typed term:
                                                    1R
                                                            ∗:1
                          Ax                ⊕R
                              x:1 x:1                  inl(∗) : 1 ⊕ 1
                        Merge
                                 x:1 x:1         inl(∗) : 1 ⊕ 1
型はつくのに                   Sync
                              x : 1 cx : 1 ⊕ 1        c(inl(∗)) : 1
                                                      ¯
                          Cut
                                      c(¯(inl(∗))) : 1 ⊕ 1
                                         c
  with no evaluation. When we think about why this process does not hav

評価できない。 this process is deadlocked.
 one explanation is                                In order to evaluate t
  we can add the following eval-subst rule:

でも                    cの出力 =
                        eval-subst    cの入力
                                       E t⇓v      = inl(*) ?
                                                   u[v/x] ⇓ w
                                           E     u[t/x] ⇓ w
  so that the following evaluation is possible
s process is deadlocked. In order to eva
    無理に評価する為の規則
ng eval-subst rule:
               E     t⇓v     u[v/x] ⇓ w
  eval-subst
                     E   u[t/x] ⇓ w
valuation is possible

 • 型保存の証明、場合分けに圧倒され未完:
                  ∗⇓∗
   手書きよりも形式化した方がらくかも?
               ∗⇓∗       inl(∗) ⇓ inl(∗)
                                           .
線形λに交換子を追加したら
•   セッション型の表現力(チャネル渡しもできる)

•   無矛盾。Abelian logicになる。



•   次の目標:型がついたら必ず実行できる&型保存の両立

•   カットは取れない



                博士論文
1章: 歴史, 2章: この話, 3章: 無待機計算(ゲーデル論理),
4章: 無待機計算(MTL), 5章: 3章をHaskellに
IMLL Essential Nets (Murawski and Ong)
                    時間があれば
   for (X− `+ Y+ ) ⊗+ (Y− `+ X+ ).


    X   −           +
                Y               Y   −
                                            X   +



            +                           +           Not a correct one.
            `                       `
                                                      1   any leaf is connected to a
                            +
                                                          unique peer (with the dual
                        ⊗                                 label)
                                                      2   acyclic
                                                      3   every path from the root to a
                                                          “dashed-child” goes through
                                                          the parent node.
Amida Nets for Ablian Logic (Multiplicative)
   for (X− `+ Y+ ) ⊗+ (Y− `+ X+ ).


    X   −           +
                Y            Y   −
                                         X   +

                                                 A correct one:
            +                        +
            `                    `                 1   any leaf is connected to a
                                                       unique peer (with the dual
                        ⊗+                             label)
                                                   2   acyclic
                                                   3   every path from the root to a
                                                       “dashed-child” goes through
                                                       the parent node.

   Thm. A multiplicative formula is provable in Abelian logic iff
        a correct Amida net exists for the formula.
+
Amida Edge Elimination ⊗           (for soundness)



  ϕ   ψ           χ            ϕ             ψχ
                                         +
                                      1
              +
          ⊗
                                                 +
                                     ⊗   +   ⊗


  ϕ       ψ⊗χ                      ϕ⊗1 ψ⊗χ
+
Amida Edge Elimination `                       (for soundness)
                                     ϕ+              ψ − `− ⊥−
                                          1+         1+


   ϕ   +   ψ−        χ+                                       χ+
                                     ⊗+

                `+
                                                ⊗+

                               ⊥−
                                                  ψ−
   ϕ+ ψ − `+ χ+
                                 `+                      `+


                          ⊥− `+ (ϕ+ ⊗+ 1+ )          ψ − `+ χ+
                                                                   •

More Related Content

What's hot (19)

mcmc
mcmcmcmc
mcmc
 
Thalesian_Monte_Carlo_NAG
Thalesian_Monte_Carlo_NAGThalesian_Monte_Carlo_NAG
Thalesian_Monte_Carlo_NAG
 
Markov chain intro
Markov chain introMarkov chain intro
Markov chain intro
 
Introduction to chaos
Introduction to chaosIntroduction to chaos
Introduction to chaos
 
Valencia 9 (poster)
Valencia 9 (poster)Valencia 9 (poster)
Valencia 9 (poster)
 
Derivación e integración de funciones de varias variables
Derivación e integración de funciones de varias variablesDerivación e integración de funciones de varias variables
Derivación e integración de funciones de varias variables
 
Hidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognitionHidden Markov Models with applications to speech recognition
Hidden Markov Models with applications to speech recognition
 
Hmm
HmmHmm
Hmm
 
Probable
ProbableProbable
Probable
 
residue
residueresidue
residue
 
Fourier series example
Fourier series exampleFourier series example
Fourier series example
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
 
By BIRASA FABRICE
By BIRASA FABRICEBy BIRASA FABRICE
By BIRASA FABRICE
 
AEM Fourier series
 AEM Fourier series AEM Fourier series
AEM Fourier series
 
Fourier series and fourier integral
Fourier series and fourier integralFourier series and fourier integral
Fourier series and fourier integral
 
Fourier series
Fourier series Fourier series
Fourier series
 
senior seminar
senior seminarsenior seminar
senior seminar
 
z transforms
z transformsz transforms
z transforms
 
弱値の半古典論
弱値の半古典論弱値の半古典論
弱値の半古典論
 

Viewers also liked (6)

Tile
TileTile
Tile
 
Post's problem and the simplest priority argument
Post's problem and the simplest priority argumentPost's problem and the simplest priority argument
Post's problem and the simplest priority argument
 
Community Fundraiser
Community FundraiserCommunity Fundraiser
Community Fundraiser
 
Mark David (Kohler Co.) India Projects
Mark David (Kohler Co.) India ProjectsMark David (Kohler Co.) India Projects
Mark David (Kohler Co.) India Projects
 
Design Masters from Mark David (Kohler Co.)
Design Masters from Mark David (Kohler Co.)Design Masters from Mark David (Kohler Co.)
Design Masters from Mark David (Kohler Co.)
 
Global Properties by Mark David (Kohler Co.)
Global Properties by Mark David (Kohler Co.)Global Properties by Mark David (Kohler Co.)
Global Properties by Mark David (Kohler Co.)
 

Similar to アーベル論理でセッション型

Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpoint
canalculus
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
asimnawaz54
 
Volume_7_avrami
Volume_7_avramiVolume_7_avrami
Volume_7_avrami
John Obuch
 
Cs229 cvxopt
Cs229 cvxoptCs229 cvxopt
Cs229 cvxopt
cerezaso
 
2D1431 Machine Learning
2D1431 Machine Learning2D1431 Machine Learning
2D1431 Machine Learning
butest
 

Similar to アーベル論理でセッション型 (20)

A bit about мcmc
A bit about мcmcA bit about мcmc
A bit about мcmc
 
Chapter0
Chapter0Chapter0
Chapter0
 
Common Fixed Theorems Using Random Implicit Iterative Schemes
Common Fixed Theorems Using Random Implicit Iterative SchemesCommon Fixed Theorems Using Random Implicit Iterative Schemes
Common Fixed Theorems Using Random Implicit Iterative Schemes
 
Limits and continuity powerpoint
Limits and continuity powerpointLimits and continuity powerpoint
Limits and continuity powerpoint
 
03 banach
03 banach03 banach
03 banach
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Chapter-4 combined.pptx
Chapter-4 combined.pptxChapter-4 combined.pptx
Chapter-4 combined.pptx
 
Lecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inferenceLecture 3 qualtifed rules of inference
Lecture 3 qualtifed rules of inference
 
NC time seminar
NC time seminarNC time seminar
NC time seminar
 
01_AJMS_277_20_20210128_V1.pdf
01_AJMS_277_20_20210128_V1.pdf01_AJMS_277_20_20210128_V1.pdf
01_AJMS_277_20_20210128_V1.pdf
 
Em03 t
Em03 tEm03 t
Em03 t
 
On Generalized Classical Fréchet Derivatives in the Real Banach Space
On Generalized Classical Fréchet Derivatives in the Real Banach SpaceOn Generalized Classical Fréchet Derivatives in the Real Banach Space
On Generalized Classical Fréchet Derivatives in the Real Banach Space
 
Volume_7_avrami
Volume_7_avramiVolume_7_avrami
Volume_7_avrami
 
Cs229 cvxopt
Cs229 cvxoptCs229 cvxopt
Cs229 cvxopt
 
2D1431 Machine Learning
2D1431 Machine Learning2D1431 Machine Learning
2D1431 Machine Learning
 
Metric space
Metric spaceMetric space
Metric space
 
Rate of change and tangent lines
Rate of change and tangent linesRate of change and tangent lines
Rate of change and tangent lines
 
signals and system
signals and systemsignals and system
signals and system
 
Signal Processing Homework Help
Signal Processing Homework HelpSignal Processing Homework Help
Signal Processing Homework Help
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

アーベル論理でセッション型

  • 1. Session Types in Abelian Logic Yoichi Hirai (Univ. Tokyo, JSPS Fellow) 2013-03-06 会津東山 content to be presented in PLACES ’13
  • 3. 右をブラックボックス化 input: output: cliparts
  • 9. Linearにしよう(静) Γ├ t: φ Δ├ s: ψ Γ, y: φ, z: ψ├ t: θ Γ, Δ├ t⊗s: φ⊗ψ Γ, x: φ⊗ψ├ let x be y⊗z in t: θ …IMALLのadditive unit抜き断片… に追加 ├c⊗c: (α⊸β)⊗ (β⊸α) 調べたらAbelian logicというのの演繹体系(健全且完全)
  • 10. Linearにしよう(動) 交換したい。 t⇓v ┃ s⇓w ct⇓w ┃ cs⇓v 残りはAbramsky (1994)から拾う。 t⇓v ┃ s⇓w 等 t⊗s⇓v⊗w
  • 11. Linearにしよう(静) 操作的意味論と形を合わせる。 Γ├ t:α ┃Δ├ s:β Γ├ ct:β┃ Δ├cs:α Conjunctive hypersequentと呼ぶ。 Abelian logicに健全で完全なまま。 (同じ論理の乗法的断片を白旗が研究している)
  • 12. nacy states that if t ⇓ v and t ⇓ w hold, then v and w are ident version. anis given to possibly same time, it is derivable. prove a is ea ultiple termsderivablemultiple terms thethe samealso derivable evaluate a at the the result is also easier to Especially, erivable hypersequent, hypersequent, at result is time, it n 決定性と型保存 our com Determinacy derivable hypersequent, is used, the calculu can(General Determinacy of the Amida also deri evaluate a 3.4 version. the result is neral communicatingcommunicating the communicatingcommun erthat, whenever a term is used, term a ws that, whenever a communicating term is Since the and t ⇓ w hold, then v and w are identical. used, term cordingshown in if t ⇓Sync rule the Sync rule occurrence iden nacy states the the Amida tin occurrence introducing the types to that the shown ⇓ w hold, then v and w are intr types v and erminacy of calculus) If m 2.3.4 (General Determinacy of· the Amida v ating仮定 to 0at v0 term. t1 time, rule calculus) multiple termspossibly multiple termsis · the same time, it is ea according to tthe the same ⇓ v1initthe·easiertto ⇓ occurrence ⇓ types shown Sync n prove an 有導出 on is given at cating term. t1 ⇓(Type Preservation ⇓ calculus) If terms t 決定性1 2.3.1 v Preservation ·of·0the 0n∼ t1n of 1 ·t ⇓ ⇓ v v the Amida calculus) t neral version.かかる vtAmidaは他に無い。 n ⇓ vn , . . . , If ter ··· t 0 n mϕ0 persequent(General tDeterminacy nthe Amida evaluation se : 型保存 · · of: ∼ n :に型がつくt ofϕthe Amida calculus)I 2.3.1 ·(Typethe Amida calculus) and sequence t0 ⇓ terminacy t ⇓ w t0 ϕ0 Preservation of : n If an calculus) ϕn · and an evaluation ·· m 2.3.4 0 0 t1 ⇓ w 1 ··· tn ⇓ wn ypersequent t0 : ϕ then · · · vable, ⇓ vn derivable, 0 tn then tn : ϕn and an evaluati t1 ⇓ w 1 ·t·0· ⇓ w0 n ⇓twn w1 t 1 ⇓ ··· tn ⇓ wn h vitt1n ⇓ identical·0to vtn∼ t1n⇓ v1 v derivable, i .⇓ · ·t ⇓ w is⇓v1n ならば、0thenv にも同じ型がつく。 ··· tn ⇓ vn v 0 ··· n each 0v:iϕis identicalv0 : ϕvn.: ϕn · · to wi0 · vn : ϕn w. i duction on the height ϕ ··· v0 :of0evaluation derivation. Each vn : ϕn ivable. By induction on tthe height tof ⇓ w1 ght tof ⇓ w1 1 · ·0 ⇓ w0 n ⇓ wnevaluation· derivation.nthe com t 1 ·· evaluation· derivation. Each component wtn ⇓ in Each erivable. oneone applicable rule. Also, the order ofof deco s onlyonly applicable rule. Also, the order decomp n has y evaluation using the propositions below. We classify theWe induction on evaluation using the propositions below.
  • 13. 送受信 c: α⊸unitとc: unit⊸αを 一回ずつ使う セッション型[Takeuchi, Honda, Kubo94]では •cはαを送信用 c: !α end • cはαを受信用 c: ?α end
  • 14. are modification from Wadler’s translations and descriptions チャネルのセッション型をマクロに The notation here is different from the original notation by Kubo [131]. (cf. Wadler, Caires&Pfenning) !ϕ ψ ≡ ϕ ψ output a val ?ϕ ψ ≡ ϕ ⊗ ψ input a val ⊕{li : ϕi }i∈I ≡ ϕ0 & · · · & ϕn , I = {0, . . . , n} se 2.4.2 Processes as Abbreviations &{li : ϕi }i∈I ≡ ϕ0 ⊕ · · · ⊕ ϕn , I = {0, . . . , n} offer We define the≡sending and receiving constructs of end 1 プロセスをマクロに like { where I is a finite downward-closed set of natural numbers x u . t ≡ t[(xu)/x] send u throug notes, the encoding looks opposite of what some would expe explains, ≡ let x be y channelstinstead of processes. x(y). t we are typing ⊗ x in receive y through The grammar
  • 15. rules in the next proposition. he next proposition. セッション型つけマクロ m Theorem 2.4.1 (Process Typing Rules: receivers)and receivers) 2.4.1 (Process Typing Rules: senders and senders These rules are e.admissible. O y : ψ, x : χ t : : ψ, x : χ yϕ t:ϕ O Γ, x : χ tO :ϕ Γ, x :u : ψ t : ϕ ∆ χ recv send send x : ?ψ χ x(y).?ψϕ O x: t: χ x(y). t : ϕ O Γ, ∆, x : !ψ O χ x Γ, ∆, ϕ : !ψ χ u . t: x O Γ t:ϕ O Γ t:ϕ end : end 0:1 Γ, x ign x in t : ϕ 0:1 O Γ, x : end ign x in t : ϕ esenting the proof, we note that the types of variable x change in the rules. Before presenting the proof, we note that the types of variable x chang cts the intuition of session types: the session type of a channel changes after This reflects the intuition of session types: the session type of a channel munication occurs through the channel. some communication occurs through the channel. fter expanding abbreviations, the first rule is actually one of the original Proof After expanding abbreviations, the first rule is actually one o rules: O y : ψ, x : χ t:ϕ ⊗L .
  • 16. for convergence of the Amida calculus. カットあると Nested Channel Pairs 評価できず困る Consider a typed term: 1R ∗:1 Ax ⊕R x:1 x:1 inl(∗) : 1 ⊕ 1 Merge x:1 x:1 inl(∗) : 1 ⊕ 1 型はつくのに Sync x : 1 cx : 1 ⊕ 1 c(inl(∗)) : 1 ¯ Cut c(¯(inl(∗))) : 1 ⊕ 1 c with no evaluation. When we think about why this process does not hav 評価できない。 this process is deadlocked. one explanation is In order to evaluate t we can add the following eval-subst rule: でも cの出力 = eval-subst cの入力 E t⇓v = inl(*) ? u[v/x] ⇓ w E u[t/x] ⇓ w so that the following evaluation is possible
  • 17. s process is deadlocked. In order to eva 無理に評価する為の規則 ng eval-subst rule: E t⇓v u[v/x] ⇓ w eval-subst E u[t/x] ⇓ w valuation is possible • 型保存の証明、場合分けに圧倒され未完: ∗⇓∗ 手書きよりも形式化した方がらくかも? ∗⇓∗ inl(∗) ⇓ inl(∗) .
  • 18. 線形λに交換子を追加したら • セッション型の表現力(チャネル渡しもできる) • 無矛盾。Abelian logicになる。 • 次の目標:型がついたら必ず実行できる&型保存の両立 • カットは取れない 博士論文 1章: 歴史, 2章: この話, 3章: 無待機計算(ゲーデル論理), 4章: 無待機計算(MTL), 5章: 3章をHaskellに
  • 19. IMLL Essential Nets (Murawski and Ong) 時間があれば for (X− `+ Y+ ) ⊗+ (Y− `+ X+ ). X − + Y Y − X + + + Not a correct one. ` ` 1 any leaf is connected to a + unique peer (with the dual ⊗ label) 2 acyclic 3 every path from the root to a “dashed-child” goes through the parent node.
  • 20. Amida Nets for Ablian Logic (Multiplicative) for (X− `+ Y+ ) ⊗+ (Y− `+ X+ ). X − + Y Y − X + A correct one: + + ` ` 1 any leaf is connected to a unique peer (with the dual ⊗+ label) 2 acyclic 3 every path from the root to a “dashed-child” goes through the parent node. Thm. A multiplicative formula is provable in Abelian logic iff a correct Amida net exists for the formula.
  • 21. + Amida Edge Elimination ⊗ (for soundness) ϕ ψ χ ϕ ψχ + 1 + ⊗ + ⊗ + ⊗ ϕ ψ⊗χ ϕ⊗1 ψ⊗χ
  • 22. + Amida Edge Elimination ` (for soundness) ϕ+ ψ − `− ⊥− 1+ 1+ ϕ + ψ− χ+ χ+ ⊗+ `+ ⊗+ ⊥− ψ− ϕ+ ψ − `+ χ+ `+ `+ ⊥− `+ (ϕ+ ⊗+ 1+ ) ψ − `+ χ+ •