author | Christian Urban <urbanc@in.tum.de> |
Mon, 24 Nov 2008 02:51:08 +0100 | |
changeset 49 | a0edabf14457 |
parent 47 | 4daf913fdbe1 |
child 52 | a04bdee4fb1e |
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 |
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
|
26 |
cookbook so that written text can be kept in sync with the |
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. |
49 | 28 |
The are: |
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
|
29 |
|
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
|
30 |
\begin{itemize} |
49 | 31 |
\item[$\bullet$] {\bf @{text "@{ML \"\<dots>\"}"}} Should be used for value computations. It checks whether |
32 |
the ML-expression is valid ML-code, but only works for closed expression. |
|
33 |
\item[$\bullet$] {\bf @{text "@{ML_open \"\<dots>\" for \<dots>}"}} Works like @{ML_text ML}-antiquotation except, |
|
34 |
that it can also deal with open expressions and expressions that need to be evaluated inside structures. |
|
35 |
The free variables or structures need to be listed after the @{ML_text "for"}. For example |
|
36 |
@{text "@{ML_open \"a + b\" for a b}"}. |
|
37 |
\item[$\bullet$] {\bf @{text "@{ML_response \"\<dots>\" \"\<dots>\"}"}} The first |
|
38 |
expression is checked like in the antiquotation @{text "@{ML \"\<dots>\"}"}; the |
|
39 |
second is a pattern that specifies the result the first expression |
|
40 |
produces. This specification can contain @{text [quotes] "\<dots>"} for parts that |
|
41 |
can be omitted. The actual response will be checked against the |
|
42 |
specification. For example @{text "@{ML_response \"(1+2,3)\" |
|
43 |
\"(3,\<dots>)\"}"}. This antiquotation can only be used when the result can be |
|
44 |
constructed. It does not work when the code produces an exception or is an |
|
45 |
abstract datatype (like @{ML_type thm} or @{ML_type cterm}). |
|
46 |
||
47 |
\item[$\bullet$] {\bf @{text "@{ML_response_fake \"\<dots>\" \"\<dots>\"}"}} Works like the |
|
48 |
@{ML_text ML_response}-anti\-quotation, except that the result-specification is not |
|
49 |
checked. |
|
50 |
\item[$\bullet$] {\bf @{text "@{ML_file \"\<dots>\"}"}} Should be used when referring to a file. |
|
51 |
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
|
52 |
\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
|
53 |
|
49 | 54 |
\item Functions and value bindings cannot be defined inside antiquotations; they need |
55 |
to be included inside \isacommand{ML} \isa{\isacharverbatimopen \ldots \isacharverbatimclose} |
|
56 |
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
|
57 |
|
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
|
58 |
\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
|
59 |
|
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 |
*} |
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 |
|
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
|
62 |
|
49 | 63 |
|
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
|
64 |
end |