author | wenzelm |
Fri, 27 Jun 2014 15:41:26 +0200 | |
changeset 57414 | fe1be2844fda |
parent 57413 | c14af83bd8db |
child 57439 | 0e41f26a0250 |
permissions | -rw-r--r-- |
28224 | 1 |
theory Misc |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
41512
diff
changeset
|
2 |
imports Base |
28224 | 3 |
begin |
4 |
||
5 |
chapter {* Miscellaneous tools \label{ch:tools} *} |
|
6 |
||
7 |
text {* |
|
8 |
Subsequently we describe various Isabelle related utilities, given |
|
9 |
in alphabetical order. |
|
10 |
*} |
|
11 |
||
12 |
||
57330
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
13 |
section {* Theory graph browser \label{sec:browse} *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
14 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
15 |
text {* The Isabelle graph browser is a general tool for visualizing |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
16 |
dependency graphs. Certain nodes of the graph (i.e.\ theories) can |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
17 |
be grouped together in ``directories'', whose contents may be |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
18 |
hidden, thus enabling the user to collapse irrelevant portions of |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
19 |
information. The browser is written in Java, it can be used both as |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
20 |
a stand-alone application and as an applet. *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
21 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
22 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
23 |
subsection {* Invoking the graph browser *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
24 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
25 |
text {* The stand-alone version of the graph browser is wrapped up as |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
26 |
@{tool_def browser}: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
27 |
\begin{ttbox} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
28 |
Usage: isabelle browser [OPTIONS] [GRAPHFILE] |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
29 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
30 |
Options are: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
31 |
-b Admin/build only |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
32 |
-c cleanup -- remove GRAPHFILE after use |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
33 |
-o FILE output to FILE (ps, eps, pdf) |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
34 |
\end{ttbox} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
35 |
When no file name is specified, the browser automatically changes to |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
36 |
the directory @{setting ISABELLE_BROWSER_INFO}. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
37 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
38 |
\medskip The @{verbatim "-b"} option indicates that this is for |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
39 |
administrative build only, i.e.\ no browser popup if no files are |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
40 |
given. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
41 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
42 |
The @{verbatim "-c"} option causes the input file to be removed |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
43 |
after use. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
44 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
45 |
The @{verbatim "-o"} option indicates batch-mode operation, with the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
46 |
output written to the indicated file; note that @{verbatim pdf} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
47 |
produces an @{verbatim eps} copy as well. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
48 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
49 |
\medskip The applet version of the browser is part of the standard |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
50 |
WWW theory presentation, see the link ``theory dependencies'' within |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
51 |
each session index. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
52 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
53 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
54 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
55 |
subsection {* Using the graph browser *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
56 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
57 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
58 |
The browser's main window, which is shown in |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
59 |
\figref{fig:browserwindow}, consists of two sub-windows. In the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
60 |
left sub-window, the directory tree is displayed. The graph itself |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
61 |
is displayed in the right sub-window. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
62 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
63 |
\begin{figure}[ht] |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
64 |
\includegraphics[width=\textwidth]{browser_screenshot} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
65 |
\caption{\label{fig:browserwindow} Browser main window} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
66 |
\end{figure} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
67 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
68 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
69 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
70 |
subsubsection {* The directory tree window *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
71 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
72 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
73 |
We describe the usage of the directory browser and the meaning of |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
74 |
the different items in the browser window. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
75 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
76 |
\begin{itemize} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
77 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
78 |
\item A red arrow before a directory name indicates that the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
79 |
directory is currently ``folded'', i.e.~the nodes in this directory |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
80 |
are collapsed to one single node. In the right sub-window, the names |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
81 |
of nodes corresponding to folded directories are enclosed in square |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
82 |
brackets and displayed in red color. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
83 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
84 |
\item A green downward arrow before a directory name indicates that |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
85 |
the directory is currently ``unfolded''. It can be folded by |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
86 |
clicking on the directory name. Clicking on the name for a second |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
87 |
time unfolds the directory again. Alternatively, a directory can |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
88 |
also be unfolded by clicking on the corresponding node in the right |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
89 |
sub-window. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
90 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
91 |
\item Blue arrows stand before ordinary node names. When clicking on |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
92 |
such a name (i.e.\ that of a theory), the graph display window |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
93 |
focuses to the corresponding node. Double clicking invokes a text |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
94 |
viewer window in which the contents of the theory file are |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
95 |
displayed. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
96 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
97 |
\end{itemize} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
98 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
99 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
100 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
101 |
subsubsection {* The graph display window *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
102 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
103 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
104 |
When pointing on an ordinary node, an upward and a downward arrow is |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
105 |
shown. Initially, both of these arrows are green. Clicking on the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
106 |
upward or downward arrow collapses all predecessor or successor |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
107 |
nodes, respectively. The arrow's color then changes to red, |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
108 |
indicating that the predecessor or successor nodes are currently |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
109 |
collapsed. The node corresponding to the collapsed nodes has the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
110 |
name ``@{verbatim "[....]"}''. To uncollapse the nodes again, simply |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
111 |
click on the red arrow or on the node with the name ``@{verbatim |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
112 |
"[....]"}''. Similar to the directory browser, the contents of |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
113 |
theory files can be displayed by double clicking on the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
114 |
corresponding node. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
115 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
116 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
117 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
118 |
subsubsection {* The ``File'' menu *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
119 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
120 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
121 |
Due to Java Applet security restrictions this menu is only available |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
122 |
in the full application version. The meaning of the menu items is as |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
123 |
follows: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
124 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
125 |
\begin{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
126 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
127 |
\item[Open \dots] Open a new graph file. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
128 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
129 |
\item[Export to PostScript] Outputs the current graph in Postscript |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
130 |
format, appropriately scaled to fit on one single sheet of A4 paper. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
131 |
The resulting file can be printed directly. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
132 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
133 |
\item[Export to EPS] Outputs the current graph in Encapsulated |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
134 |
Postscript format. The resulting file can be included in other |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
135 |
documents. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
136 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
137 |
\item[Quit] Quit the graph browser. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
138 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
139 |
\end{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
140 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
141 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
142 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
143 |
subsection {* Syntax of graph definition files *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
144 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
145 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
146 |
A graph definition file has the following syntax: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
147 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
148 |
\begin{center}\small |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
149 |
\begin{tabular}{rcl} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
150 |
@{text graph} & @{text "="} & @{text "{ vertex"}~@{verbatim ";"}~@{text "}+"} \\ |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
151 |
@{text vertex} & @{text "="} & @{text "vertex_name vertex_ID dir_name ["}~@{verbatim "+"}~@{text "] path ["}~@{verbatim "<"}~@{text "|"}~@{verbatim ">"}~@{text "] { vertex_ID }*"} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
152 |
\end{tabular} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
153 |
\end{center} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
154 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
155 |
The meaning of the items in a vertex description is as follows: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
156 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
157 |
\begin{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
158 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
159 |
\item[@{text vertex_name}] The name of the vertex. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
160 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
161 |
\item[@{text vertex_ID}] The vertex identifier. Note that there may |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
162 |
be several vertices with equal names, whereas identifiers must be |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
163 |
unique. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
164 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
165 |
\item[@{text dir_name}] The name of the ``directory'' the vertex |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
166 |
should be placed in. A ``@{verbatim "+"}'' sign after @{text |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
167 |
dir_name} indicates that the nodes in the directory are initially |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
168 |
visible. Directories are initially invisible by default. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
169 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
170 |
\item[@{text path}] The path of the corresponding theory file. This |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
171 |
is specified relatively to the path of the graph definition file. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
172 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
173 |
\item[List of successor/predecessor nodes] A ``@{verbatim "<"}'' |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
174 |
sign before the list means that successor nodes are listed, a |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
175 |
``@{verbatim ">"}'' sign means that predecessor nodes are listed. If |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
176 |
neither ``@{verbatim "<"}'' nor ``@{verbatim ">"}'' is found, the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
177 |
browser assumes that successor nodes are listed. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
178 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
179 |
\end{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
180 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
181 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
182 |
|
48844 | 183 |
section {* Resolving Isabelle components \label{sec:tool-components} *} |
184 |
||
185 |
text {* |
|
186 |
The @{tool_def components} tool resolves Isabelle components: |
|
187 |
\begin{ttbox} |
|
188 |
Usage: isabelle components [OPTIONS] [COMPONENTS ...] |
|
189 |
||
190 |
Options are: |
|
50653
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
191 |
-I init user settings |
48844 | 192 |
-R URL component repository |
193 |
(default $ISABELLE_COMPONENT_REPOSITORY) |
|
53435 | 194 |
-a resolve all missing components |
48844 | 195 |
-l list status |
196 |
||
197 |
Resolve Isabelle components via download and installation. |
|
198 |
COMPONENTS are identified via base name. |
|
199 |
||
200 |
ISABELLE_COMPONENT_REPOSITORY="http://isabelle.in.tum.de/components" |
|
201 |
\end{ttbox} |
|
202 |
||
203 |
Components are initialized as described in \secref{sec:components} |
|
204 |
in a permissive manner, which can mark components as ``missing''. |
|
205 |
This state is amended by letting @{tool "components"} download and |
|
206 |
unpack components that are published on the default component |
|
54703 | 207 |
repository @{url "http://isabelle.in.tum.de/components/"} in |
48844 | 208 |
particular. |
209 |
||
210 |
Option @{verbatim "-R"} specifies an alternative component |
|
211 |
repository. Note that @{verbatim "file:///"} URLs can be used for |
|
212 |
local directories. |
|
213 |
||
214 |
Option @{verbatim "-a"} selects all missing components to be |
|
53435 | 215 |
resolved. Explicit components may be named as command |
48844 | 216 |
line-arguments as well. Note that components are uniquely |
217 |
identified by their base name, while the installation takes place in |
|
218 |
the location that was specified in the attempt to initialize the |
|
219 |
component before. |
|
220 |
||
221 |
Option @{verbatim "-l"} lists the current state of available and |
|
222 |
missing components with their location (full name) within the |
|
50653
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
223 |
file-system. |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
224 |
|
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
225 |
Option @{verbatim "-I"} initializes the user settings file to |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
226 |
subscribe to the standard components specified in the Isabelle |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
227 |
repository clone --- this does not make any sense for regular |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
228 |
Isabelle releases. If the file already exists, it needs to be |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
229 |
edited manually according to the printed explanation. |
5c85f8b80b95
simplified quick start via "isabelle components -I";
wenzelm
parents:
50132
diff
changeset
|
230 |
*} |
48844 | 231 |
|
232 |
||
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
233 |
section {* Displaying documents \label{sec:tool-display} *} |
28224 | 234 |
|
48602 | 235 |
text {* The @{tool_def display} tool displays documents in DVI or PDF |
28224 | 236 |
format: |
237 |
\begin{ttbox} |
|
54683
cf48ddc266e5
clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents:
53435
diff
changeset
|
238 |
Usage: isabelle display DOCUMENT |
28224 | 239 |
|
54683
cf48ddc266e5
clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents:
53435
diff
changeset
|
240 |
Display DOCUMENT (in DVI or PDF format). |
28224 | 241 |
\end{ttbox} |
242 |
||
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
243 |
\medskip The settings @{setting DVI_VIEWER} and @{setting |
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
244 |
PDF_VIEWER} determine the programs for viewing the corresponding |
54683
cf48ddc266e5
clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents:
53435
diff
changeset
|
245 |
file formats. Normally this opens the document via the desktop |
cf48ddc266e5
clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents:
53435
diff
changeset
|
246 |
environment, potentially in an asynchronous manner with re-use of |
cf48ddc266e5
clarified "isabelle display" and 'display_drafts': re-use file and program instance, open asynchronously via desktop environment;
wenzelm
parents:
53435
diff
changeset
|
247 |
previews views. |
28224 | 248 |
*} |
249 |
||
250 |
||
251 |
section {* Viewing documentation \label{sec:tool-doc} *} |
|
252 |
||
253 |
text {* |
|
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
254 |
The @{tool_def doc} tool displays Isabelle documentation: |
28224 | 255 |
\begin{ttbox} |
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
256 |
Usage: isabelle doc [DOC ...] |
28224 | 257 |
|
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
258 |
View Isabelle documentation. |
28224 | 259 |
\end{ttbox} |
260 |
If called without arguments, it lists all available documents. Each |
|
261 |
line starts with an identifier, followed by a short description. Any |
|
52444
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
262 |
of these identifiers may be specified as arguments, in order to |
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
263 |
display the corresponding document (see also |
2cfe6656d6d6
slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents:
52052
diff
changeset
|
264 |
\secref{sec:tool-display}). |
28224 | 265 |
|
266 |
\medskip The @{setting ISABELLE_DOCS} setting specifies the list of |
|
267 |
directories (separated by colons) to be scanned for documentations. |
|
268 |
*} |
|
269 |
||
270 |
||
57330
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
271 |
section {* Proof General / Emacs *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
272 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
273 |
text {* The @{tool_def emacs} tool invokes a version of Emacs and |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
274 |
Proof General\footnote{@{url "http://proofgeneral.inf.ed.ac.uk/"}} within the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
275 |
regular Isabelle settings environment (\secref{sec:settings}). This |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
276 |
is more convenient than starting Emacs separately, loading the Proof |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
277 |
General LISP files, and then attempting to start Isabelle with |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
278 |
dynamic @{setting PATH} lookup etc., although it might fail if a |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
279 |
different version of Proof General is already part of the Emacs |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
280 |
installation of the operating system. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
281 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
282 |
The actual interface script is part of the Proof General |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
283 |
distribution; its usage depends on the particular version. There |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
284 |
are some options available, such as @{verbatim "-l"} for passing the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
285 |
logic image to be used by default, or @{verbatim "-m"} to tune the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
286 |
standard print mode of the prover process. The following Isabelle |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
287 |
settings are particularly important for Proof General: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
288 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
289 |
\begin{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
290 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
291 |
\item[@{setting_def PROOFGENERAL_HOME}] points to the main |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
292 |
installation directory of the Proof General distribution. This is |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
293 |
implicitly provided for versions of Proof General that are |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
294 |
distributed as Isabelle component, see also \secref{sec:components}; |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
295 |
otherwise it needs to be configured manually. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
296 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
297 |
\item[@{setting_def PROOFGENERAL_OPTIONS}] is implicitly prefixed to |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
298 |
the command line of any invocation of the Proof General @{verbatim |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
299 |
interface} script. This allows to provide persistent default |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
300 |
options for the invocation of \texttt{isabelle emacs}. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
301 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
302 |
\end{description} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
303 |
*} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
304 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
305 |
|
47828 | 306 |
section {* Shell commands within the settings environment \label{sec:tool-env} *} |
307 |
||
48602 | 308 |
text {* The @{tool_def env} tool is a direct wrapper for the standard |
309 |
@{verbatim "/usr/bin/env"} command on POSIX systems, running within |
|
310 |
the Isabelle settings environment (\secref{sec:settings}). |
|
47828 | 311 |
|
312 |
The command-line arguments are that of the underlying version of |
|
313 |
@{verbatim env}. For example, the following invokes an instance of |
|
314 |
the GNU Bash shell within the Isabelle environment: |
|
315 |
\begin{alltt} |
|
316 |
isabelle env bash |
|
317 |
\end{alltt} |
|
318 |
*} |
|
319 |
||
320 |
||
28224 | 321 |
section {* Inspecting the settings environment \label{sec:tool-getenv} *} |
322 |
||
48602 | 323 |
text {* The Isabelle settings environment --- as provided by the |
28224 | 324 |
site-default and user-specific settings files --- can be inspected |
48602 | 325 |
with the @{tool_def getenv} tool: |
28224 | 326 |
\begin{ttbox} |
48602 | 327 |
Usage: isabelle getenv [OPTIONS] [VARNAMES ...] |
28224 | 328 |
|
329 |
Options are: |
|
330 |
-a display complete environment |
|
331 |
-b print values only (doesn't work for -a) |
|
31497 | 332 |
-d FILE dump complete environment to FILE |
333 |
(null terminated entries) |
|
28224 | 334 |
|
335 |
Get value of VARNAMES from the Isabelle settings. |
|
336 |
\end{ttbox} |
|
337 |
||
338 |
With the @{verbatim "-a"} option, one may inspect the full process |
|
339 |
environment that Isabelle related programs are run in. This usually |
|
340 |
contains much more variables than are actually Isabelle settings. |
|
341 |
Normally, output is a list of lines of the form @{text |
|
342 |
name}@{verbatim "="}@{text value}. The @{verbatim "-b"} option |
|
343 |
causes only the values to be printed. |
|
31497 | 344 |
|
345 |
Option @{verbatim "-d"} produces a dump of the complete environment |
|
346 |
to the specified file. Entries are terminated by the ASCII null |
|
347 |
character, i.e.\ the C string terminator. |
|
28224 | 348 |
*} |
349 |
||
350 |
||
351 |
subsubsection {* Examples *} |
|
352 |
||
48815 | 353 |
text {* Get the location of @{setting ISABELLE_HOME_USER} where |
354 |
user-specific information is stored: |
|
28224 | 355 |
\begin{ttbox} |
48815 | 356 |
isabelle getenv ISABELLE_HOME_USER |
28224 | 357 |
\end{ttbox} |
358 |
||
48815 | 359 |
\medskip Get the value only of the same settings variable, which is |
360 |
particularly useful in shell scripts: |
|
28224 | 361 |
\begin{ttbox} |
28504
7ad7d7d6df47
simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
wenzelm
parents:
28253
diff
changeset
|
362 |
isabelle getenv -b ISABELLE_OUTPUT |
28224 | 363 |
\end{ttbox} |
364 |
*} |
|
365 |
||
366 |
||
367 |
section {* Installing standalone Isabelle executables \label{sec:tool-install} *} |
|
368 |
||
48602 | 369 |
text {* By default, the main Isabelle binaries (@{executable |
370 |
"isabelle"} etc.) are just run from their location within the |
|
371 |
distribution directory, probably indirectly by the shell through its |
|
372 |
@{setting PATH}. Other schemes of installation are supported by the |
|
373 |
@{tool_def install} tool: |
|
28224 | 374 |
\begin{ttbox} |
50132 | 375 |
Usage: isabelle install [OPTIONS] BINDIR |
28224 | 376 |
|
377 |
Options are: |
|
50132 | 378 |
-d DISTDIR refer to DISTDIR as Isabelle distribution |
28224 | 379 |
(default ISABELLE_HOME) |
380 |
||
50132 | 381 |
Install Isabelle executables with absolute references to the |
28224 | 382 |
distribution directory. |
383 |
\end{ttbox} |
|
384 |
||
385 |
The @{verbatim "-d"} option overrides the current Isabelle |
|
386 |
distribution directory as determined by @{setting ISABELLE_HOME}. |
|
387 |
||
50132 | 388 |
The @{text BINDIR} argument tells where executable wrapper scripts |
56439
95e2656b3b23
renamed "isabelle-process" to "isabelle_process", with shell function to avoid dynamic path lookups;
wenzelm
parents:
54703
diff
changeset
|
389 |
for @{executable "isabelle_process"} and @{executable isabelle} |
50132 | 390 |
should be placed, which is typically a directory in the shell's |
391 |
@{setting PATH}, such as @{verbatim "$HOME/bin"}. |
|
48815 | 392 |
|
50132 | 393 |
\medskip It is also possible to make symbolic links of the main |
394 |
Isabelle executables manually, but making separate copies outside |
|
395 |
the Isabelle distribution directory will not work! *} |
|
28224 | 396 |
|
397 |
||
398 |
section {* Creating instances of the Isabelle logo *} |
|
399 |
||
49072
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
400 |
text {* The @{tool_def logo} tool creates instances of the generic |
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
401 |
Isabelle logo as EPS and PDF, for inclusion in {\LaTeX} documents. |
28224 | 402 |
\begin{ttbox} |
49072
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
403 |
Usage: isabelle logo [OPTIONS] XYZ |
28224 | 404 |
|
49072
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
405 |
Create instance XYZ of the Isabelle logo (as EPS and PDF). |
28224 | 406 |
|
407 |
Options are: |
|
49072
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
408 |
-n NAME alternative output base name (default "isabelle_xyx") |
28224 | 409 |
-q quiet mode |
410 |
\end{ttbox} |
|
48936 | 411 |
|
49072
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
412 |
Option @{verbatim "-n"} specifies an altenative (base) name for the |
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
413 |
generated files. The default is @{verbatim "isabelle_"}@{text xyz} |
747835eb2782
"isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents:
48985
diff
changeset
|
414 |
in lower-case. |
48936 | 415 |
|
416 |
Option @{verbatim "-q"} omits printing of the result file name. |
|
417 |
||
418 |
\medskip Implementors of Isabelle tools and applications are |
|
419 |
encouraged to make derived Isabelle logos for their own projects |
|
420 |
using this template. *} |
|
28224 | 421 |
|
422 |
||
57330
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
423 |
section {* Plain TTY interaction \label{sec:tool-tty} *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
424 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
425 |
text {* |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
426 |
The @{tool_def tty} tool runs the Isabelle process interactively |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
427 |
within a plain terminal session: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
428 |
\begin{ttbox} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
429 |
Usage: isabelle tty [OPTIONS] |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
430 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
431 |
Options are: |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
432 |
-l NAME logic image name (default ISABELLE_LOGIC) |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
433 |
-m MODE add print mode for output |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
434 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
435 |
-p NAME line editor program name (default ISABELLE_LINE_EDITOR) |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
436 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
437 |
Run Isabelle process with plain tty interaction and line editor. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
438 |
\end{ttbox} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
439 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
440 |
The @{verbatim "-l"} option specifies the logic image. The |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
441 |
@{verbatim "-m"} option specifies additional print modes. The |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
442 |
@{verbatim "-p"} option specifies an alternative line editor (such |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
443 |
as the @{executable_def rlwrap} wrapper for GNU readline); the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
444 |
fall-back is to use raw standard input. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
445 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
446 |
\medskip Option @{verbatim "-o"} allows to override Isabelle system |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
447 |
options for this process, see also \secref{sec:system-options}. |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
448 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
449 |
Regular interaction works via the standard Isabelle/Isar toplevel |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
450 |
loop. The Isar command @{command exit} drops out into the |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
451 |
bare-bones ML system, which is occasionally useful for debugging of |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
452 |
the Isar infrastructure itself. Invoking @{ML Isar.loop}~@{verbatim |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
453 |
"();"} in ML will return to the Isar toplevel. *} |
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
454 |
|
d8a64a4cbfca
clarified role of old user interfaces as misc tools;
wenzelm
parents:
56439
diff
changeset
|
455 |
|
28224 | 456 |
section {* Output the version identifier of the Isabelle distribution *} |
457 |
||
458 |
text {* |
|
48602 | 459 |
The @{tool_def version} tool displays Isabelle version information: |
41511 | 460 |
\begin{ttbox} |
461 |
Usage: isabelle version [OPTIONS] |
|
462 |
||
463 |
Options are: |
|
464 |
-i short identification (derived from Mercurial id) |
|
465 |
||
466 |
Display Isabelle version information. |
|
467 |
\end{ttbox} |
|
468 |
||
469 |
\medskip The default is to output the full version string of the |
|
47827 | 470 |
Isabelle distribution, e.g.\ ``@{verbatim "Isabelle2012: May 2012"}. |
41511 | 471 |
|
472 |
The @{verbatim "-i"} option produces a short identification derived |
|
473 |
from the Mercurial id of the @{setting ISABELLE_HOME} directory. |
|
28224 | 474 |
*} |
475 |
||
476 |
||
477 |
section {* Convert XML to YXML *} |
|
478 |
||
479 |
text {* |
|
480 |
The @{tool_def yxml} tool converts a standard XML document (stdin) |
|
481 |
to the much simpler and more efficient YXML format of Isabelle |
|
482 |
(stdout). The YXML format is defined as follows. |
|
483 |
||
484 |
\begin{enumerate} |
|
485 |
||
486 |
\item The encoding is always UTF-8. |
|
487 |
||
488 |
\item Body text is represented verbatim (no escaping, no special |
|
489 |
treatment of white space, no named entities, no CDATA chunks, no |
|
490 |
comments). |
|
491 |
||
492 |
\item Markup elements are represented via ASCII control characters |
|
493 |
@{text "\<^bold>X = 5"} and @{text "\<^bold>Y = 6"} as follows: |
|
494 |
||
495 |
\begin{tabular}{ll} |
|
496 |
XML & YXML \\\hline |
|
497 |
@{verbatim "<"}@{text "name attribute"}@{verbatim "="}@{text "value \<dots>"}@{verbatim ">"} & |
|
498 |
@{text "\<^bold>X\<^bold>Yname\<^bold>Yattribute"}@{verbatim "="}@{text "value\<dots>\<^bold>X"} \\ |
|
499 |
@{verbatim "</"}@{text name}@{verbatim ">"} & @{text "\<^bold>X\<^bold>Y\<^bold>X"} \\ |
|
500 |
\end{tabular} |
|
501 |
||
502 |
There is no special case for empty body text, i.e.\ @{verbatim |
|
503 |
"<foo/>"} is treated like @{verbatim "<foo></foo>"}. Also note that |
|
504 |
@{text "\<^bold>X"} and @{text "\<^bold>Y"} may never occur in |
|
505 |
well-formed XML documents. |
|
506 |
||
507 |
\end{enumerate} |
|
508 |
||
509 |
Parsing YXML is pretty straight-forward: split the text into chunks |
|
510 |
separated by @{text "\<^bold>X"}, then split each chunk into |
|
511 |
sub-chunks separated by @{text "\<^bold>Y"}. Markup chunks start |
|
512 |
with an empty sub-chunk, and a second empty sub-chunk indicates |
|
513 |
close of an element. Any other non-empty chunk consists of plain |
|
44799 | 514 |
text. For example, see @{file "~~/src/Pure/PIDE/yxml.ML"} or |
515 |
@{file "~~/src/Pure/PIDE/yxml.scala"}. |
|
28224 | 516 |
|
517 |
YXML documents may be detected quickly by checking that the first |
|
518 |
two characters are @{text "\<^bold>X\<^bold>Y"}. |
|
519 |
*} |
|
520 |
||
521 |
end |