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