Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PPL2016-9-3

 PPL2016-9-3

Agda による定式化された型推論器の拡張と改良

Kyoko KADOWAKI

March 08, 2016
Tweet

Other Decks in Science

Transcript

  1. ఆࣜԽ ೖྗʢܕແ͠ݴޠʣ ग़ྗʢܕ෇͖ݴޠʣ ܕਪ࿦ n = 1 let f x

    = match x with 0 -> “zero” | _ -> “not zero” n : int n = 1 f : int -> string f x = match x with …
  2. McBride ʹΑΔ unification ͷػߏ ܕН B JOU   B

    N N ܕม਺͸୅ೖʹΑΓ۩ମԽʢ۩ମతͳܕʹͳΔʣՄೳੑ͕͋Δ
  3. ܕUBˠ BˠB  B B B ܕUBˠ BˠJOU  B

    JOU B VOJpDBUJPO BJOU B JOU B ❌ ۩ମԽ͞ΕͨܕΛू߹͔Β࡟আ
  4. ܕUBˠ BˠB  B B B ܕUBˠ BˠJOU  B

    JOU B VOJpDBUJPO BJOU B B Bˠ BˠJOU  ܕม਺ͷ਺͕͔֬ʹݮ͍ͬͯΔ
  5. ܕUBˠ BˠB  B B B ܕUBˠ BˠJOU  B

    JOU B VOJpDBUJPO BJOU B B Bˠ BˠJOU  ܕม਺ͷ਺͕͔֬ʹݮ͍ͬͯΔ ܕม਺͕۩ମԽ͞ΕΔͨͼʹɺ۩ମԽ͞Ε͍ͯͳ͍ܕม਺ͷ਺ ͕ͻͱͭݮΔ
  6. ܕUBˠ BˠB  B B B ܕUBˠ BˠJOU  B

    JOU B VOJpDBUJPO BJOU B B Bˠ BˠJOU  ܕม਺ͷ਺͕͔֬ʹݮ͍ͬͯΔ ܕม਺͕۩ମԽ͞ΕΔͨͼʹɺ۩ମԽ͞Ε͍ͯͳ͍ܕม਺ͷ਺ ͕ͻͱͭݮΔ ఀࢭੑ͕໌Β͔
  7. ؔ਺ఆٛ ೖྗ
 TNݸͷܕม਺Λ΋ͭXFMMTDPQFEUFSN
 ϵܕ؀ڥ ग़ྗ N⒌⒌ N⒌ࣗવ਺ N≤N⒌⒌N≤N⒌⒌Ͱ͋Δ͜ͱͷূ໌ МN⒌⒌ݸͷܕม਺Λ࣋ͭܕΛN⒌ݸͷܕม਺Λ࣋ͭܕʹ͢Δ୅ೖ Нਪ࿦݁Ռͷܕ

    Xਪ࿦͞ΕͨXFMMUZQFEUFSNɻܕม਺ΛN⒌ݸ΋ͭ FSBTFX㲇Tฦ͞ΕͨXFMMUZQFEUFSNT͔Βܕ৘ใΛ࡟আͨ͠΋ͷ͕ɺ
 ΋ͱͷXFMMTDPQFEUFSNͱ౳͍͠ͱ͍͏ূ໌ JOGFS
  8. ؔ਺ఆٛ ೖྗ
 TNݸͷܕม਺Λ΋ͭXFMMTDPQFEUFSN
 ϵܕ؀ڥ .BZCF ग़ྗ N⒌⒌ N⒌ࣗવ਺ N≤N⒌⒌N≤N⒌⒌Ͱ͋Δ͜ͱͷূ໌ МN⒌⒌ݸͷܕม਺Λ࣋ͭܕΛN⒌ݸͷܕม਺Λ࣋ͭܕʹ͢Δ୅ೖ

    Нਪ࿦݁Ռͷܕ Xਪ࿦͞ΕͨXFMMUZQFEUFSNɻܕม਺ΛN⒌ݸ΋ͭ FSBTFX㲇Tฦ͞ΕͨXFMMUZQFEUFSNT͔Βܕ৘ใΛ࡟আͨ͠΋ͷ͕ɺ
 ΋ͱͷXFMMTDPQFEUFSNͱ౳͍͠ͱ͍͏ূ໌ JOGFS
  9. ؔ਺ఆٛ ೖྗ
 TNݸͷܕม਺Λ΋ͭXFMMTDPQFEUFSN
 ϵܕ؀ڥ .BZCF ग़ྗ N⒌⒌ N⒌ࣗવ਺ N≤N⒌⒌N≤N⒌⒌Ͱ͋Δ͜ͱͷূ໌ МN⒌⒌ݸͷܕม਺Λ࣋ͭܕΛN⒌ݸͷܕม਺Λ࣋ͭܕʹ͢Δ୅ೖ

    Нਪ࿦݁Ռͷܕ Xਪ࿦͞ΕͨXFMMUZQFEUFSNɻܕม਺ΛN⒌ݸ΋ͭ FSBTFX㲇Tฦ͞ΕͨXFMMUZQFEUFSNT͔Βܕ৘ใΛ࡟আͨ͠΋ͷ͕ɺ
 ΋ͱͷXFMMTDPQFEUFSNͱ౳͍͠ͱ͍͏ূ໌ JOGFS OPUIJOH͕ฦΔܕΤϥʔͰ͋Δ