• 検索結果がありません。

WS2 05 Agda 最近の更新履歴 ソフトウェアエンジニアリングシンポジウム2012

N/A
N/A
Protected

Academic year: 2018

シェア "WS2 05 Agda 最近の更新履歴 ソフトウェアエンジニアリングシンポジウム2012"

Copied!
2
0
0

読み込み中.... (全文を見る)

全文

(1)

Agda

✞❃ ✟✠✡

❊ ❅ ● ❀

†1

▲ ✷ ☛ ❁

†1

✹❄ ✼☞✌✍✎✏✑✍✒✓

Agda

✔✕✖✺❂✒ ✓✗✘✙✚✦❑✾ ✶✗✔

Agda

✒✓ ✛▼✜✢ ✣✤

✥✧★✫✬✕✭❏✮✛✯✰ ✱✚✦ ✲✳✴☞✥✵✸✬✕✻✭✿▼❆❇✜❈✘❖❉✚✦

Verification by Agda in script programming

Yoshifumi Yuasa †1 and Yoshiki Kinoshita †1

Agda, a functional programming language, is a powerful proof description langage as well.

In this talk, we introduce basic methods to verify software by Agda, and argue their applica-

tions to script programming.

1.

P◗ ❘ ❙❚

Agda

❯❱ ❲❳ ❨❩❬❭❪❫❴ ❵ ❛❜

❝❯❞❡❢❣❤

Agda

✐❚ ❥❦❧♠♥♦♣qr♦s t✐✉❛✈✇①❛②③❙④❣❤ ⑤⑥ ⑦❚ ⑧❭❪⑨⑩r

Chalmers

❶❷ ❸❯❹ ❺❻❼❽ ❾❿➀⑦⑥ ➁❲❣

1)

Agda

❚❵➂➃➄st✐❛➆➇➈➉➊❳➀➋

✇❵➂ ❝❻➍❣❨❩❬❭❪❫❴❵➎⑨➏✐➅➁➈➐❱

➑⑥❣❤ ❫➏ ➒➓➔→❯

Agda

♠♥♦♣→✐➅➁➃➄

➅➁✉❛➣↔❯❵➂❢❣➋ ✐❲↕❜❝❾➙➛✐⑦⑥❣

❾➋ ➜➝⑦✐❲ ➞➁➋ ❴❵❙➟❣➠➡❾❥❦❧st❻

➢⑦⑥❣➤➥❙❚➦❲❤

Agda

st❛➧➝➦➨➩➫❯

❱❲⑥➭➋ st❛➯➲➳❯➵➸❣❦➺➻➼⑩➏❯➨➩

❢❣⑤✐❾ ❙➟➋ ⑤⑥ ❻➍➽➋ ⑧➾➓♠❬✈✇❻❱❲

⑦⑥❣➍↕➦➚➪ ❧st ❛❴ ❵➈➶ ➹✐➦❣❤

2. Agda

➘➴ ➬➮➱✃

♠♥♦♣qr♦st✐➅➁❛

Agda

Martin-

L¨ of

❧✇➳❻❐ ❒➛❮➫ ➦❧❰⑧Ï→➉➞❲❣

Ð❛➙➛Ñ⑦⑥❳❥❦❧st✐❚Ò➦❣ÓÔ➞❳Õ

Ö❚➋ ❥❦❧

“X → Y ”

❯×ØÙ➅❳➋ ÚÛÜ❧

“(x : X) → Y (x)”

❾ÝÞ➑⑥➁❲❣ß❙④❣ à

á❯➨❢❧➨➩❻â♣ã⑨ä❾å➑⑥ ➁æ➽➋ ➌çá

❹ ❛

x

❾è➝↕é❯

x

ÚÛ ➅➁

ê➀⑦⑥❣➋ ✐

❲↕❛❾Ú Û Ü❳❣ë ì❙④❣❤

❧❯➚í✐î➸➁➋ ✉❛❧❯➉➊♠♥♦♣→❯❵➂

†1 (

ï

)

ðñòóôõö ÷ø

National Institute of Advanced Industrial Science and

Technology (AIST)

data nat : Set where

zero : nat

succ : nat

ù

nat

data _==_ (n : nat) : nat

ù

Set where

refl : n == n

_+_ : nat

ù

nat

ù

nat

zero + m = m

succ y + m = succ (y + m)

succ-eq :

{x y : nat}

ù

x == y

ù

succ x == succ y

succ-eq refl = refl

assoc :

(n m l : nat)

ù

(n + m) + l == n + (m + l)

assoc zero m l = refl

assoc (succ y) m l = succ-eq (assoc y m l)

ú

1 Agda

ûüýþÿ✩✼õ◆ ✩❃▲

✐î➸❣

Curry-Howard

❋❧➠ ✶❛✽ ❇ ❙❚➋ ❥ ❦

❧❚✹➯➚í➋ÚÛÜ❚➄t❛ ❆③ ●❻✷❁➑⑥❣❤

❖s✁✂ s❛➍↕➦➚í❘❀✁➋ ➄t ❛Õ ③ ●➈➋

⑩⑨ä❧❻➍➽

➌ç❢❣

⑤✐❾ ❙➟

❣❤

⑤⑥ ⑦❻➍➽

Agda

st❚✾ ✸➄t➳✇ ❻✄ ❊ ❢❣➨ ➩ ➫❯➉➊❤

Agda

❵➂➃➄❛×☎❯

1

❻④✆❳

⑤❙❚➋ ✝✞✟✠❦✐✉❛✡ ❛☛ ☞ ❯➌ ç➅➁❲❣❤

Agda

❙❚☛☞❚✌✍✝⑥ ❳♠➓qÏ✪✎❙❚➦

➌ç➑⑥❣✏➟

❛ ❙④❣

⑤❛ ➍

↕➦

➄t➃☞❛➌

ç❚ ⑩⑨ä❧✐➅➁ÝÞ❢❣⑤✐❾✑❲❤ ✉❛✒➋ ✓

❝❛➌ç❯❉✔❛ ❜❝❙✕❲➋✖❈➦❏í❯ÝÞ➅➁➋

(2)

[_] : {S : Set}

ù

Trans S

ù

Prop S

ù

Prop S

[ P ] A s = (t : S)

ù

P s t

ù

A t

_#_ : {S : Set}

ù

Trans S

ù

Trans S

ù

Trans S

_#_ P Q s u =

S ( t

ù

(P s t)

(Q t u))

seq : {S : Set}

ù

{P Q : Trans S}

ù

{A : Prop S}

ù

(s : S)

ù

[ P # Q ] A s

ù

[ P ] ([ Q ] A) s

seq s x =

t p u q

ù

x u (t , (p , q))

ú

2

▼❆✺✾ ✩✪✁✂✄☎❈ ❁✆✝

ë ✞❝❇❯✟➅➁❲❣❤

3.

▲◆✼➘➴◆✠✡☛☞✌✍✏✽➱

➚➪❧st➦✑❯❴❵❢❣❃✞❻❚➋ ✒☎❛➍↕❻

❉❅➻➦❜❝❚✐⑥➦❲❤ ➠➡st❻➯➲➳❯➵➸❣

❦➺➼⑩➏ ❯

Agda

st❙➨➩➅➋ ♠♥♦♣→❛❄■

❲❯⑤❛➼⑩➏✡ ❛➚í ✐➅➁❵➂ ❢❣⑤✐❻➦❣❤

⑤⑤❙❚×☎✐➅➁➋ ✓ ❇✔✵ ➼⑩➏❯❞ ❡❢❣❤

➚➪ ❧st

L

✐✉❛✕✕ ✖✸

M

❾➵➸⑦⑥❳✐

➟➋

M

❛✗➽❋❣✘✙✓ ❇❛❂✞❯

S

✐❢❣❤ ♠♥

♦♣→❛✕✕❚

M

❛✓ ❇✔✵❯✚➟✛⑤❢➈❛➦❛

❙➋ ✉❛✔ ✵❥✜❯➨❢

S

✡❛★ ✚❦➄t✐➅➁î

⑦⑥❣❤ ✝❳➋ ④❣❀ß❛✖✸

M

❻❥❢❣

➚í

❚➋ ✉⑥❯❑❢➍

➦✓❇❛❂✞❯

✢➌❢❣➈

❛ ❙④

❣❤ ➍➞➁➋ ⑤⑥❚

S

✡❛✣ ✚❦➄t✐î➸⑦⑥❣❤

⑤❛✤➦➌✥Ù❛✷➋ ♠♥♦♣→

P

✐➚í

A

❻➠➅

➁➋ ✤✄ ➚í

“[P ] A”

❯✧❛➍↕❻➌➀❣❤

[P ] A s ⇐⇒ ∀ t, P s t ⇒ A t

⑤⑥❚✬ ♠♥♦♣→

P

❛✕✕✒❻❚✭✞

A

❾✮➽ Ô➞➁❲❣✯ ⑤✐❯➨ ❢➚í❙④❣❤

2

❻✟➅❳

Agda

✰⑨✱❙❚➋ ✡➃❛✤✄➃☞❯

➌ç➅➁➋ ♠♥♦♣→❛ ✲✧✕✕❯➨❢❘❀

‘#’

✐❛

❥✜❯❵➂➅➁❲❣❤ ⑤❛➚ í

seq

❚➋ ➚ ➪❧st

❛❴❵❻✳➤⑥❣➳✇✴①❙④❣✶➻➳✇

(Dynamic

Logic) 3)

❛✹✇❛×➊❙④❣ ❛Ð➋ ✻✿❏❊✁●

➽❍➅✕ ✕➋ ✂❖➻✕✕❻➊❲ ➁❛✹✇➈④➽➋ ⑤⑥

⑦❯❵➂➅➁♣P✎♣➓Ù➅➁æ➥➭➋ ⑤❛✴①❻❐

➛♠♥♦♣

→❴ ❵❯

Agda

✡❙✕↕⑤

❾❙➟

❣❤

4.

❯➮➷

Agda

✒❱❙➄✏❳➼⑩➏Ù❙❚➋ ✕ ✕✖ ✸

M

✁✉❛✓

❇❂✞

S

❛❲✴ ➻➦❳❨❚➋ ✭✞➅➈➂➝❙④❣✭

❩❚➦❲❤ ✕ ✕✖✸❛❄■❲ ❯❬➝⑦❛❭❪❻➍➽Õ

⑧➾➓♠❬st❚➋ ❵Û❛ ❫♠➓❛⑨❰❜r❨❩❬

❭❪❫✁✖✸❰⑧Ï→☛❛❝❞❯✕↕❡➻❙➐❱➑⑥

❣❤

➠➡✐

❣❰⑧Ï→❛ ✘✙❳❨❚❢➂❙④❣⑤✐

❾✑ ❲❤ ⑤❛➍↕➦

Black Box

❯✹❣❤✞➻❰⑧Ï

→❻æ❲ ➁➋ ⑧➾➓♠❬✈✇❾✐❥❻✕➤⑥➁❲❣⑤

✐❯❴❵❢❣❛❚➋ ➼⑩➏ ❴❦❛ ➍↕➦✟✶➎⑨➏ ❙

❚❧♠❙④➽➋

Agda

☛❯❱ ❲❳➌✇❵➂❝❻➍❣❴

❵❾♥❱➦❛❙❚➦❲➝✐♦➸

❣❤

♣q

4)

❙❚ ⑤❛ ➍↕➦❰⑧Ï→❛ ❴❵☎✐➅➁➋ ❤

❦❛r⑨s➝⑦➦❣t✉❬✈✇❰⑧Ï→❛✟✶①②➠

✶❯③➞➁❲❣❤ ④r⑨s❻❚ ⑤➊➝❛❨❩❬❭❪❫

❾⑥⑦➅➁æ➽➋ ❤❦❛ ⑧➾➓♠❬❾ ⑤⑥ ⑦❯❝❞➅

➁①②❻➠✈❢❣❤ ④✰r⑧⑨tr❬⑨ r⑨s

,

❨❩

❬❭❪❫⑩ ❛✔✵➼⑩➏❯❶➽➋ ✓❇❂✞❷❛❸❹❯

➐❱➅➁➋✉⑥❺⑥❛ t❻✁✹✇❯✄❼✚❱➅➦❾ ⑦➋

➣↔❛❵➂❯✕➞❳❤

➙ ❽❾❿ ➀➁➂

➙ ❽❾❿ ➀➃➄

➅➆➇❿ ➈➉➊

➋➌➍➎

➽➏➈ ➃➄

➙ ❽❾❿ ➀➐➑ ➈➒➄

Apache

ScrEngine ScrEngine

SysLog

SysLog ScrEngine

WebServer ApplicationServer

Tomcat

SysLog

➓❽➔❿→➣↔

Console

5.

❥❦❧♠♥♦♣qr♦st

Agda

✐✉⑥❻➍❣❨❩

❬❭❪❫❴❵❝❯❞❡➅❳❤ ✝❳⑧➾➓♠❬✈✇❴❵

➛❛✶ ❱ ❻➊❲➁♦❪ ➅❳❤

➜ ➝ ➞ ➟

1) “The Agda wiki”,

http://wiki.portal.chalmers.se/agda/pmwiki.php.

2) Howard, William A., ”The formulae-as-types

notion of construction”, in Seldin, Jonathan P.;

Hindley, J. Roger, To H.B. Curry: Essays on

Combinatory Logic, Lambda Calculus and For-

malism, Boston, MA: Academic Press, 1980,

pp. 479490

3) Vaughan Pratt, “Semantical Considerations

on Floyd-Hoare Logic”, Proc. 17th Annual

IEEE Symposium on Foundations of Computer

Science, 1976, 109-121.

4)

➠➡➹➢

,

➤✷➥➦

.

⑧Ï❛✰r⑨tr

❬❳✮❻➧➨➅❳

CD

t✉❬✈✇❻æ➥❣①②

➠✶❛

Assurance Case

❶✮

,

❀➩❷➺➫➭ ➯➲

(AIST-PS-2012-003),

➳➵ ➸➺➻ ✞➫➭➼

参照

関連したドキュメント

Polarity, Girard’s test from Linear Logic Hypersequent calculus from Fuzzy Logic DM completion from Substructural Logic. to establish uniform cut-elimination for extensions of

The main difference between classical and intuitionistic (propositional) systems is the implication right rule, where the intuitionistic restriction is that the right-hand side

ZHIZHIASHVILI, Trigonometric Fourier Series and their Conjugates, Kluwer Academic Publishers, Dobrecht, Boston, London, 1996.

It is suggested by our method that most of the quadratic algebras for all St¨ ackel equivalence classes of 3D second order quantum superintegrable systems on conformally flat

[3] JI-CHANG KUANG, Applied Inequalities, 2nd edition, Hunan Education Press, Changsha, China, 1993J. FINK, Classical and New Inequalities in Analysis, Kluwer Academic

It was shown in [34] that existence of an invariant length scale in the theory is consistent with a noncommutative (NC) phase space (κ-Minkowski spacetime) such that the usual

Burton, “Stability and Periodic Solutions of Ordinary and Func- tional Differential Equations,” Academic Press, New York, 1985.

Becker, Conformal mappings with quasiconformal extensions, As- pects of Contemporary Complex Analysis, Academic Press, London, 1980, 37-72..