author | blanchet |
Thu, 03 Apr 2014 10:51:22 +0200 | |
changeset 56375 | 32e0da92c786 |
parent 54881 | dff57132cf18 |
child 56604 | 1b153b989860 |
permissions | -rw-r--r-- |
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
1 |
theory Interfaces |
43564
9864182c6bad
document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents:
32088
diff
changeset
|
2 |
imports Base |
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
3 |
begin |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
4 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
5 |
chapter {* User interfaces *} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
6 |
|
48573 | 7 |
section {* Isabelle/jEdit Prover IDE \label{sec:tool-jedit} *} |
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
8 |
|
48603 | 9 |
text {* The @{tool_def jedit} tool invokes a version of |
54703 | 10 |
jEdit\footnote{@{url "http://www.jedit.org/"}} that has been augmented |
51054 | 11 |
with some plugins to provide a fully-featured Prover IDE: |
48603 | 12 |
\begin{ttbox} Usage: isabelle jedit [OPTIONS] |
13 |
[FILES ...] |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
14 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
15 |
Options are: |
48573 | 16 |
-J OPTION add JVM runtime option (default JEDIT_JAVA_OPTIONS) |
17 |
-b build only |
|
48791 | 18 |
-d DIR include session directory |
48573 | 19 |
-f fresh build |
20 |
-j OPTION add jEdit runtime option (default JEDIT_OPTIONS) |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
21 |
-l NAME logic image name (default ISABELLE_LOGIC) |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
22 |
-m MODE add print mode for output |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
48985
diff
changeset
|
23 |
-n no build dialog for session image on startup |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
48985
diff
changeset
|
24 |
-s system build mode for session image |
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
25 |
|
54682 | 26 |
Start jEdit with Isabelle plugin setup and open theory FILES |
27 |
(default "\$USER_HOME/Scratch.thy"). |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
28 |
\end{ttbox} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
29 |
|
48791 | 30 |
The @{verbatim "-l"} option specifies the session name of the logic |
31 |
image to be used for proof processing. Additional session root |
|
32 |
directories may be included via option @{verbatim "-d"} to augment |
|
33 |
that name space (see also \secref{sec:tool-build}). |
|
34 |
||
53519
3c977c570e20
discontinued obsolete command-line tool "isabelle build_dialog";
wenzelm
parents:
52062
diff
changeset
|
35 |
By default, the specified image is checked and built on demand. The |
3c977c570e20
discontinued obsolete command-line tool "isabelle build_dialog";
wenzelm
parents:
52062
diff
changeset
|
36 |
@{verbatim "-s"} option determines where to store the result session |
3c977c570e20
discontinued obsolete command-line tool "isabelle build_dialog";
wenzelm
parents:
52062
diff
changeset
|
37 |
image (see also \secref{sec:tool-build}). The @{verbatim "-n"} |
3c977c570e20
discontinued obsolete command-line tool "isabelle build_dialog";
wenzelm
parents:
52062
diff
changeset
|
38 |
option bypasses the session build dialog. |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
48985
diff
changeset
|
39 |
|
51054 | 40 |
The @{verbatim "-m"} option specifies additional print modes for the |
54881 | 41 |
prover process. Note that the system option @{system_option |
42 |
jedit_print_mode} allows to do the same persistently (e.g.\ via the |
|
43 |
Plugin Options dialog of Isabelle/jEdit), without requiring |
|
44 |
command-line invocation. |
|
48573 | 45 |
|
46 |
The @{verbatim "-J"} and @{verbatim "-j"} options allow to pass |
|
47 |
additional low-level options to the JVM or jEdit, respectively. The |
|
48603 | 48 |
defaults are provided by the Isabelle settings environment |
49 |
(\secref{sec:settings}). |
|
48573 | 50 |
|
51 |
The @{verbatim "-b"} and @{verbatim "-f"} options control the |
|
52 |
self-build mechanism of Isabelle/jEdit. This is only relevant for |
|
53 |
building from sources, which also requires an auxiliary @{verbatim |
|
48603 | 54 |
jedit_build} |
54703 | 55 |
component.\footnote{@{url "http://isabelle.in.tum.de/components"}} Note |
48603 | 56 |
that official Isabelle releases already include a version of |
50406
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
48985
diff
changeset
|
57 |
Isabelle/jEdit that is built properly. |
c28753665b8e
documentation for isabelle build_dialog and its implicit use in isabelle jedit;
wenzelm
parents:
48985
diff
changeset
|
58 |
*} |
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
59 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
60 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
61 |
section {* Proof General / Emacs *} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
62 |
|
48572 | 63 |
text {* The @{tool_def emacs} tool invokes a version of Emacs and |
54703 | 64 |
Proof General\footnote{@{url "http://proofgeneral.inf.ed.ac.uk/"}} within the |
48603 | 65 |
regular Isabelle settings environment (\secref{sec:settings}). This |
66 |
is more convenient than starting Emacs separately, loading the Proof |
|
67 |
General LISP files, and then attempting to start Isabelle with |
|
51054 | 68 |
dynamic @{setting PATH} lookup etc., although it might fail if a |
69 |
different version of Proof General is already part of the Emacs |
|
70 |
installation of the operating system. |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
71 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
72 |
The actual interface script is part of the Proof General |
48572 | 73 |
distribution; its usage depends on the particular version. There |
74 |
are some options available, such as @{verbatim "-l"} for passing the |
|
75 |
logic image to be used by default, or @{verbatim "-m"} to tune the |
|
51054 | 76 |
standard print mode of the prover process. The following Isabelle |
77 |
settings are particularly important for Proof General: |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
78 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
79 |
\begin{description} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
80 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
81 |
\item[@{setting_def PROOFGENERAL_HOME}] points to the main |
48572 | 82 |
installation directory of the Proof General distribution. This is |
83 |
implicitly provided for versions of Proof General that are |
|
84 |
distributed as Isabelle component, see also \secref{sec:components}; |
|
85 |
otherwise it needs to be configured manually. |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
86 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
87 |
\item[@{setting_def PROOFGENERAL_OPTIONS}] is implicitly prefixed to |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
88 |
the command line of any invocation of the Proof General @{verbatim |
48572 | 89 |
interface} script. This allows to provide persistent default |
90 |
options for the invocation of \texttt{isabelle emacs}. |
|
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
91 |
|
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
92 |
\end{description} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
93 |
*} |
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
94 |
|
47824 | 95 |
|
48573 | 96 |
section {* Plain TTY interaction \label{sec:tool-tty} *} |
47824 | 97 |
|
48573 | 98 |
text {* |
99 |
The @{tool_def tty} tool runs the Isabelle process interactively |
|
100 |
within a plain terminal session: |
|
47824 | 101 |
\begin{ttbox} |
48573 | 102 |
Usage: isabelle tty [OPTIONS] |
47824 | 103 |
|
104 |
Options are: |
|
105 |
-l NAME logic image name (default ISABELLE_LOGIC) |
|
106 |
-m MODE add print mode for output |
|
52062 | 107 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
48573 | 108 |
-p NAME line editor program name (default ISABELLE_LINE_EDITOR) |
47824 | 109 |
|
48573 | 110 |
Run Isabelle process with plain tty interaction and line editor. |
47824 | 111 |
\end{ttbox} |
112 |
||
48573 | 113 |
The @{verbatim "-l"} option specifies the logic image. The |
114 |
@{verbatim "-m"} option specifies additional print modes. The |
|
115 |
@{verbatim "-p"} option specifies an alternative line editor (such |
|
116 |
as the @{executable_def rlwrap} wrapper for GNU readline); the |
|
117 |
fall-back is to use raw standard input. |
|
47824 | 118 |
|
52062 | 119 |
\medskip Option @{verbatim "-o"} allows to override Isabelle system |
120 |
options for this process, see also \secref{sec:system-options}. |
|
121 |
||
48603 | 122 |
Regular interaction works via the standard Isabelle/Isar toplevel |
123 |
loop. The Isar command @{command exit} drops out into the |
|
124 |
bare-bones ML system, which is occasionally useful for debugging of |
|
125 |
the Isar infrastructure itself. Invoking @{ML Isar.loop}~@{verbatim |
|
126 |
"();"} in ML will return to the Isar toplevel. *} |
|
47824 | 127 |
|
48576 | 128 |
|
129 |
||
130 |
section {* Theory graph browser \label{sec:browse} *} |
|
131 |
||
132 |
text {* The Isabelle graph browser is a general tool for visualizing |
|
133 |
dependency graphs. Certain nodes of the graph (i.e.\ theories) can |
|
134 |
be grouped together in ``directories'', whose contents may be |
|
135 |
hidden, thus enabling the user to collapse irrelevant portions of |
|
136 |
information. The browser is written in Java, it can be used both as |
|
48814
d488a5f25bf6
some updates of "Presenting theories", using mkroot/build instead of former mkdir/make/usedir (which are still present in "Misc");
wenzelm
parents:
48791
diff
changeset
|
137 |
a stand-alone application and as an applet. *} |
48576 | 138 |
|
139 |
||
140 |
subsection {* Invoking the graph browser *} |
|
141 |
||
48602 | 142 |
text {* The stand-alone version of the graph browser is wrapped up as |
143 |
@{tool_def browser}: |
|
48576 | 144 |
\begin{ttbox} |
48602 | 145 |
Usage: isabelle browser [OPTIONS] [GRAPHFILE] |
48576 | 146 |
|
147 |
Options are: |
|
148 |
-b Admin/build only |
|
149 |
-c cleanup -- remove GRAPHFILE after use |
|
150 |
-o FILE output to FILE (ps, eps, pdf) |
|
151 |
\end{ttbox} |
|
152 |
When no filename is specified, the browser automatically changes to |
|
153 |
the directory @{setting ISABELLE_BROWSER_INFO}. |
|
154 |
||
155 |
\medskip The @{verbatim "-b"} option indicates that this is for |
|
156 |
administrative build only, i.e.\ no browser popup if no files are |
|
157 |
given. |
|
158 |
||
159 |
The @{verbatim "-c"} option causes the input file to be removed |
|
160 |
after use. |
|
161 |
||
162 |
The @{verbatim "-o"} option indicates batch-mode operation, with the |
|
163 |
output written to the indicated file; note that @{verbatim pdf} |
|
164 |
produces an @{verbatim eps} copy as well. |
|
165 |
||
166 |
\medskip The applet version of the browser is part of the standard |
|
167 |
WWW theory presentation, see the link ``theory dependencies'' within |
|
168 |
each session index. |
|
169 |
*} |
|
170 |
||
171 |
||
172 |
subsection {* Using the graph browser *} |
|
173 |
||
174 |
text {* |
|
175 |
The browser's main window, which is shown in |
|
176 |
\figref{fig:browserwindow}, consists of two sub-windows. In the |
|
177 |
left sub-window, the directory tree is displayed. The graph itself |
|
178 |
is displayed in the right sub-window. |
|
179 |
||
180 |
\begin{figure}[ht] |
|
181 |
\includegraphics[width=\textwidth]{browser_screenshot} |
|
182 |
\caption{\label{fig:browserwindow} Browser main window} |
|
183 |
\end{figure} |
|
184 |
*} |
|
185 |
||
186 |
||
187 |
subsubsection {* The directory tree window *} |
|
188 |
||
189 |
text {* |
|
190 |
We describe the usage of the directory browser and the meaning of |
|
191 |
the different items in the browser window. |
|
192 |
||
193 |
\begin{itemize} |
|
194 |
||
195 |
\item A red arrow before a directory name indicates that the |
|
196 |
directory is currently ``folded'', i.e.~the nodes in this directory |
|
197 |
are collapsed to one single node. In the right sub-window, the names |
|
198 |
of nodes corresponding to folded directories are enclosed in square |
|
199 |
brackets and displayed in red color. |
|
200 |
||
201 |
\item A green downward arrow before a directory name indicates that |
|
202 |
the directory is currently ``unfolded''. It can be folded by |
|
203 |
clicking on the directory name. Clicking on the name for a second |
|
204 |
time unfolds the directory again. Alternatively, a directory can |
|
205 |
also be unfolded by clicking on the corresponding node in the right |
|
206 |
sub-window. |
|
207 |
||
208 |
\item Blue arrows stand before ordinary node names. When clicking on |
|
209 |
such a name (i.e.\ that of a theory), the graph display window |
|
210 |
focuses to the corresponding node. Double clicking invokes a text |
|
211 |
viewer window in which the contents of the theory file are |
|
212 |
displayed. |
|
213 |
||
214 |
\end{itemize} |
|
215 |
*} |
|
216 |
||
217 |
||
218 |
subsubsection {* The graph display window *} |
|
219 |
||
220 |
text {* |
|
221 |
When pointing on an ordinary node, an upward and a downward arrow is |
|
222 |
shown. Initially, both of these arrows are green. Clicking on the |
|
223 |
upward or downward arrow collapses all predecessor or successor |
|
224 |
nodes, respectively. The arrow's color then changes to red, |
|
225 |
indicating that the predecessor or successor nodes are currently |
|
226 |
collapsed. The node corresponding to the collapsed nodes has the |
|
227 |
name ``@{verbatim "[....]"}''. To uncollapse the nodes again, simply |
|
228 |
click on the red arrow or on the node with the name ``@{verbatim |
|
229 |
"[....]"}''. Similar to the directory browser, the contents of |
|
230 |
theory files can be displayed by double clicking on the |
|
231 |
corresponding node. |
|
232 |
*} |
|
233 |
||
234 |
||
235 |
subsubsection {* The ``File'' menu *} |
|
236 |
||
237 |
text {* |
|
238 |
Due to Java Applet security restrictions this menu is only available |
|
239 |
in the full application version. The meaning of the menu items is as |
|
240 |
follows: |
|
241 |
||
242 |
\begin{description} |
|
243 |
||
244 |
\item[Open \dots] Open a new graph file. |
|
245 |
||
246 |
\item[Export to PostScript] Outputs the current graph in Postscript |
|
247 |
format, appropriately scaled to fit on one single sheet of A4 paper. |
|
248 |
The resulting file can be printed directly. |
|
249 |
||
250 |
\item[Export to EPS] Outputs the current graph in Encapsulated |
|
251 |
Postscript format. The resulting file can be included in other |
|
252 |
documents. |
|
253 |
||
254 |
\item[Quit] Quit the graph browser. |
|
255 |
||
256 |
\end{description} |
|
257 |
*} |
|
258 |
||
259 |
||
260 |
subsection {* Syntax of graph definition files *} |
|
261 |
||
262 |
text {* |
|
263 |
A graph definition file has the following syntax: |
|
264 |
||
265 |
\begin{center}\small |
|
266 |
\begin{tabular}{rcl} |
|
267 |
@{text graph} & @{text "="} & @{text "{ vertex"}~@{verbatim ";"}~@{text "}+"} \\ |
|
268 |
@{text vertex} & @{text "="} & @{text "vertex_name vertex_ID dir_name ["}~@{verbatim "+"}~@{text "] path ["}~@{verbatim "<"}~@{text "|"}~@{verbatim ">"}~@{text "] { vertex_ID }*"} |
|
269 |
\end{tabular} |
|
270 |
\end{center} |
|
271 |
||
272 |
The meaning of the items in a vertex description is as follows: |
|
273 |
||
274 |
\begin{description} |
|
275 |
||
276 |
\item[@{text vertex_name}] The name of the vertex. |
|
277 |
||
278 |
\item[@{text vertex_ID}] The vertex identifier. Note that there may |
|
279 |
be several vertices with equal names, whereas identifiers must be |
|
280 |
unique. |
|
281 |
||
282 |
\item[@{text dir_name}] The name of the ``directory'' the vertex |
|
283 |
should be placed in. A ``@{verbatim "+"}'' sign after @{text |
|
284 |
dir_name} indicates that the nodes in the directory are initially |
|
285 |
visible. Directories are initially invisible by default. |
|
286 |
||
287 |
\item[@{text path}] The path of the corresponding theory file. This |
|
288 |
is specified relatively to the path of the graph definition file. |
|
289 |
||
290 |
\item[List of successor/predecessor nodes] A ``@{verbatim "<"}'' |
|
291 |
sign before the list means that successor nodes are listed, a |
|
292 |
``@{verbatim ">"}'' sign means that predecessor nodes are listed. If |
|
293 |
neither ``@{verbatim "<"}'' nor ``@{verbatim ">"}'' is found, the |
|
294 |
browser assumes that successor nodes are listed. |
|
295 |
||
296 |
\end{description} |
|
297 |
*} |
|
298 |
||
28916
0a802cdda340
removed obsolete isabelle-interface executable and ISABELLE_INTERFACE setting;
wenzelm
parents:
diff
changeset
|
299 |
end |