Agda is an advanced programming language based on Type Theory. Agda’s type system is expressive
enough to support full functional verification of programs, in two styles. In external verification, we write
pure functional programs and then write proofs of properties about them. The proofs are separate external
artifacts, typically using structural induction. In internal verification, we specify properties of programs
through rich types for the programs themselves. This often necessitates including proofs inside code, to show
the type checker that the specified properties hold. The power to prove properties of programs in these two
styles is a profound addition to the practice of programming, giving programmers the power to guarantee the
absence of bugs, and thus improve the quality of software more than previously possible.
Verified Functional Programming in Agda
is the first book to provide a systematic exposition of external and
internal verification in Agda, suitable for undergraduate students of Computer Science. No familiarity with
functional programming or computer-checked proofs is presupposed.
The book begins with an introduction to functional programming through familiar examples like booleans,
natural numbers, and lists, and techniques for external verification. Internal verification is considered
through the examples of vectors, binary search trees, and Braun trees. More advanced material on type-level
computation, explicit reasoning about termination, and normalization by evaluation is also included. The
book also includes a medium-sized case study on Huffman encoding and decoding.
Agda is an advanced programming language based on Type Theory. Agda’s type system is expressive
enough to support full functional verification of programs, in two styles. In external verification, we write
pure functional programs and then write proofs of properties about them. The proofs are separate external
artifacts, typically using structural induction. In internal verification, we specify properties of programs
through rich types for the programs themselves. This often necessitates including proofs inside code, to show
the type checker that the specified properties hold. The power to prove properties of programs in these two
styles is a profound addition to the practice of programming, giving programmers the power to guarantee the
absence of bugs, and thus improve the quality of software more than previously possible.
Verified Functional Programming in Agda
is the first book to provide a systematic exposition of external and
internal verification in Agda, suitable for undergraduate students of Computer Science. No familiarity with
functional programming or computer-checked proofs is presupposed.
The book begins with an introduction to functional programming through familiar examples like booleans,
natural numbers, and lists, and techniques for external verification. Internal verification is considered
through the examples of vectors, binary search trees, and Braun trees. More advanced material on type-level
computation, explicit reasoning about termination, and normalization by evaluation is also included. The
book also includes a medium-sized case study on Huffman encoding and decoding.
Cover
CII
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
CIII
CIV
Zoom level
fit page
fit width
A
A
fullscreen
one page
two pages
share
print
SlideShow
fullscreen
in this issue
search
back issues
help
Click to subscribe to this magazine
Open Article
Open Article
Close Article
article text for page
< previous story
|
next story >
Share this page with a friend
Save to “My Stuff”
Subscribe to this magazine
Search
Help