| author | Christian Urban <urbanc@in.tum.de> |
| Mon, 03 Aug 2009 16:47:01 +0200 | |
| changeset 302 | 0cbd34857b9e |
| parent 298 | 8057d65607eb |
| child 303 | 05e6a33edef6 |
| permissions | -rw-r--r-- |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory Intro |
| 75 | 2 |
imports Base |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
chapter {* Introduction *}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
text {*
|
|
295
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
8 |
\begin{flushright}
|
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
9 |
{\em
|
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
10 |
``My thesis is that programming is not at the bottom of the intellectual \\ |
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
11 |
pyramid, but at the top. It's creative design of the highest order. It \\ |
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
12 |
isn't monkey or donkey work; rather, as Edsger Dijkstra famously \\ |
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
13 |
claimed, it's amongst the hardest intellectual tasks ever attempted.''} \\[1ex] |
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
14 |
Richard Bornat, In Defence of Programming \cite{Bornat-lecture}
|
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
15 |
\end{flushright}
|
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
16 |
|
|
24c68350d059
polished the package chapter used FOCUS to explain the subproofs
Christian Urban <urbanc@in.tum.de>
parents:
293
diff
changeset
|
17 |
\medskip |
| 89 | 18 |
If your next project requires you to program on the ML-level of Isabelle, |
|
106
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
parents:
102
diff
changeset
|
19 |
then this tutorial is for you. It will guide you through the first steps of |
| 89 | 20 |
Isabelle programming, and also explain tricks of the trade. The best way to |
21 |
get to know the ML-level of Isabelle is by experimenting with the many code |
|
|
106
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
parents:
102
diff
changeset
|
22 |
examples included in the tutorial. The code is as far as possible checked |
| 254 | 23 |
against the Isabelle distribution.\footnote{\input{version}} If something does not work,
|
|
235
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
24 |
then please let us know. It is impossible for us to know every environment, |
|
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
25 |
operating system or editor in which Isabelle is used. If you have comments, |
|
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
26 |
criticism or like to add to the tutorial, please feel free---you are most |
|
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
27 |
welcome! The tutorial is meant to be gentle and comprehensive. To achieve |
|
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
28 |
this we need your feedback. |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
30 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
section {* Intended Audience and Prior Knowledge *}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
32 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
text {*
|
|
106
bdd82350cf22
renamed in the pdf all instances of cookbook to tutorial (in order to sound more serious)
Christian Urban <urbanc@in.tum.de>
parents:
102
diff
changeset
|
34 |
This tutorial targets readers who already know how to use Isabelle for |
| 75 | 35 |
writing theories and proofs. We also assume that readers are familiar with |
36 |
the functional programming language ML, the language in which most of |
|
37 |
Isabelle is implemented. If you are unfamiliar with either of these two |
|
38 |
subjects, you should first work through the Isabelle/HOL tutorial |
|
39 |
\cite{isa-tutorial} or Paulson's book on ML \cite{paulson-ml2}.
|
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
40 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
|
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
42 |
section {* Existing Documentation *}
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
44 |
text {*
|
|
43
02f76f1b6e7b
added positions to anti-quotations; removed old antiquotation_setup; tuned the text a bit
Christian Urban <urbanc@in.tum.de>
parents:
42
diff
changeset
|
45 |
The following documentation about Isabelle programming already exists (and is |
|
02f76f1b6e7b
added positions to anti-quotations; removed old antiquotation_setup; tuned the text a bit
Christian Urban <urbanc@in.tum.de>
parents:
42
diff
changeset
|
46 |
part of the distribution of Isabelle): |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
47 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
\begin{description}
|
|
162
3fb9f820a294
some additions to the simplifier section and general tuning
Christian Urban <urbanc@in.tum.de>
parents:
156
diff
changeset
|
49 |
\item[The Isabelle/Isar Implementation Manual] describes Isabelle |
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
50 |
from a high-level perspective, documenting both the underlying |
| 6 | 51 |
concepts and some of the interfaces. |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
|
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
53 |
\item[The Isabelle Reference Manual] is an older document that used |
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
54 |
to be the main reference of Isabelle at a time when all proof scripts |
| 89 | 55 |
were written on the ML-level. Many parts of this manual are outdated |
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
56 |
now, but some parts, particularly the chapters on tactics, are still |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
57 |
useful. |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
58 |
|
|
153
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
59 |
\item[The Isar Reference Manual] provides specification material (like grammars, |
| 298 | 60 |
examples and so on) about Isar and its implementation. |
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
61 |
\end{description}
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
|
| 234 | 63 |
Then of course there are: |
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
64 |
|
|
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
65 |
\begin{description}
|
| 234 | 66 |
\item[The Isabelle sources.] They are the ultimate reference for how |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
67 |
things really work. Therefore you should not hesitate to look at the |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
68 |
way things are actually implemented. More importantly, it is often |
| 89 | 69 |
good to look at code that does similar things as you want to do and |
| 254 | 70 |
learn from it. The UNIX command \mbox{@{text "grep -R"}} is
|
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
71 |
often your best friend while programming with Isabelle, or |
|
263
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
72 |
hypersearch if you program using jEdit under MacOSX. To understand the sources, |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
73 |
it is often also necessary to track the change history of a file or |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
74 |
files. The Mercurial repository\footnote{\url{http://isabelle.in.tum.de/repos/isabelle/}}
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
75 |
for Isabelle provides convenient interfaces to query the history of |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
76 |
files and ``change sets''. |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
\end{description}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
79 |
|
| 252 | 80 |
section {* Typographic Conventions *}
|
|
68
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
81 |
|
|
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
82 |
text {*
|
|
181
5baaabe1ab92
updated to new method_setup
Christian Urban <urbanc@in.tum.de>
parents:
180
diff
changeset
|
83 |
All ML-code in this tutorial is typeset in shaded boxes, like the following |
| 89 | 84 |
ML-expression: |
| 75 | 85 |
|
86 |
\begin{isabelle}
|
|
87 |
\begin{graybox}
|
|
|
85
b02904872d6b
better handling of {* and *}
Christian Urban <urbanc@in.tum.de>
parents:
84
diff
changeset
|
88 |
\isacommand{ML}~@{text "\<verbopen>"}\isanewline
|
| 75 | 89 |
\hspace{5mm}@{ML "3 + 4"}\isanewline
|
|
85
b02904872d6b
better handling of {* and *}
Christian Urban <urbanc@in.tum.de>
parents:
84
diff
changeset
|
90 |
@{text "\<verbclose>"}
|
| 75 | 91 |
\end{graybox}
|
92 |
\end{isabelle}
|
|
93 |
||
|
195
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
94 |
These boxes correspond to how code can be processed inside the interactive |
| 89 | 95 |
environment of Isabelle. It is therefore easy to experiment with what is |
96 |
displayed. However, for better readability we will drop the enclosing |
|
97 |
\isacommand{ML}~@{text "\<verbopen> \<dots> \<verbclose>"} and just write:
|
|
| 75 | 98 |
|
| 81 | 99 |
|
| 75 | 100 |
@{ML [display,gray] "3 + 4"}
|
101 |
||
| 89 | 102 |
Whenever appropriate we also show the response the code |
| 81 | 103 |
generates when evaluated. This response is prefixed with a |
|
108
8bea3f74889d
added to the tactical chapter; polished; added the tabularstar environment (which is just tabular*)
Christian Urban <urbanc@in.tum.de>
parents:
107
diff
changeset
|
104 |
@{text [quotes] ">"}, like:
|
| 75 | 105 |
|
106 |
@{ML_response [display,gray] "3 + 4" "7"}
|
|
107 |
||
|
195
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
108 |
The user-level commands of Isabelle (i.e., the non-ML code) are written |
|
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
109 |
in \isacommand{bold face} (e.g., \isacommand{lemma}, \isacommand{apply},
|
|
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
110 |
\isacommand{foobar} and so on). We use @{text "$ \<dots>"} to indicate that a
|
| 234 | 111 |
command needs to be run in a UNIX-shell, for example: |
| 75 | 112 |
|
|
181
5baaabe1ab92
updated to new method_setup
Christian Urban <urbanc@in.tum.de>
parents:
180
diff
changeset
|
113 |
@{text [display] "$ grep -R ThyOutput *"}
|
| 75 | 114 |
|
| 89 | 115 |
Pointers to further information and Isabelle files are typeset in |
|
195
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
116 |
\textit{italic} and highlighted as follows:
|
| 75 | 117 |
|
118 |
\begin{readmore}
|
|
|
102
5e309df58557
general cleaning up; deleted antiquotation ML_text; adjusted pathnames of various files in the distribution
Christian Urban <urbanc@in.tum.de>
parents:
101
diff
changeset
|
119 |
Further information or pointers to files. |
| 75 | 120 |
\end{readmore}
|
121 |
||
|
182
4d0e2edd476d
added hyperlinks for every file pointer
Christian Urban <urbanc@in.tum.de>
parents:
181
diff
changeset
|
122 |
The pointers to Isabelle files are hyperlinked to the tip of the Mercurial |
|
4d0e2edd476d
added hyperlinks for every file pointer
Christian Urban <urbanc@in.tum.de>
parents:
181
diff
changeset
|
123 |
repository of Isabelle at \href{http://isabelle.in.tum.de/repos/isabelle/}
|
|
4d0e2edd476d
added hyperlinks for every file pointer
Christian Urban <urbanc@in.tum.de>
parents:
181
diff
changeset
|
124 |
{http://isabelle.in.tum.de/repos/isabelle/}.
|
|
4d0e2edd476d
added hyperlinks for every file pointer
Christian Urban <urbanc@in.tum.de>
parents:
181
diff
changeset
|
125 |
|
| 177 | 126 |
A few exercises are scattered around the text. Their solutions are given |
| 156 | 127 |
in Appendix~\ref{ch:solutions}. Of course, you learn most, if you first try
|
|
162
3fb9f820a294
some additions to the simplifier section and general tuning
Christian Urban <urbanc@in.tum.de>
parents:
156
diff
changeset
|
128 |
to solve the exercises on your own, and then look at the solutions. |
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
129 |
*} |
| 156 | 130 |
|
|
263
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
131 |
section {* Aaaaargh! My Code Does not Work Anymore *}
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
132 |
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
133 |
text {*
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
134 |
One unpleasant aspect of any code development inside a larger system is that |
| 264 | 135 |
one has to aim at a ``moving target''. The Isabelle system is no exception. Every |
|
263
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
136 |
update lets potentially all hell break loose, because other developers have |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
137 |
changed code you are relying on. Cursing is somewhat helpful in such situations, |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
138 |
but taking the view that incompatible code changes are a fact of life |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
139 |
might be more gratifying. Isabelle is a research project. In most circumstances |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
140 |
it is just impossible to make research backward compatible (imagine Darwin |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
141 |
attempting to make the Theory of Evolution backward compatible). |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
142 |
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
143 |
However, there are a few steps you can take to mitigate unwanted interferences |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
144 |
with code changes from other developers. First, you can base your code on the latest |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
145 |
stable release of Isabelle (it is aimed to have one such release at least |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
146 |
once every year). This |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
147 |
might cut you off from the latest feature |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
148 |
implemented in Isabelle, but at least you do not have to track side-steps |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
149 |
or dead-ends in the Isabelle development. Of course this means also you have |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
150 |
to synchronise your code at the next stable release. Another possibility |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
151 |
is to get your code into the Isabelle distribution. For this you have |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
152 |
to convince other developers that your code or project is of general interest. |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
153 |
If you managed to do this, then the problem of the moving target goes |
| 298 | 154 |
away, because when checking in new code, developers are strongly urged to |
155 |
test it against Isabelle's code base. If your project is part of that code base, |
|
|
265
c354e45d80d2
small changes for latest changes in Isabelle
Christian Urban <urbanc@in.tum.de>
parents:
264
diff
changeset
|
156 |
then maintenance is done by others. Unfortunately, this might not |
|
263
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
157 |
be a helpful advice for all types of projects. A lower threshold for inclusion has the |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
158 |
Archive of Formalised Proofs, short AFP.\footnote{\url{http://afp.sourceforge.net/}}
|
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
159 |
This archive has been created mainly for formalisations that are |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
160 |
interesting but not necessarily of general interest. If you have ML-code as |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
161 |
part of a formalisation, then this might be the right place for you. There |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
162 |
is no problem with updating your code after submission. At the moment |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
163 |
developers are not as diligent with checking their code against the AFP than |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
164 |
with checking agains the distribution, but generally problems will be caught |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
165 |
and the developer, who caused them, is expected to fix them. So also |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
166 |
in this case code maintenance is done for you. |
| 298 | 167 |
|
|
263
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
168 |
*} |
|
195c4444dff7
added section about code maintenance and added an example for antiquotations
Christian Urban <urbanc@in.tum.de>
parents:
262
diff
changeset
|
169 |
|
| 252 | 170 |
section {* Some Naming Conventions in the Isabelle Sources *}
|
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
171 |
|
|
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
172 |
text {*
|
| 254 | 173 |
There are a few naming conventions in the Isabelle code that might aid reading |
174 |
and writing code. (Remember that code is written once, but read many |
|
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
175 |
times.) The most important conventions are: |
|
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
176 |
|
|
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
177 |
\begin{itemize}
|
| 302 | 178 |
\item @{text t}, @{text u}, @{text trm} for (raw) terms; ML-type: @{ML_type term}
|
| 234 | 179 |
\item @{text ct}, @{text cu} for certified terms; ML-type: @{ML_type cterm}
|
180 |
\item @{text "ty"}, @{text T}, @{text U} for (raw) types; ML-type: @{ML_type typ}
|
|
181 |
\item @{text th}, @{text thm} for theorems; ML-type: @{ML_type thm}
|
|
182 |
\item @{text "foo_tac"} for tactics; ML-type: @{ML_type tactic}
|
|
183 |
\item @{text thy} for theories; ML-type: @{ML_type theory}
|
|
184 |
\item @{text ctxt} for proof contexts; ML-type: @{ML_type Proof.context}
|
|
185 |
\item @{text lthy} for local theories; ML-type: @{ML_type local_theory}
|
|
186 |
\item @{text context} for generic contexts; ML-type @{ML_type Context.generic}
|
|
|
235
dc955603d813
explained uses and use commands
Christian Urban <urbanc@in.tum.de>
parents:
234
diff
changeset
|
187 |
\item @{text mx} for mixfix syntax annotations; ML-type @{ML_type mixfix}
|
|
248
11851b20fb78
added more to the pretty section and updated the acknowledgements
Christian Urban <urbanc@in.tum.de>
parents:
235
diff
changeset
|
188 |
\item @{text prt} for pretty printing; ML-type @{ML_type Pretty.T}
|
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
189 |
\end{itemize}
|
|
68
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
190 |
*} |
|
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
191 |
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
192 |
section {* Acknowledgements *}
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
193 |
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
194 |
text {*
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
195 |
Financial support for this tutorial was provided by the German |
| 122 | 196 |
Research Council (DFG) under grant number URB 165/5-1. The following |
| 156 | 197 |
people contributed to the text: |
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
198 |
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
199 |
\begin{itemize}
|
| 122 | 200 |
\item {\bf Stefan Berghofer} wrote nearly all of the ML-code of the
|
201 |
\simpleinductive-package and the code for the @{text
|
|
| 264 | 202 |
"chunk"}-antiquotation. He also wrote the first version of this chapter |
| 122 | 203 |
describing the package and has been helpful \emph{beyond measure} with
|
204 |
answering questions about Isabelle. |
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
205 |
|
|
248
11851b20fb78
added more to the pretty section and updated the acknowledgements
Christian Urban <urbanc@in.tum.de>
parents:
235
diff
changeset
|
206 |
\item {\bf Jasmin Blanchette} helped greatly with section \ref{sec:pretty}.
|
|
11851b20fb78
added more to the pretty section and updated the acknowledgements
Christian Urban <urbanc@in.tum.de>
parents:
235
diff
changeset
|
207 |
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
208 |
\item {\bf Sascha Böhme} contributed the recipes in \ref{rec:timeout},
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
209 |
\ref{rec:config}, \ref{rec:storingdata}, \ref{rec:external} and \ref{rec:oracle}.
|
|
167
3e30ea95c7aa
added temporarily some timing test about conversions and simprocs
Christian Urban <urbanc@in.tum.de>
parents:
162
diff
changeset
|
210 |
He also wrote section \ref{sec:conversion} and helped with recipe \ref{rec:timing}.
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
211 |
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
212 |
\item {\bf Jeremy Dawson} wrote the first version of the chapter
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
213 |
about parsing. |
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
214 |
|
|
180
9c25418db6f0
added a recipy about SAT solvers
Christian Urban <urbanc@in.tum.de>
parents:
177
diff
changeset
|
215 |
\item {\bf Armin Heller} helped with recipe \ref{rec:sat}.
|
|
9c25418db6f0
added a recipy about SAT solvers
Christian Urban <urbanc@in.tum.de>
parents:
177
diff
changeset
|
216 |
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
217 |
\item {\bf Alexander Krauss} wrote the first version of the ``first-steps''
|
|
293
0a567f923b42
slightly changed exercises about rev_sum
Christian Urban <urbanc@in.tum.de>
parents:
265
diff
changeset
|
218 |
chapter and also contributed the material on @{ML_functor Named_Thms}.
|
| 194 | 219 |
|
| 207 | 220 |
\item {\bf Christian Sternagel} proofread the tutorial and made
|
|
293
0a567f923b42
slightly changed exercises about rev_sum
Christian Urban <urbanc@in.tum.de>
parents:
265
diff
changeset
|
221 |
many improvemets to the text. |
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
222 |
\end{itemize}
|
|
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
223 |
|
| 121 | 224 |
Please let me know of any omissions. Responsibility for any remaining |
|
153
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
225 |
errors lies with me.\bigskip |
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
226 |
|
|
233
61085dd44e8c
added a section about naming conventions
Christian Urban <urbanc@in.tum.de>
parents:
228
diff
changeset
|
227 |
\vspace{5cm}
|
|
153
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
228 |
{\Large\bf
|
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
229 |
This document is still in the process of being written! All of the |
| 192 | 230 |
text is still under construction. Sections and |
|
153
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
231 |
chapters that are under \underline{heavy} construction are marked
|
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
232 |
with TBD.} |
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
233 |
|
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
234 |
\vfill |
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
235 |
This document was compiled with:\\ |
| 228 | 236 |
\input{version}\\
|
237 |
\input{pversion}
|
|
|
119
4536782969fa
added an acknowledgement section
Christian Urban <urbanc@in.tum.de>
parents:
108
diff
changeset
|
238 |
*} |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
239 |
|
|
153
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
240 |
|
|
c22b507e1407
general polishing; added versioning to the document
Christian Urban <urbanc@in.tum.de>
parents:
151
diff
changeset
|
241 |
|
|
195
7305beb69893
corrected typos + some small reformulations
griff@colo2-c703.uibk.ac.at
parents:
192
diff
changeset
|
242 |
end |