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
Livesense Inc.
PRO
April 23, 2014
Technology
400
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ラムダ計算に基づいた純粋関数型言語の実装~設計と実装~ #TechLunch
2011/06/08(水) @ 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
AIのReact習熟度を測る
uhyo
2
640
攻撃者視点で考えるDetection Engineering
cryptopeg
3
2k
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
220
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
220
Android の公式 Skill / Android skills
yanzm
0
160
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
280
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
160
AIチャット検索改善の3週間
kworkdev
PRO
2
130
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
170
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
190
LayerXにおけるセキュリティ管理の現在地と次の一手
tosho
0
240
Featured
See All Featured
The Language of Interfaces
destraynor
162
27k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Statistics for Hackers
jakevdp
799
230k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
Code Review Best Practice
trishagee
74
20k
The Cost Of JavaScript in 2023
addyosmani
55
10k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Between Models and Reality
mayunak
4
340
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
ラムダ計算に基づいた純粋関数型 言語の実装 2011/06/08 Takuya Shiotari ~設計と実装~
Agenda Lambda calculus Design • Front end UML
• Back end UML Implementation • Lexer(Scanner) • Parser • Term • ...
Lambda calculus 基礎数学論の一分野 1930年代にAlonzo ChurchとStephen Cole Kleeneによって考案
コンパイラの意味論や型理論で利用 LISP、ML、Haskellなどの関数型プログラミング言語の基礎 1つの変換規則(関数適用)と1つの関数定義規則(ラムダ抽 象)のみを持つ、最小のプログラミング言語 チューリングマシンと等価な数理モデル
関数の定義と実行を抽象化した計算モデル Lambda calculus <expr> ::= <identifier> | (“λ” <identifier> “.”
<expr>) | (<expr> <expr>) 変数 ラムダ抽象 関数適用 ラムダ抽象 → 関数定義 f(x) = x 関数適用 → 関数に引数を適用 f(3)
関数の定義と実行を抽象化した計算モデル Lambda calculus <expr> ::= <identifier> | (“λ” <identifier> “.”
<expr>) | (<expr> <expr>) 変数 ラムダ抽象 関数適用 ラムダ抽象 → 関数定義 f(x) = x 関数適用 → 関数に引数を適用 f(3)
Lambda calculus 束縛変数(Bound Variable) ラムダ抽象によって束縛(bound)された変数 (λ x . x)のxは自由変数
(λ x . y)のyは束縛変数 (λ x . (λ y . (x y))) (λ x . y) 自由変数(Free Variable) ラムダ抽象によって束縛(bound)されていない変数 例 FV(x) = {x}, where x is a variable FV(λx.M) = FV(M) \ {x} FV(M N) = FV(M) ∪ FV(N)
Lambda calculus -reduction(evaluation) rule - α-conversion β-reduction 束縛変数は自由変数やその他の束縛変数と重複しないように名前 を書き換える ラムダ計算の式を実行すること
Desigin - front end UML - Lexer Parser Term VariableTerm
ApplicationTerm Term <create> Core <use> Visitor <use> <use> SymbolTable <use>
Design - back end UML - CodeGenerator Term Core Visitor
<use> <use> SymbolTable <use> <use>
Implementation ソースコード参照
次回予告 ラムダ式を用いて自然数を定義(チャーチ数)