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