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.
April 23, 2014
Technology
0
380
ラムダ計算に基づいた純粋関数型言語の実装~設計と実装~ #TechLunch
2011/06/08(水) @ Livesense TechLunch
発表者:塩足 拓也
Livesense Inc.
April 23, 2014
Tweet
Share
More Decks by Livesense Inc.
See All by Livesense Inc.
27新卒_総合職採用_会社説明資料
livesense
0
3.6k
27新卒_Webエンジニア職採用_会社説明資料
livesense
0
7.8k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
0
280
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
1
1.7k
データ基盤の負債解消のためのリプレイス
livesense
0
570
26新卒_総合職採用_会社説明資料
livesense
0
13k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
2
57k
26新卒_Webエンジニア職採用_会社説明資料
livesense
1
13k
中途セールス職_会社説明資料
livesense
0
300
Other Decks in Technology
See All in Technology
Phase09_自動化_仕組み化
overflowinc
0
1.9k
AI時代のシステム開発者の仕事_20260328
sengtor
0
290
Phase08_クイックウィン実装
overflowinc
0
2k
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
110
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
100
私がよく使うMCPサーバー3選と社内で安全に活用する方法
kintotechdev
0
130
韓非子に学ぶAI活用術
tomfook
3
1k
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
240
MIX AUDIO EN BROADCAST
ralpherick
0
110
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
6
2.6k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Phase02_AI座学_応用
overflowinc
0
3.2k
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
270
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
160
We Have a Design System, Now What?
morganepeng
55
8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
The Pragmatic Product Professional
lauravandoore
37
7.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
The browser strikes back
jonoalderson
0
850
Designing Experiences People Love
moore
143
24k
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 ソースコード参照
次回予告 ラムダ式を用いて自然数を定義(チャーチ数)