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
430
Haskell の型クラスと Typeclassopedia の紹介 #w8lt
amutake
0
490
部屋のメトリクス可視化
amutake
0
730
Actario: A Framework for Reasoning About Actor Systems
amutake
0
700
Coqの紹介 #w8lt
amutake
0
340
🍣 #w8lt
amutake
2
500
代数的データ型について #w8lt
amutake
6
2.4k
FLL
amutake
1
1.4k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Thoughts on Productivity
jonyablonski
68
4.4k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Documentation Writing (for coders)
carmenintech
67
4.5k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Language of Interfaces
destraynor
155
24k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Six Lessons from altMBA
skipperchong
27
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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 ͷόάΛ͍ͭͯҙͷ໋Λূ໌Ͱ͖ΔϥΠϒϥϦΛެ։͠ ͯͨ