Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ラムダ計算に基づいた純粋関数型言語の実装~ラスト~ #TechLunch
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Livesense Inc.
PRO
April 23, 2014
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ラムダ計算に基づいた純粋関数型言語の実装~ラスト~ #TechLunch
20110713(水) @ Livesense TechLunch
発表者:塩足 拓也
Livesense Inc.
PRO
April 23, 2014
More Decks by Livesense Inc.
See All by Livesense Inc.
Rubyはただの⾔語に⾮ず
livesense
PRO
0
390
28新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
100
27新卒_総合職採用_会社説明資料
livesense
PRO
0
5.7k
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
10k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
500
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
1
1.7k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
640
26新卒_総合職採用_会社説明資料
livesense
PRO
0
13k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
2
68k
Other Decks in Technology
See All in Technology
[チョークトーク資料]AWS DevOps Agent を使いこなす / AWS Dev Ops Agent Chalk Talk AWS Summit Japan 2026
kinunori
2
510
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
240
エラーバジェットのアラートのタイミングを考える.pdf
kairim0
0
170
自律型AIエージェントは何を破壊するのか
kojira
0
160
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
0
280
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
130
「勝手に広まる」人気 AI エージェントを爆速で作ろう!(AWS Summit Japan 2026講演資料)
minorun365
PRO
5
1.5k
Kiro Ambassador を目指す話
k_adachi_01
0
110
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
1
2.4k
MCP Appsを作ってみよう
iwamot
PRO
4
690
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
140
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
6
1.6k
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
107
250k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
How STYLIGHT went responsive
nonsquared
100
6.2k
Building the Perfect Custom Keyboard
takai
2
800
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
240
RailsConf 2023
tenderlove
30
1.5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Transcript
ラムダ計算に基づいた純粋関数型 言語の実装 2011/07/13 Takuya Shiotari ~ラスト~
Agenda Review(Digest) • Lambda Calculus • Bound Variable and
Free Variable • Reduction Rule Definition • Beta Reduction • Alpha conversion Implementation
Review(Lambda calculus) 関数の定義と実行を抽象化した計算モデル <expr> ::= <identifier> | (“λ” <identifier> “.”
<expr>) | (<expr> <expr>) 変数 ラムダ抽象 関数適用
Review(Bound Variable and Free Variable) 束縛変数(Bound Variable) ラムダ抽象によって束縛(bound)された変数 自由変数(Free Variable)
ラムダ抽象によって束縛(bound)されていない変数 FV(x) = {x}, where x is a variable FV(λx.M) = FV(M) \ {x} FV(M N) = FV(M) ∪ FV(N)
Review(Reduction Rule) α-conversion β-reduction 束縛変数は自由変数やその他の束縛変数と重複しないように名前 を書き換える ラムダ計算の式を実行すること
Definition • 構文だけ定義しても意味が無い • それが何を意味するかを定義する必要がある
Definition(Beta Reduction) 関数λx.M1に引数M2を適用したら、、、 (λx.M1) M2 → [M2/x]M1 まず、xにM2が代入され、、、 それから関数の中身であるM1が実行されるはず Definition
(R-Beta)
Definition(Beta Reduction) Example 1. (λx.x) y → [y/x] x →
y 2. (λx.λy.x) z → [z/x] λy.x → λy.z 3. (λx.x)(λy.y) → [λy.y/x] x → λy.y 4. (λa.b)cd → ?
Definition(Beta Reduction) M1 → M1' M1 M2 → M1' M2 Definition
(R-App1) R-Betaは適用される関数がλ抽象の形になっているこ とを要求 今回は適用される関数が(λa.b)cという関数適用の形 をしている そこで、また新たな変換規則を導入、、、
Definition(Beta Reduction) (λa.b)cd → (λa.b)c → [c/a] b → b
R-Beta (λa.b)cd → bd R-App1 bd →
Definition(Beta Reduction) M2 → M2' M1 M2 → M1 M2' Definition
(R-App2) 同様の理由で関数適用M1 M2において引数M2 を簡約する規則も必要
Definition(Beta Reduction) Question? λ抽象λx.eにおいてeを簡約する、以下の規 則は必要? M → M' λx.M → λx.M'
Definition (R-Abs)
Definition(Alpha Conversion) (λx.λy.xy)y → [y/x] λy.xy → λy.y y •
1番目・2番目のyと3番目のyは別々の変数 • 別々の変数なのに同一視してしまったため、誤った簡約 を行ってしまった • 1番目・2番目のyは仮引数なので、名前は何でも良い (置き換え可能) • 簡約する前に、名前を置き換える (λx.λy.xy)y → (λx.λy'.xy')y → λy'.y y' この名前置き換えのことをα変換という
Definition(Alpha Conversion) [M2/x] y = [M2/x] (λy.M) = λy'.[M2/x]([y'/y] M)
[M2/x] (M M') = ([M2/x] e) ([M2 / x] M') Definition M2 (x == y)の場合 y (x != y)の場合
Implementation そーす
Next Time...