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
Coq で証明付き Web アプリを作る #adf2015
Search
Shohei Yasutake
March 29, 2015
2
890
Coq で証明付き Web アプリを作る #adf2015
Shohei Yasutake
March 29, 2015
Tweet
Share
More Decks by Shohei Yasutake
See All by Shohei Yasutake
Erlang 事例紹介: メディアストリーム中継システム
amutake
0
420
Haskell の型クラスと Typeclassopedia の紹介 #w8lt
amutake
0
480
部屋のメトリクス可視化
amutake
0
720
Actario: A Framework for Reasoning About Actor Systems
amutake
0
680
Coqの紹介 #w8lt
amutake
0
340
🍣 #w8lt
amutake
2
500
代数的データ型について #w8lt
amutake
6
2.4k
FLL
amutake
1
1.4k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
Side Projects
sachag
452
42k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
The Cult of Friendly URLs
andyhume
78
6.1k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Building an army of robots
kneath
302
44k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
Coq Ͱূ໌͖ Web ΞϓϦΛ࡞Δ @amutake @amutake_s
Coq? • ఆཧূ໌ࢧԉܥͷͻͱͭ • ؔΛॻ͍ͯɺͦͷؔͷੑ࣭Λূ໌Ͱ͖Δ • ྫ: forall l :
list A, reverse (reverse l) = l. • Coq ୯ମͰϓϩάϥϜͷ࣮ߦͰ͖ͳ͍͕ɺ OCaml, Haskell, Scheme ʹมՄೳ
OCaml, Haskell, Scheme ʹมՄೳ
→ Coq Ͱ Web ΞϓϦ͕ ࡞ΕΔʂ(ͬͨʔʂ)
࡞Γํᶃ • ෭࡞༻Λىؔ͜͢ Coq ͰఆٛͰ͖ͳ͍ͷͰɺ७ਮͳ ෦͚ͩΛ Coq Ͱ࡞ͬͯɺ͏·͍͜ͱ OCaml ͱ࿈ܞ͢Δ
࡞Γํᶄ • Coq ͷ΄͏ Request -> Response ͷؔ Λ࡞Δ͚ͩ
࡞Γํᶅ (Coq Λ͍ͬͯΔਓ͚) • Ͳ͏ͯ͠෭࡞༻Λى͕͍͍ؔͨ͜͢ ߹ Parameter (ܕ͚ͩͰ࣮ମ͕ະఆٛͳ) ͳͲΛ͍ɺOCaml ͷؔΛࢦఆ͢Δ
Parameter read_file : string -> option string. Extract Constant read_file => “MyModule.read_file”.
࣮༻ྫ (clarus/coq-chick-blog) • https://github.com/clarus/coq-chick-blog • Coq ϒϩάΤϯδϯ • http://coq-blog.clarus.me/ ←
͜ͷϒϩά Coq (͔Βม͞Εͨ OCaml) Ͱಈ͍ͯΔ
Ͳ͜Λূ໌͢Δͷ • ূ໌͍ͨ͠ਓͳΜ͔దʹ͢Ε͍͍Μ͡Ό ͳ͍Ͱ͠ΐ͏͔ • clarus/coq-chick-blog ͰɺʮϩάΠϯ͠ ͍ͯͳ͍߹هࣄΛฤूͰ͖ͳ͍ʯΈͨ ͍ͳ͜ͱΛূ໌͍ͯ͠Δ
ࠓޙͷ՝ɾ·ͱΊ • ϥΠϒϥϦԽ͍ͨ͠ • OCaml ͷ෦͍͍ͩͨڞ௨ • Request -> Response
͚ͩॻ͚ಈ͘Α͏ʹ͍ͨ͠ • Coq ָ͍͠ͷͰͬͯΈ͍ͯͩ͘͞ʂ • ͓͢͢Ίॳ৺ऀ͚: http://proofcafe.org/sf/
༨ஊ: @clarus ͞ΜͭΑ͍ • Coq Λ Real World Ͱ͑ΔΑ͏ʹ͠Α͏ͱ͍ͯ͠Δਓ (Inria
ͷ PhD student) • ࠷ۙ io γϦʔζ (io, io-system, io-system-ocaml, …) Λ࡞͍ͬͯΔ • Coq ্Ͱ IO Effect Λදݱ͢ΔϥΠϒϥϦ܈ (coq-chick-blog ͷதͰ ͍ͬͯΔ IO ෦ΛϥΠϒϥϦͱͯ͠Γग़ͨ͠ͷͬΆ͍) • OCaml ίʔυΛॻ͔ͣʹ Coq Λมͯͦ͠ͷ··࣮ߦͰ͖ͨΓ • 3લ Coq ͷόάΛ͍ͭͯҙͷ໋Λূ໌Ͱ͖ΔϥΠϒϥϦΛެ։͠ ͯͨ