annotate slide/slide.md @ 12:68485f45c265

ADD slide
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Mon, 15 Feb 2021 05:13:01 +0900
parents e5248199c73d
children 4361e7b7d3db
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 marp: false
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 title: Geas Agda による Left Learning Red Black Tree の検証
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 paginate: true
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 theme: default
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 size: 16:9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 style: |
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 section {
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 background-color: #FFFFFF;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 font-size: 28px;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 color: #4b4b4b;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 font-family: "Arial", "Hiragino Maru Gothic ProN";
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 }
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 section.title {
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 font-size: 40px;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 padding: 40px;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 }
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 section.title h1 {
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 text-align: center;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 }
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 section.slide h1 {
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 position: absolute;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 left: 50px; top: 35px;
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 }
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 <!-- class: title -->
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 # Geas Agda による Left Learning Red Black Tree の検証
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 - 上地 悠斗
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 - 琉球大学工学部工学科知能情報コース
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 - 河野 真治
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 - 琉球大学工学部
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 <!-- class: slide -->
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 # 証明を用いたプログラムの信頼性の向上を目指す
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
41 <!-- 研究目的 -->
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
42 - プログラムの信頼性を高めることは重要な課題である
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
43 - 信頼性を高める手法として「モデル検査」や「定理証明」など
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
44 - 当研究室でCbCという言語を開発している
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
45 - C言語からループ構造とサブルーチンを取り除き、継続を導入したC言語の下位言語となる
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
46 - 先行研究では Hoare Logic を用いて 簡単なプログラムの検証を行った。
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
47 - 本研究では Gears Agda にて 重要なアルゴリズムの一つである Red Black Tree を検証する
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 # これまでの成果
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 - Gears Agda
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 - Gears Agda による Hoare Logic を用いた簡単なプログラムの検証
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
56 - Gears Agda で実装したRed Black Tree(insert)
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 # 今回の成果
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 - Left Lerning Red Black Tree の実装
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 - 証明付き Data 構造を用いた List による性質の記述
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 ---
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 # Agdaの紹介
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
67 - Agdaとは、定理証明支援器であり、関数型言語である
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
68 - 特徴として、変数への再代入が許されていない事や、型を明示する必要がある
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
69 ```Agda
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
70 plus : (x y : N ) → N
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
71 plus x zero = x
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
72 plus x (suc y) = plus (suc x) y
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
73 ```
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 ---
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
75 # Gears Agda
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
76 - CbC 実行を継続すると言う仕様に合わせた Agda の記法
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
77 - Env を Data Gear としている
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
78 - Env → t を用いる事で次の遷移先を示す
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
80 ```Agda
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
81 plus-com : {l : Level} {t : Set l} → Env → (next : Env → t) → (exit : Env → t) → t
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
82 plus-com env next exit with vary env
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
83 ... | zero = exit (record { varx = varx env ; vary = vary env })
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
84 ... | suc y = next (record { varx = suc (varx env) ; vary = y })
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
85 ```
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 ---
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
87 # Left Learning Red Black Tree
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
88 - Red Black Tree の定義を満たしつつ、実装が用意な Binary Treeの一つ
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
89 - 定義は以下である。
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
90 <!-- 箇条書きで定義を載せる画像を載っける -->
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
91
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 ---
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
94 # Left Leaning Red Black Tree の実装
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
95 - 通常のプログラミング言語であれば、再代入と再起処理を用いて実装を行う
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
96 - Gears Agda では両方行えないため、これらを回避する
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
97 - insert / delete をする際に、目的の node まで辿るが、ここで辿った分を
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
98 Listに保持する
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
99 - 目的の node まで辿った後に、List に保持した node を結合させることで実装を行う
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
100 <!-- deleteの話ができる。 -->
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
101 ---
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
102 # 証明付き Data 構造を用いた List による性質の記述
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
103 - Binary Tree の性質も持っているので、大小関係を検証する必要がある
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
104 - そこで、証明付き Data 構造を用いた List を下記のように定義した
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
105 <!-- 定義を載せる -->
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
106 ---
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
107 # 今後の課題
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
108
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
109 - 作成した Left Learning Red Black Tree を Hoare Logicに当てはめる
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
110 - その後、条件の接続ができているのかと、健全性について示す。
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 ---
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
113 # まとめ
9
e5248199c73d FIX readd references
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
12
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
115 - Left Learning Red Black Tree について記述した
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
116 - Meta Data Gear を記述した
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
117 - 証明付き Data 構造を用いた List による性質の記述
68485f45c265 ADD slide
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
118 - 今後検証に向けて、条件の接続ができているのかと、健全性について示す。