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