@@ -47,18 +47,20 @@ together five conceptual threads:
47
47
48
48
1 . basic tools from _logic_ for making and justifying precise claims about
49
49
programs;
50
- 2 . the use of _proof assistants_ to construct rigorous logical arguments;
51
50
52
- 3 . the idea of _functional programming_, both as a method of programming that
53
- simplifies reasoning about programs and as a bridge between programming and
54
- logic;
51
+ 2 . the use of \ glspl{proof assistant} to construct rigorous logical
52
+ arguments;
53
+
54
+ 3 . the idea of \ gls{functional programming}, both as a method of programming
55
+ that simplifies reasoning about programs and as a bridge between programming
56
+ and logic;
55
57
56
58
4 . formal techniques for _reasoning about the properties of specific programs_
57
59
(e. g. , the fact that a sorting function or a compiler obeys some formal
58
60
specification); and
59
61
60
- 5 . the use of _type systems_ for establishing well- behavedness guarantees for
61
- _all_ programs in a given programming language (e. g. , the fact that
62
+ 5 . the use of \ glspl{type system} for establishing well- behavedness guarantees
63
+ for _all_ programs in a given programming language (e. g. , the fact that
62
64
well- typed Java programs cannot be subverted at runtime).
63
65
64
66
Each of these topics is easily rich enough to fill a whole course in its own
@@ -72,16 +74,15 @@ information for all cited works can be found in the \nameref{bib} chapter.
72
74
73
75
=== Logic
74
76
75
- Logic is the field of study whose subject matter is _proofs_ -- unassailable
76
- arguments for the truth of particular propositions. Volumes have been written
77
- about the central role of logic in computer science. Manna and Waldinger called
78
- it " the calculus of computer science," while Halpern et al. ' s paper _On the
79
- Unusual Effectiveness of Logic in Computer Science_ catalogs scores of ways in
80
- which logic offers critical tools and insights. Indeed, they observe that "As a
81
- matter of fact, logic has turned out to be significantly more effective in
82
- computer science than it has been in mathematics. This is quite remarkable,
83
- especially since much of the impetus for the development of logic during the
84
- past one hundred years came from mathematics."
77
+ Logic is the field of study whose subject matter is \ glspl{proof}. Volumes have
78
+ been written about the central role of logic in computer science. Manna and
79
+ Waldinger called it " the calculus of computer science," while Halpern et al. ' s
80
+ paper _On the Unusual Effectiveness of Logic in Computer Science_ catalogs
81
+ scores of ways in which logic offers critical tools and insights. Indeed, they
82
+ observe that "As a matter of fact, logic has turned out to be significantly more
83
+ effective in computer science than it has been in mathematics. This is quite
84
+ remarkable, especially since much of the impetus for the development of logic
85
+ during the past one hundred years came from mathematics."
85
86
86
87
In particular, the fundamental notion of inductive proofs is ubiquitous in all
87
88
of computer science. You have surely seen them before, in contexts from discrete
@@ -103,20 +104,28 @@ propositions. These tools fall into two broad categories:
103
104
in a huge variety of settings. Examples of such tools include SAT solvers,
104
105
SMT solvers, and model checkers.
105
106
106
- - _Proof assistants_ are hybrid tools that automate the more routine aspects
107
- of building proofs while depending on human guidance for more difficult
108
- aspects. Widely used proof assistants include Isabelle, Agda, Twelf, ACL2,
109
- PVS, Coq, and Idris among many others.
110
-
111
- This course is based around Coq, a proof assistant that has been under
112
- development, mostly in France, since 1983 and that in recent years has attracted
113
- a large community of users in both research and industry. Coq provides a rich
114
- environment for interactive development of machine-checked formal reasoning. The
115
- kernel of the Coq system is a simple proof-checker, which guarantees that only
116
- correct deduction steps are performed. On top of this kernel, the Coq
107
+ - \Glspl{proof assistant} are hybrid tools that automate the more routine
108
+ aspects of building proofs while depending on human guidance for more
109
+ difficult aspects. Widely used \glspl{proof assistant} include Isabelle,
110
+ Agda, Twelf, ACL2, PVS, Coq, and Idris among many others.
111
+
112
+ \t odo[inline]{Edit the following}
113
+
114
+ This course is based around Idris, a general purpose pure functional programming
115
+ language with _dependent types_ that has been under development since 2006 and
116
+ that in recent years has attracted a large community of users in both research
117
+ and hobby. Idris provides a rich environment for interactive development of
118
+ machine-checked formal reasoning. The kernel of the Idris system is full
119
+ _dependent types_ with _dependent pattern matching_, which allow \glspl{type} to
120
+ be predicated on _values_, enabling some aspects of a program' s behavior to be
121
+ specified precisely in the \ gls{type}. On top of this kernel, the Idris
117
122
environment provides high- level facilities for proof development, including
118
123
powerful tactics for constructing complex proofs semi- automatically, and a large
119
- library of common definitions and lemmas.
124
+ library of common definitions and lemmas. In some ways, Idris's theorem- proving
125
+ is similar to Coq .
126
+
127
+ \ todo[inline]{Consider comparing Coq and Idris here, or at least qualifying
128
+ " some ways" }
120
129
121
130
Coq has been a critical enabler for a huge variety of work across computer
122
131
science and mathematics :
@@ -158,14 +167,18 @@ initials of the Calculus of Constructions (CoC) on which it is based." The
158
167
rooster is also the national symbol of France, and C-o-q are the first three
159
168
letters of the name of Thierry Coquand, one of Coq's early developers.
160
169
170
+ Idris, on the other hand, was named after the singing dragon character from
171
+ \href{https://en.wikipedia.org/wiki/Ivor_the_Engine#Idris_the_Dragon}{Ivor the
172
+ Engine}.
173
+
161
174
162
175
=== Functional Programming
163
176
164
177
The term _functional programming_ refers both to a collection of programming
165
178
idioms that can be used in almost any programming language and to a family of
166
179
programming languages designed to emphasize these idioms, including Haskell,
167
180
OCaml, Standard ML, F#, Scala, Scheme, Racket, Common Lisp, Clojure, Erlang,
168
- and Coq .
181
+ Coq, and Idris .
169
182
170
183
Functional programming has been developed over many decades -- indeed, its roots
171
184
go back to Church's lambda-calculus, which was invented in the 1930s, before
@@ -205,19 +218,19 @@ and is used by Google to index the entire web is a classic example of functional
205
218
programming.
206
219
207
220
For this course, functional programming has yet another significant attraction:
208
- it serves as a bridge between logic and computer science. Indeed, Coq itself can
209
- be viewed as a combination of a small but extremely expressive functional
210
- programming language plus with a set of tools for stating and proving logical
211
- assertions. Moreover, when we come to look more closely, we find that these two
212
- sides of Coq are actually aspects of the very same underlying machinery -- i.e.,
213
- _proofs are programs_.
221
+ it serves as a bridge between logic and computer science. Indeed, Idris itself
222
+ can be viewed as a combination of a small but extremely expressive functional
223
+ programming language with full _dependent types_ and a set of tools for stating
224
+ and proving logical assertions. Moreover, when we come to look more closely, we
225
+ find that these two sides of Idris are actually aspects of the very same
226
+ underlying machinery -- i.e., _proofs are programs_.
214
227
215
228
216
229
=== Program Verification
217
230
218
231
Approximately the first third of the book is devoted to developing the
219
232
conceptual framework of logic and functional programming and gaining enough
220
- fluency with Coq to use it for modeling and reasoning about nontrivial
233
+ fluency with Idris to use it for modeling and reasoning about nontrivial
221
234
artifacts. From this point on, we increasingly turn our attention to two broad
222
235
topics of critical importance to the enterprise of building reliable software
223
236
(and hardware): techniques for proving specific properties of particular
@@ -277,6 +290,9 @@ checkers, contract checkers, and run-time property monitoring techniques for
277
290
detecting when some component of a system is not behaving according to
278
291
specification.
279
292
293
+ \t odo[inline]{Edit the following: mention dependent types and maybe the
294
+ underlying theory}
295
+
280
296
This topic brings us full circle: the language whose properties we study in this
281
297
part, the _simply typed lambda-calculus_, is essentially a simplified model of
282
298
the core of Coq itself!
@@ -293,11 +309,15 @@ treatment of a particular topic will find suggestions for further reading in the
293
309
294
310
=== Chapter Dependencies
295
311
312
+ \t odo[inline]{Copy/recreate deps.html}
313
+
296
314
A diagram of the dependencies between chapters and some suggested
297
315
paths through the material can be found in the file [deps.html].
298
316
299
317
=== System Requirements
300
318
319
+ \t odo[inline]{Rewrite this for Idris}
320
+
301
321
Coq runs on Windows, Linux, and OS X. You will need:
302
322
303
323
- A current installation of Coq, available from the Coq home page. Everything
@@ -346,7 +366,10 @@ readers not post solutions to the exercises anyplace where they can be found by
346
366
search engines.
347
367
348
368
349
- === Downloading the Coq Files
369
+ === Downloading the Idris Files
370
+
371
+ \t odo[inline]{Edit the following, generate HTML files (update pandoc-minted.hs
372
+ accordingly) and update the URL.}
350
373
351
374
A tar file containing the full sources for the " release version" of these notes
352
375
(as a collection of Coq scripts and HTML files) is available here:
0 commit comments