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
0
300
ラムダ計算に基づいた純粋関数型言語の実装~設計と実装~ #TechLunch
2011/06/08(水) @ Livesense TechLunch
発表者:塩足 拓也
Livesense Inc.
PRO
April 23, 2014
Tweet
Share
More Decks by Livesense Inc.
See All by Livesense Inc.
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
310
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
17
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
0
1.4k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
400
26新卒_総合職採用_会社説明資料
livesense
PRO
0
9k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
1
28k
26新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
1
12k
中途セールス職_会社説明資料
livesense
PRO
0
250
EM候補者向け転職会議説明資料
livesense
PRO
0
120
Other Decks in Technology
See All in Technology
SaaS型なのに自由度の高い本格CMSでサイト構築と運用のコスパ&タイパUP! MovableType.net の便利機能とユーザー事例のご紹介
masakah
0
110
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
270
Zephyr RTOSを使った開発コンペに参加した件
iotengineer22
1
220
第4回Snowflake 金融ユーザー会 Snowflake summit recap
tamaoki
1
280
United airlines®️ USA Contact Numbers: Complete 2025 Support Guide
unitedflyhelp
0
310
MobileActOsaka_250704.pdf
akaitadaaki
0
120
Tokyo_reInforce_2025_recap_iam_access_analyzer
hiashisan
0
180
2025 AWS Jr. Championが振り返るAWS Summit
kazukiadachi
0
110
赤煉瓦倉庫勉強会「Databricksを選んだ理由と、絶賛真っ只中のデータ基盤移行体験記」
ivry_presentationmaterials
2
360
ビズリーチにおけるリアーキテクティング実践事例 / JJUG CCC 2025 Spring
visional_engineering_and_design
1
120
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
120
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
2
7k
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
Optimizing for Happiness
mojombo
379
70k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
970
It's Worth the Effort
3n
185
28k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
How to train your dragon (web standard)
notwaldorf
95
6.1k
Docker and Python
trallard
44
3.5k
Automating Front-end Workflow
addyosmani
1370
200k
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 ソースコード参照
次回予告 ラムダ式を用いて自然数を定義(チャーチ数)