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
550
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
26
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
0
1.4k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
410
26新卒_総合職採用_会社説明資料
livesense
PRO
0
9.3k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
1
29k
26新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
1
12k
中途セールス職_会社説明資料
livesense
PRO
0
250
EM候補者向け転職会議説明資料
livesense
PRO
0
120
Other Decks in Technology
See All in Technology
データ駆動経営の道しるべ:プロダクト開発指標の戦略的活用法
ham0215
1
100
対話型音声AIアプリケーションの信頼性向上の取り組み
ivry_presentationmaterials
3
1.1k
SREのためのeBPF活用ステップアップガイド
egmc
2
1.3k
モニタリング統一への道のり - 分散モニタリングツール統合のためのオブザーバビリティプロジェクト
niftycorp
PRO
1
520
Copilot coding agentにベットしたいCTOが開発組織で取り組んだこと / GitHub Copilot coding agent in Team
tnir
0
200
安定した基盤システムのためのライブラリ選定
kakehashi
PRO
3
130
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
1
670
ソフトウェアテストのAI活用_ver1.25
fumisuke
1
610
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
6.9k
shake-upを科学する
rsakata
7
1k
サイバーエージェントグループのSRE10年の歩みとAI時代の生存戦略
shotatsuge
4
1k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
820
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
For a Future-Friendly Web
brad_frost
179
9.8k
Balancing Empowerment & Direction
lara
1
460
A Tale of Four Properties
chriscoyier
160
23k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Adopting Sorbet at Scale
ufuk
77
9.5k
Faster Mobile Websites
deanohume
308
31k
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 ソースコード参照
次回予告 ラムダ式を用いて自然数を定義(チャーチ数)