| author | Christian Urban <urbanc@in.tum.de> |
| Fri, 28 Nov 2008 05:56:28 +0100 | |
| changeset 52 | a04bdee4fb1e |
| parent 49 | a0edabf14457 |
| child 53 | 0c3580c831a4 |
| permissions | -rw-r--r-- |
|
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:
diff
changeset
|
1 |
theory Readme |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
imports Base |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
chapter {* Comments for Authors of the Cookbook *}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
text {*
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
\begin{itemize}
|
| 49 | 10 |
\item You can include references to other Isabelle manuals using the |
|
47
4daf913fdbe1
hakked latex so that it does not display ML {* *}; general tuning
Christian Urban <urbanc@in.tum.de>
parents:
44
diff
changeset
|
11 |
reference names from those manuals. To do this the following |
|
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:
diff
changeset
|
12 |
four latex commands are defined: |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
\begin{center}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
15 |
\begin{tabular}{l|c|c}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
& Chapters & Sections\\\hline |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
Implementation Manual & @{ML_text "\\ichcite{\<dots>}"} & @{ML_text "\\isccite{\<dots>}"}\\
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
Isar Reference Manual & @{ML_text "\\rchcite{\<dots>}"} & @{ML_text "\\rsccite{\<dots>}"}\\
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
\end{tabular}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
\end{center}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
So @{ML_text "\\ichcite{ch:logic}"} results in a reference for the chapter about logic
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
in the implementation manual, namely \ichcite{ch:logic}.
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
\item There are various document antiquotations defined for the |
| 52 | 26 |
cookbook. This allows to check the written text against the current |
|
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:
diff
changeset
|
27 |
Isabelle code and also that responses of the ML-compiler can be shown. |
| 52 | 28 |
Therefore authors are strongly encouraged to use antiquotations wherever |
29 |
it is appropriate. |
|
30 |
||
31 |
The following antiquotations are in use: |
|
|
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:
diff
changeset
|
32 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
\begin{itemize}
|
| 52 | 34 |
\item[$\bullet$] {\bf @{text "@{ML \"\<dots>\"}"}} Should be used for value
|
35 |
computations. It checks whether the ML-expression is valid ML-code, but only |
|
36 |
works for closed expression. |
|
37 |
||
38 |
\item[$\bullet$] {\bf @{text "@{ML_open \"\<dots>\" for \<dots>}"}} Works like @{ML_text
|
|
39 |
ML}-antiquotation except, that it can also deal with open expressions and |
|
40 |
expressions that need to be evaluated inside structures. The free variables |
|
41 |
or structures need to be listed after the @{ML_text "for"}. For example
|
|
| 49 | 42 |
@{text "@{ML_open \"a + b\" for a b}"}.
|
| 52 | 43 |
|
| 49 | 44 |
\item[$\bullet$] {\bf @{text "@{ML_response \"\<dots>\" \"\<dots>\"}"}} The first
|
45 |
expression is checked like in the antiquotation @{text "@{ML \"\<dots>\"}"}; the
|
|
46 |
second is a pattern that specifies the result the first expression |
|
47 |
produces. This specification can contain @{text [quotes] "\<dots>"} for parts that
|
|
48 |
can be omitted. The actual response will be checked against the |
|
49 |
specification. For example @{text "@{ML_response \"(1+2,3)\"
|
|
50 |
\"(3,\<dots>)\"}"}. This antiquotation can only be used when the result can be |
|
51 |
constructed. It does not work when the code produces an exception or is an |
|
52 |
abstract datatype (like @{ML_type thm} or @{ML_type cterm}).
|
|
53 |
||
| 52 | 54 |
\item[$\bullet$] {\bf @{text "@{ML_response_fake \"\<dots>\" \"\<dots>\"}"}} Works like
|
55 |
the @{ML_text ML_response}-anti\-quotation, except that the
|
|
56 |
result-specification is not checked. |
|
57 |
||
58 |
\item[$\bullet$] {\bf @{text "@{ML_file \"\<dots>\"}"}} Should be used when
|
|
59 |
referring to a file. It checks whether the file exists. |
|
|
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:
diff
changeset
|
60 |
\end{itemize}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
|
| 52 | 62 |
|
| 49 | 63 |
\item Functions and value bindings cannot be defined inside antiquotations; they need |
64 |
to be included inside \isacommand{ML} \isa{\isacharverbatimopen \ldots \isacharverbatimclose}
|
|
65 |
environments. Some \LaTeX-hack, however, does not print the environment markers. |
|
|
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:
diff
changeset
|
66 |
|
| 52 | 67 |
\item Line numbers for code can be shown using |
68 |
\isacommand{ML} \isa{\%linenumbers} \isa{\isacharverbatimopen \ldots \isacharverbatimclose}.
|
|
69 |
||
|
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:
diff
changeset
|
70 |
\end{itemize}
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
71 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
*} |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
|
| 49 | 75 |
|
|
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:
diff
changeset
|
76 |
end |