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(∗)
.
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.