author | wenzelm |
Mon, 09 Jun 2014 19:35:18 +0200 | |
changeset 57317 | 7da91cd963f4 |
parent 57316 | 134d3b6c135e |
child 57318 | 2b89a3a34cc3 |
permissions | -rw-r--r-- |
53981 | 1 |
(*:wrap=hard:maxLineLen=78:*) |
2 |
||
53769 | 3 |
theory JEdit |
4 |
imports Base |
|
5 |
begin |
|
6 |
||
7 |
chapter {* Introduction *} |
|
8 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
9 |
section {* Concepts and terminology *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
10 |
|
54321 | 11 |
text {* Isabelle/jEdit is a Prover IDE that integrates \emph{parallel |
12 |
proof checking} \cite{Wenzel:2009,Wenzel:2013:ITP} with |
|
13 |
\emph{asynchronous user interaction} |
|
14 |
\cite{Wenzel:2010,Wenzel:2012:UITP-EPTCS}, based on a |
|
15 |
document-oriented approach to \emph{continuous proof processing} |
|
16 |
\cite{Wenzel:2011:CICM,Wenzel:2012}. Many concepts and system |
|
17 |
components are fit together in order to make this work. The main |
|
54329 | 18 |
building blocks are as follows. |
53769 | 19 |
|
54321 | 20 |
\begin{description} |
53769 | 21 |
|
57310 | 22 |
\item [PIDE] is a general framework for Prover IDEs based on Isabelle/Scala. |
23 |
It is built around a concept of parallel and asynchronous document |
|
24 |
processing, which is supported natively by the parallel proof engine that is |
|
25 |
implemented in Isabelle/ML. The traditional prover command loop is given up; |
|
26 |
instead there is direct support for editing of source text, with rich formal |
|
27 |
markup for GUI rendering. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
28 |
|
54321 | 29 |
\item [Isabelle/ML] is the implementation and extension language of |
30 |
Isabelle, see also \cite{isabelle-implementation}. It is integrated |
|
54329 | 31 |
into the logical context of Isabelle/Isar and allows to manipulate |
32 |
logical entities directly. Arbitrary add-on tools may be implemented |
|
33 |
for object-logics such as Isabelle/HOL. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
34 |
|
54321 | 35 |
\item [Isabelle/Scala] is the system programming language of |
36 |
Isabelle. It extends the pure logical environment of Isabelle/ML |
|
37 |
towards the ``real world'' of graphical user interfaces, text |
|
38 |
editors, IDE frameworks, web services etc. Special infrastructure |
|
54372 | 39 |
allows to transfer algebraic datatypes and formatted text easily |
40 |
between ML and Scala, using asynchronous protocol commands. |
|
54321 | 41 |
|
54329 | 42 |
\item [jEdit] is a sophisticated text editor implemented in |
54703 | 43 |
Java.\footnote{@{url "http://www.jedit.org"}} It is easily extensible |
54329 | 44 |
by plugins written in languages that work on the JVM, e.g.\ |
54703 | 45 |
Scala\footnote{@{url "http://www.scala-lang.org/"}}. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
46 |
|
54321 | 47 |
\item [Isabelle/jEdit] is the main example application of the PIDE |
54329 | 48 |
framework and the default user-interface for Isabelle. It targets |
49 |
both beginners and experts. Technically, Isabelle/jEdit combines a |
|
54372 | 50 |
slightly modified version of the jEdit code base with a special |
51 |
plugin for Isabelle, integrated as standalone application for the |
|
52 |
main operating system platforms: Linux, Windows, Mac OS X. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
53 |
|
54321 | 54 |
\end{description} |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
55 |
|
54321 | 56 |
The subtle differences of Isabelle/ML versus Standard ML, |
54330 | 57 |
Isabelle/Scala versus Scala, Isabelle/jEdit versus jEdit need to be |
58 |
taken into account when discussing any of these PIDE building blocks |
|
59 |
in public forums, mailing lists, or even scientific publications. |
|
60 |
*} |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
61 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
62 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
63 |
section {* The Isabelle/jEdit Prover IDE *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
64 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
65 |
text {* |
54357 | 66 |
\begin{figure}[htb] |
54331 | 67 |
\begin{center} |
57312 | 68 |
\includegraphics[scale=0.333]{isabelle-jedit} |
54331 | 69 |
\end{center} |
70 |
\caption{The Isabelle/jEdit Prover IDE} |
|
54357 | 71 |
\label{fig:isabelle-jedit} |
54331 | 72 |
\end{figure} |
53773 | 73 |
|
54357 | 74 |
Isabelle/jEdit (\figref{fig:isabelle-jedit}) consists of some |
75 |
plugins for the well-known jEdit text editor |
|
54703 | 76 |
@{url "http://www.jedit.org"}, according to the following principles. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
77 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
78 |
\begin{itemize} |
53769 | 79 |
|
54321 | 80 |
\item The original jEdit look-and-feel is generally preserved, |
54348 | 81 |
although some default properties are changed to accommodate Isabelle |
82 |
(e.g.\ the text area font). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
83 |
|
54321 | 84 |
\item Formal Isabelle/Isar text is checked asynchronously while |
85 |
editing. The user is in full command of the editor, and the prover |
|
86 |
refrains from locking portions of the buffer. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
87 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
88 |
\item Prover feedback works via colors, boxes, squiggly underline, |
54348 | 89 |
hyperlinks, popup windows, icons, clickable output --- all based on |
57310 | 90 |
semantic markup produced by the prover process in the background. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
91 |
|
54321 | 92 |
\item Using the mouse together with the modifier key @{verbatim |
93 |
CONTROL} (Linux, Windows) or @{verbatim COMMAND} (Mac OS X) exposes |
|
94 |
additional formal content via tooltips and/or hyperlinks. |
|
53769 | 95 |
|
54321 | 96 |
\item Formal output (in popups etc.) may be explored recursively, |
97 |
using the same techniques as in the editor source buffer. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
98 |
|
54329 | 99 |
\item Additional panels (e.g.\ \emph{Output}, \emph{Symbols}) are |
100 |
organized by the Dockable Window Manager of jEdit, which also allows |
|
101 |
multiple floating instances of each window class. |
|
102 |
||
54321 | 103 |
\item The prover process and source files are managed on the editor |
104 |
side. The prover operates on timeless and stateless document |
|
54348 | 105 |
content as provided via Isabelle/Scala. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
106 |
|
54321 | 107 |
\item Plugin options of jEdit (for the \emph{Isabelle} plugin) give |
54348 | 108 |
access to a selection of Isabelle/Scala options and its persistent |
54321 | 109 |
preferences, usually with immediate effect on the prover back-end or |
110 |
editor front-end. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
111 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
112 |
\item The logic image of the prover session may be specified within |
54348 | 113 |
Isabelle/jEdit. The new image is provided automatically by the |
114 |
Isabelle build tool after restart of the application. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
115 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
116 |
\end{itemize} |
53769 | 117 |
*} |
118 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
119 |
|
54321 | 120 |
subsection {* Documentation *} |
121 |
||
57310 | 122 |
text {* |
123 |
The \emph{Documentation} panel of Isabelle/jEdit provides access to the |
|
124 |
standard Isabelle documentation: PDF files are opened by regular desktop |
|
125 |
operations of the underlying platform. The section ``jEdit Documentation'' |
|
126 |
contains the original \emph{User's Guide} of this sophisticated text editor. |
|
127 |
The same is accessible via the @{verbatim Help} menu or @{verbatim F1} |
|
128 |
keyboard shortcut, using the built-in HTML viewer of Java/Swing. The latter |
|
129 |
also includes \emph{Frequently Asked Questions} and documentation of |
|
130 |
individual plugins. |
|
54321 | 131 |
|
57310 | 132 |
Most of the information about generic jEdit is relevant for Isabelle/jEdit |
133 |
as well, but one needs to keep in mind that defaults sometimes differ, and |
|
134 |
the official jEdit documentation does not know about the Isabelle plugin |
|
135 |
with its support for continuous checking of formal source text: jEdit is a |
|
136 |
plain text editor, but Isabelle/jEdit is a Prover IDE. |
|
54321 | 137 |
*} |
138 |
||
139 |
||
140 |
subsection {* Plugins *} |
|
141 |
||
142 |
text {* The \emph{Plugin Manager} of jEdit allows to augment editor |
|
143 |
functionality by JVM modules (jars) that are provided by the central |
|
54372 | 144 |
plugin repository, which is accessible via various mirror sites. |
54321 | 145 |
|
146 |
Connecting to the plugin server infrastructure of the jEdit project |
|
54348 | 147 |
allows to update bundled plugins or to add further functionality. |
148 |
This needs to be done with the usual care for such an open bazaar of |
|
149 |
contributions. Arbitrary combinations of add-on features are apt to |
|
150 |
cause problems. It is advisable to start with the default |
|
151 |
configuration of Isabelle/jEdit and develop some understanding how |
|
152 |
it is supposed to work, before loading additional plugins at a grand |
|
153 |
scale. |
|
54321 | 154 |
|
54348 | 155 |
\medskip The main \emph{Isabelle} plugin is an integral part of |
57310 | 156 |
Isabelle/jEdit and needs to remain active at all times! A few additional |
157 |
plugins are bundled with Isabelle/jEdit for convenience or out of necessity, |
|
158 |
notably \emph{Console} with its Isabelle/Scala sub-plugin |
|
159 |
(\secref{sec:scala-console}) and \emph{SideKick} with some Isabelle-specific |
|
160 |
parsers for document tree structure (\secref{sec:sidekick}). The |
|
161 |
\emph{Navigator} plugin is particularly important for hyperlinks within the |
|
162 |
formal document-model (\secref{sec:tooltips-hyperlinks}). Further plugins |
|
163 |
(e.g.\ \emph{ErrorList}, \emph{Code2HTML}) are included to saturate the |
|
164 |
dependencies of bundled plugins, but have no particular use in |
|
54348 | 165 |
Isabelle/jEdit. *} |
54321 | 166 |
|
167 |
||
168 |
subsection {* Options *} |
|
169 |
||
54329 | 170 |
text {* Both jEdit and Isabelle have distinctive management of |
54348 | 171 |
persistent options. |
54321 | 172 |
|
57310 | 173 |
Regular jEdit options are accessible via the dialogs \emph{Utilities / |
174 |
Global Options} or \emph{Plugins / Plugin Options}, with a second chance to |
|
175 |
flip the two within the central options dialog. Changes are stored in |
|
176 |
@{file_unchecked "$ISABELLE_HOME_USER/jedit/properties"} and |
|
177 |
@{file_unchecked "$ISABELLE_HOME_USER/jedit/keymaps"}. |
|
178 |
||
179 |
Isabelle system options are managed by Isabelle/Scala and changes are stored |
|
180 |
in @{file_unchecked "$ISABELLE_HOME_USER/etc/preferences"}, independently of |
|
181 |
other jEdit properties. See also \cite{isabelle-sys}, especially the |
|
182 |
coverage of sessions and command-line tools like @{tool build} or @{tool |
|
54372 | 183 |
options}. |
54321 | 184 |
|
57310 | 185 |
Those Isabelle options that are declared as \textbf{public} are configurable |
186 |
in Isabelle/jEdit via \emph{Plugin Options / Isabelle / General}. Moreover, |
|
187 |
there are various options for rendering of document content, which are |
|
188 |
configurable via \emph{Plugin Options / Isabelle / Rendering}. Thus |
|
189 |
\emph{Plugin Options / Isabelle} in jEdit provides a view on a subset of |
|
190 |
Isabelle system options. Note that some of these options affect general |
|
191 |
parameters that are relevant outside Isabelle/jEdit as well, e.g.\ |
|
192 |
@{system_option threads} or @{system_option parallel_proofs} for the |
|
193 |
Isabelle build tool \cite{isabelle-sys}, but it is possible to use the |
|
194 |
settings variable @{setting ISABELLE_BUILD_OPTIONS} to change defaults for |
|
195 |
batch builds without affecting Isabelle/jEdit. |
|
54329 | 196 |
|
57310 | 197 |
\medskip Options are usually loaded on startup and saved on shutdown of |
198 |
Isabelle/jEdit. Editing the machine-generated @{file_unchecked |
|
54372 | 199 |
"$ISABELLE_HOME_USER/jedit/properties"} or @{file_unchecked |
57310 | 200 |
"$ISABELLE_HOME_USER/etc/preferences"} manually while the application is |
201 |
running is likely to cause surprise due to lost update! *} |
|
54321 | 202 |
|
203 |
||
204 |
subsection {* Keymaps *} |
|
205 |
||
206 |
text {* Keyboard shortcuts used to be managed as jEdit properties in |
|
207 |
the past, but recent versions (2013) have a separate concept of |
|
54348 | 208 |
\emph{keymap} that is configurable via \emph{Global Options / |
209 |
Shortcuts}. The @{verbatim imported} keymap is derived from the |
|
54330 | 210 |
initial environment of properties that is available at the first |
54348 | 211 |
start of the editor; afterwards the keymap file takes precedence. |
54321 | 212 |
|
57310 | 213 |
This is relevant for Isabelle/jEdit due to various fine-tuning of default |
214 |
properties, and additional keyboard shortcuts for Isabelle-specific |
|
215 |
functionality. Users may change their keymap later, but need to copy some |
|
216 |
key bindings manually (see also @{file_unchecked |
|
217 |
"$ISABELLE_HOME_USER/jedit/keymaps"}). *} |
|
54321 | 218 |
|
219 |
||
54322 | 220 |
subsection {* Look-and-feel *} |
54321 | 221 |
|
54330 | 222 |
text {* jEdit is a Java/AWT/Swing application with some ambition to |
54329 | 223 |
support ``native'' look-and-feel on all platforms, within the limits |
54330 | 224 |
of what Oracle as Java provider and major operating system |
225 |
distributors allow (see also \secref{sec:problems}). |
|
54321 | 226 |
|
54329 | 227 |
Isabelle/jEdit enables platform-specific look-and-feel by default as |
54330 | 228 |
follows: |
54321 | 229 |
|
230 |
\begin{description} |
|
231 |
||
232 |
\item[Linux] The platform-independent \emph{Nimbus} is used by |
|
54372 | 233 |
default. |
54321 | 234 |
|
57310 | 235 |
\emph{GTK+} works under the side-condition that the overall GTK theme is |
236 |
selected in a Swing-friendly way.\footnote{GTK support in Java/Swing was |
|
237 |
once marketed aggressively by Sun, but never quite finished. Today (2013) it |
|
238 |
is lagging behind further development of Swing and GTK. The graphics |
|
239 |
rendering performance can be worse than for other Swing look-and-feels.} |
|
54321 | 240 |
|
54381 | 241 |
\item[Windows] Regular \emph{Windows} is used by default, but |
242 |
\emph{Windows Classic} also works. |
|
54372 | 243 |
|
244 |
\item[Mac OS X] Regular \emph{Mac OS X} is used by default. |
|
245 |
||
57310 | 246 |
Moreover the bundled \emph{MacOSX} plugin provides various functions that |
247 |
are expected from applications on that particular platform: quit from menu |
|
248 |
or dock, preferences menu, drag-and-drop of text files on the application, |
|
249 |
full-screen mode for main editor windows. It is advisable to have the |
|
250 |
\emph{MacOSX} enabled all the time on that platform. |
|
54321 | 251 |
|
252 |
\end{description} |
|
253 |
||
254 |
Users may experiment with different look-and-feels, but need to keep |
|
54329 | 255 |
in mind that this extra variance of GUI functionality is unlikely to |
54372 | 256 |
work in arbitrary combinations. The platform-independent |
257 |
\emph{Nimbus} and \emph{Metal} should always work. The historic |
|
258 |
\emph{CDE/Motif} is better avoided. |
|
259 |
||
260 |
After changing the look-and-feel in \emph{Global Options / |
|
261 |
Appearance}, it is advisable to restart Isabelle/jEdit in order to |
|
262 |
take full effect. *} |
|
54321 | 263 |
|
264 |
||
57315 | 265 |
chapter {* Augmented jEdit functionality *} |
54372 | 266 |
|
267 |
section {* File-system access *} |
|
54351 | 268 |
|
269 |
text {* File specifications in jEdit follow various formats and |
|
270 |
conventions according to \emph{Virtual File Systems}, which may be |
|
271 |
also provided by additional plugins. This allows to access remote |
|
272 |
files via the @{verbatim "http:"} protocol prefix, for example. |
|
273 |
Isabelle/jEdit attempts to work with the file-system access model of |
|
274 |
jEdit as far as possible. In particular, theory sources are passed |
|
275 |
directly from the editor to the prover, without indirection via |
|
57310 | 276 |
physical files. |
54351 | 277 |
|
278 |
Despite the flexibility of URLs in jEdit, local files are |
|
279 |
particularly important and are accessible without protocol prefix. |
|
280 |
Here the path notation is that of the Java Virtual Machine on the |
|
281 |
underlying platform. On Windows the preferred form uses |
|
57310 | 282 |
backslashes, but happens to accept forward slashes of Unix/POSIX, too. |
54351 | 283 |
Further differences arise due to drive letters and network shares. |
284 |
||
285 |
The Java notation for files needs to be distinguished from the one |
|
286 |
of Isabelle, which uses POSIX notation with forward slashes on |
|
57310 | 287 |
\emph{all} platforms.\footnote{Isabelle/ML on Windows uses Cygwin |
54351 | 288 |
file-system access.} Moreover, environment variables from the |
289 |
Isabelle process may be used freely, e.g.\ @{file |
|
55880 | 290 |
"$ISABELLE_HOME/etc/symbols"} or @{file_unchecked "$POLYML_HOME/README"}. |
54466 | 291 |
There are special shortcuts: @{file "~"} for @{file "$USER_HOME"} |
292 |
and @{file "~~"} for @{file "$ISABELLE_HOME"}. |
|
54351 | 293 |
|
294 |
\medskip Since jEdit happens to support environment variables within |
|
295 |
file specifications as well, it is natural to use similar notation |
|
296 |
within the editor, e.g.\ in the file-browser. This does not work in |
|
297 |
full generality, though, due to the bias of jEdit towards |
|
298 |
platform-specific notation and of Isabelle towards POSIX. Moreover, |
|
299 |
the Isabelle settings environment is not yet active when starting |
|
300 |
Isabelle/jEdit via its standard application wrapper (in contrast to |
|
301 |
@{verbatim "isabelle jedit"} run from the command line). |
|
302 |
||
303 |
For convenience, Isabelle/jEdit imitates at least @{verbatim |
|
57310 | 304 |
"$ISABELLE_HOME"} and @{verbatim "$ISABELLE_HOME_USER"} within the Java |
305 |
process environment, in order to allow easy access to these important places |
|
306 |
from the editor. The file browser of jEdit also includes \emph{Favorites} |
|
307 |
for these two important locations. |
|
54351 | 308 |
|
57310 | 309 |
\medskip Path specifications in prover input or output usually include |
310 |
formal markup that turns it into a hyperlink (see also |
|
311 |
\secref{sec:tooltips-hyperlinks}). This allows to open the corresponding |
|
312 |
file in the text editor, independently of the path notation. |
|
313 |
||
314 |
Formally checked paths in prover input are subject to completion |
|
57315 | 315 |
(\secref{sec:completion}): partial specifications are resolved via actual |
57310 | 316 |
directory content and possible completions are offered in a popup. |
317 |
*} |
|
54351 | 318 |
|
319 |
||
57317 | 320 |
section {* Dockable windows *} |
57316 | 321 |
|
322 |
text {* |
|
323 |
In jEdit terminology, a \emph{view} is an editor window with one or more |
|
324 |
\emph{text areas} that show the content of one or more \emph{buffers}. A |
|
325 |
regular view may be surrounded by \emph{dockable windows} that show |
|
326 |
additional information in arbitrary format, not just text; a \emph{plain |
|
327 |
view} does not allow dockables. The \emph{dockable window manager} of jEdit |
|
328 |
organizes these dockable windows, either as \emph{floating} windows, or |
|
329 |
\emph{docked} panels within one of the four margins of the view. There may |
|
330 |
be any number of floating instances of some dockable window, but at most one |
|
331 |
docked instance; jEdit actions that address \emph{the} dockable window of a |
|
332 |
particular kind refer to the unique docked instance. |
|
333 |
||
334 |
Dockables are used routinely in jEdit for important functionality like |
|
335 |
\emph{HyperSearch Results} or the \emph{File System Browser}. Plugins often |
|
336 |
provide a central dockable to access their key functionality, which may be |
|
337 |
opened by the user on demand. The Isabelle/jEdit plugin takes this approach |
|
338 |
to the extreme: its main plugin menu merely provides entry-points to panels |
|
339 |
that are managed as dockable windows. Some important panels are docked by |
|
340 |
default, e.g.\ \emph{Documentation}, \emph{Output}, \emph{Query}, but the |
|
341 |
user can change this arrangement easily. |
|
342 |
||
343 |
Compared to plain jEdit, dockable window management in Isabelle/jEdit is |
|
344 |
slightly augmented according to the the following principles: |
|
345 |
||
346 |
\begin{itemize} |
|
347 |
||
348 |
\item Floating windows are dependent on the main window as \emph{dialog} in |
|
349 |
the sense of Java/AWT/Swing. Dialog windows always stay on top of the view, |
|
350 |
which is particularly important in full-screen mode. The desktop environment |
|
351 |
of the underlying platform may impose further policies on such dependent |
|
352 |
dialogs, in contrast to fully independent windows, e.g.\ some window |
|
353 |
management functions may be missing. |
|
354 |
||
355 |
\item Keyboard focus of the main view vs.\ a dockable window is carefully |
|
356 |
managed according to the intended semantics, as a panel mainly for output or |
|
357 |
input. For example, activating the \emph{Output} (\secref{sec:output}) panel |
|
358 |
via the dockable window manager returns keyboard focus to the main text |
|
359 |
area, but for \emph{Query} (\secref{sec:query}) the focus is given to the |
|
360 |
main input field of that panel. |
|
361 |
||
362 |
\item Panels that provide their own text area for output have an additional |
|
363 |
dockable menu item \emph{Detach}. This produces an independent copy of the |
|
364 |
current output as a floating \emph{Info} window, which displays that content |
|
365 |
independently of ongoing changes of the PIDE document-model. Note that |
|
366 |
Isabelle/jEdit popup windows (\secref{sec:tooltips-hyperlinks}) provide a |
|
367 |
similar \emph{Detach} operation as an icon. |
|
368 |
||
369 |
\end{itemize} |
|
370 |
*} |
|
371 |
||
372 |
||
57317 | 373 |
section {* SideKick parsers \label{sec:sidekick} *} |
374 |
||
375 |
text {* |
|
376 |
The \emph{SideKick} plugin provides some general services to display buffer |
|
377 |
structure in a tree view. |
|
378 |
||
379 |
Isabelle/jEdit provides SideKick parsers for its main mode for |
|
380 |
theory files, as well as some minor modes for the @{verbatim NEWS} |
|
381 |
file, session @{verbatim ROOT} files, and system @{verbatim |
|
382 |
options}. |
|
383 |
||
384 |
Moreover, the special SideKick parser @{verbatim "isabelle-markup"} |
|
385 |
provides access to the full (uninterpreted) markup tree of the PIDE |
|
386 |
document model of the current buffer. This is occasionally useful |
|
387 |
for informative purposes, but the amount of displayed information |
|
388 |
might cause problems for large buffers, both for the human and the |
|
389 |
machine. |
|
390 |
*} |
|
391 |
||
392 |
||
393 |
section {* Scala console \label{sec:scala-console} *} |
|
394 |
||
395 |
text {* |
|
396 |
The \emph{Console} plugin manages various shells (command interpreters), |
|
397 |
e.g.\ \emph{BeanShell}, which is the official jEdit scripting language, and |
|
398 |
the cross-platform \emph{System} shell. Thus the console provides similar |
|
399 |
functionality than the special Emacs buffers @{verbatim "*scratch*"} and |
|
400 |
@{verbatim "*shell*"}. |
|
401 |
||
402 |
Isabelle/jEdit extends the repertoire of the console by \emph{Scala}, which |
|
403 |
is the regular Scala toplevel loop running inside the \emph{same} JVM |
|
404 |
process as Isabelle/jEdit itself. This means the Scala command interpreter |
|
405 |
has access to the JVM name space and state of the running Prover IDE |
|
406 |
application: the main entry points are @{verbatim view} (the current editor |
|
407 |
view of jEdit) and @{verbatim PIDE} (the Isabelle/jEdit plugin object). For |
|
408 |
example, the Scala expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE |
|
409 |
document snapshot of the current buffer within the current editor view. |
|
410 |
||
411 |
This helps to explore Isabelle/Scala functionality interactively. Some care |
|
412 |
is required to avoid interference with the internals of the running |
|
413 |
application, especially in production use. |
|
414 |
*} |
|
415 |
||
416 |
||
57315 | 417 |
chapter {* Prover IDE functionality *} |
418 |
||
54353 | 419 |
section {* Text buffers and theories \label{sec:buffers-theories} *} |
54322 | 420 |
|
54350 | 421 |
text {* As regular text editor, jEdit maintains a collection of open |
422 |
\emph{text buffers} to store source files; each buffer may be |
|
423 |
associated with any number of visible \emph{text areas}. Buffers |
|
424 |
are subject to an \emph{edit mode} that is determined from the file |
|
425 |
type. Files with extension \texttt{.thy} are assigned to the mode |
|
426 |
\emph{isabelle} and treated specifically. |
|
54321 | 427 |
|
54329 | 428 |
\medskip Isabelle theory files are automatically added to the formal |
429 |
document model of Isabelle/Scala, which maintains a family of |
|
430 |
versions of all sources for the prover. The \emph{Theories} panel |
|
54322 | 431 |
provides an overview of the status of continuous checking of theory |
54329 | 432 |
sources. Unlike batch sessions \cite{isabelle-sys}, theory nodes |
433 |
are identified by full path names; this allows to work with multiple |
|
434 |
(disjoint) Isabelle sessions simultaneously within the same editor |
|
435 |
session. |
|
54322 | 436 |
|
54329 | 437 |
Certain events to open or update buffers with theory files cause |
57310 | 438 |
Isabelle/jEdit to resolve dependencies of \emph{theory imports}. The system |
439 |
requests to load additional files into editor buffers, in order to be |
|
440 |
included in the document model for further checking. It is also possible to |
|
441 |
resolve dependencies automatically, according to \emph{Plugin Options / |
|
442 |
Isabelle / General / Auto Load}. |
|
54321 | 443 |
|
54329 | 444 |
\medskip The open text area views on theory buffers define the |
445 |
visible \emph{perspective} of Isabelle/jEdit. This is taken as a |
|
446 |
hint for document processing: the prover ensures that those parts of |
|
447 |
a theory where the user is looking are checked, while other parts |
|
54350 | 448 |
that are presently not required are ignored. The perspective is |
54330 | 449 |
changed by opening or closing text area windows, or scrolling within |
57310 | 450 |
a window. |
54322 | 451 |
|
54330 | 452 |
The \emph{Theories} panel provides some further options to influence |
453 |
the process of continuous checking: it may be switched off globally |
|
54350 | 454 |
to restrict the prover to superficial processing of command syntax. |
455 |
It is also possible to indicate theory nodes as \emph{required} for |
|
54330 | 456 |
continuous checking: this means such nodes and all their imports are |
457 |
always processed independently of the visibility status (if |
|
458 |
continuous checking is enabled). Big theory libraries that are |
|
459 |
marked as required can have significant impact on performance, |
|
460 |
though. |
|
54322 | 461 |
|
462 |
\medskip Formal markup of checked theory content is turned into GUI |
|
57310 | 463 |
rendering, based on a standard repertoire known from IDEs for programming |
464 |
languages: colors, icons, highlighting, squiggly underline, tooltips, |
|
465 |
hyperlinks etc. For outer syntax of Isabelle/Isar there is some traditional |
|
466 |
syntax-highlighting via static keyword tables and tokenization within the |
|
467 |
editor. In contrast, the painting of inner syntax (term language etc.)\ uses |
|
468 |
semantic information that is reported dynamically from the logical context. |
|
469 |
Thus the prover can provide additional markup to help the user to understand |
|
470 |
the meaning of formal text, and to produce more text with some add-on tools |
|
471 |
(e.g.\ information messages with \emph{sendback} markup by automated provers |
|
472 |
or disprovers in the background). *} |
|
54322 | 473 |
|
54352 | 474 |
|
57316 | 475 |
section {* Output \label{sec:output} *} |
54353 | 476 |
|
477 |
text {* Prover output consists of \emph{markup} and \emph{messages}. |
|
478 |
Both are directly attached to the corresponding positions in the |
|
479 |
original source text, and visualized in the text area, e.g.\ as text |
|
480 |
colours for free and bound variables, or as squiggly underline for |
|
54357 | 481 |
warnings, errors etc.\ (see also \figref{fig:output}). In the |
482 |
latter case, the corresponding messages are shown by hovering with |
|
483 |
the mouse over the highlighted text --- although in many situations |
|
54372 | 484 |
the user should already get some clue by looking at the position of |
485 |
the text highlighting. |
|
54357 | 486 |
|
487 |
\begin{figure}[htb] |
|
488 |
\begin{center} |
|
57312 | 489 |
\includegraphics[scale=0.333]{output} |
54357 | 490 |
\end{center} |
54372 | 491 |
\caption{Multiple views on prover output: gutter area with icon, |
492 |
text area with popup, overview area, Theories panel, Output panel} |
|
54357 | 493 |
\label{fig:output} |
494 |
\end{figure} |
|
54353 | 495 |
|
496 |
The ``gutter area'' on the left-hand-side of the text area uses |
|
54372 | 497 |
icons to provide a summary of the messages within the adjacent |
54353 | 498 |
line of text. Message priorities are used to prefer errors over |
57310 | 499 |
warnings, warnings over information messages, but plain output is |
500 |
ignored. |
|
54353 | 501 |
|
57310 | 502 |
The ``overview area'' on the right-hand-side of the text area uses similar |
503 |
information to paint small rectangles for the overall status of the whole |
|
504 |
text buffer. The graphics is scaled to fit the logical buffer length into |
|
505 |
the given window height. Mouse clicks on the overview area position the |
|
506 |
cursor approximately to the corresponding line of text in the buffer. |
|
507 |
Repainting the overview in real-time causes problems with big theories, so |
|
508 |
it is restricted according to \emph{Plugin Options / Isabelle / General / |
|
54372 | 509 |
Text Overview Limit} (in characters). |
54353 | 510 |
|
511 |
Another course-grained overview is provided by the \emph{Theories} |
|
54372 | 512 |
panel, but without direct correspondence to text positions. A |
513 |
double-click on one of the theory entries with their status overview |
|
514 |
opens the corresponding text buffer, without changing the cursor |
|
515 |
position. |
|
54353 | 516 |
|
517 |
\medskip In addition, the \emph{Output} panel displays prover |
|
518 |
messages that correspond to a given command, within a separate |
|
519 |
window. |
|
520 |
||
57310 | 521 |
The cursor position in the presently active text area determines the prover |
522 |
command whose cumulative message output is appended and shown in that window |
|
523 |
(in canonical order according to the internal execution of the command). |
|
524 |
There are also control elements to modify the update policy of the output |
|
525 |
wrt.\ continued editor movements. This is particularly useful with several |
|
526 |
independent instances of the \emph{Output} panel, which the Dockable Window |
|
527 |
Manager of jEdit can handle conveniently. |
|
54353 | 528 |
|
57310 | 529 |
Former users of the old TTY interaction model (e.g.\ Proof~General) might |
530 |
find a separate window for prover messages familiar, but it is important to |
|
531 |
understand that the main Prover IDE feedback happens elsewhere. It is |
|
532 |
possible to do meaningful proof editing, while using secondary output |
|
533 |
windows only rarely. |
|
54353 | 534 |
|
535 |
The main purpose of the output window is to ``debug'' unclear |
|
536 |
situations by inspecting internal state of the prover.\footnote{In |
|
54355 | 537 |
that sense, unstructured tactic scripts depend on continuous |
54353 | 538 |
debugging with internal state inspection.} Consequently, some |
539 |
special messages for \emph{tracing} or \emph{proof state} only |
|
540 |
appear here, and are not attached to the original source. |
|
541 |
||
542 |
\medskip In any case, prover messages also contain markup that may |
|
543 |
be explored recursively via tooltips or hyperlinks (see |
|
544 |
\secref{sec:tooltips-hyperlinks}), or clicked directly to initiate |
|
54355 | 545 |
certain actions (see \secref{sec:auto-tools} and |
546 |
\secref{sec:sledgehammer}). *} |
|
54353 | 547 |
|
548 |
||
57311 | 549 |
section {* Query \label{sec:query} *} |
550 |
||
551 |
text {* |
|
552 |
The \emph{Query} panel provides various GUI forms to request extra |
|
57314 | 553 |
information from the prover In old times the user would have issued some |
554 |
diagnostic command like @{command find_theorems} and inspected its output, |
|
555 |
but this is now integrated into the Prover IDE. |
|
57311 | 556 |
|
557 |
A \emph{Query} window provides some input fields and buttons for a |
|
558 |
particular query command, with output in a dedicated text area. There are |
|
559 |
various query modes: \emph{Find Theorems}, \emph{Find Constants}, |
|
57314 | 560 |
\emph{Print Context}, e.g.\ see \figref{fig:query}. As usual in jEdit, |
561 |
multiple \emph{Query} windows may be active at the same time: any number of |
|
57313 | 562 |
floating instances, but at most one docked instance (which is used by |
563 |
default). |
|
564 |
||
565 |
\begin{figure}[htb] |
|
566 |
\begin{center} |
|
567 |
\includegraphics[scale=0.333]{query} |
|
568 |
\end{center} |
|
569 |
\caption{An instance of the Query panel} |
|
570 |
\label{fig:query} |
|
571 |
\end{figure} |
|
57311 | 572 |
|
57314 | 573 |
\medskip The following GUI elements are common to all query modes: |
57311 | 574 |
\begin{itemize} |
575 |
||
576 |
\item The spinning wheel provides feedback about the status of a pending |
|
577 |
query wrt.\ the evaluation of its context and its own operation. |
|
578 |
||
579 |
\item The \emph{Apply} button attaches a fresh query invocation to the |
|
580 |
current context of the command where the cursor is pointing in the text. |
|
581 |
||
582 |
\item The \emph{Search} field allows to highlight query output according to |
|
57313 | 583 |
some regular expression, in the notation that is commonly used on the Java |
584 |
platform. This may serve as an additional visual filter of the result. |
|
57311 | 585 |
|
586 |
\item The \emph{Zoom} box controls the font size of the output area. |
|
587 |
||
588 |
\end{itemize} |
|
589 |
||
590 |
All query operations are asynchronous: there is no need to wait for the |
|
591 |
evaluation of the document for the query context, nor for the query |
|
592 |
operation itself. Query output may be detached as independent \emph{Info} |
|
593 |
window, using a menu operation of the dockable window manager. The printed |
|
594 |
result usually provides sufficient clues about the original query, with some |
|
595 |
hyperlink to its context (via markup of its head line). |
|
596 |
*} |
|
597 |
||
598 |
||
599 |
subsection {* Find theorems *} |
|
600 |
||
601 |
text {* |
|
57313 | 602 |
The \emph{Query} panel in \emph{Find Theorems} mode retrieves facts from the |
603 |
theory or proof context matching all of given criteria in the \emph{Find} |
|
604 |
text field. A single criterium has the following syntax: |
|
57311 | 605 |
|
57313 | 606 |
@{rail \<open> |
607 |
('-'?) ('name' ':' @{syntax nameref} | 'intro' | 'elim' | 'dest' | |
|
608 |
'solves' | 'simp' ':' @{syntax term} | @{syntax term}) |
|
609 |
\<close>} |
|
610 |
||
611 |
See also the Isar command @{command find_theorems} in |
|
612 |
\cite{isabelle-isar-ref}. |
|
57311 | 613 |
*} |
614 |
||
615 |
||
616 |
subsection {* Find constants *} |
|
617 |
||
618 |
text {* |
|
57313 | 619 |
The \emph{Query} panel in \emph{Find Constants} mode prints all constants |
620 |
whose type meets all of the given criteria in the \emph{Find} text field. |
|
621 |
A single criterium has the following syntax: |
|
622 |
||
623 |
@{rail \<open> |
|
624 |
('-'?) |
|
625 |
('name' ':' @{syntax nameref} | 'strict' ':' @{syntax type} | @{syntax type}) |
|
626 |
\<close>} |
|
627 |
||
628 |
See also the Isar command @{command find_consts} in |
|
629 |
\cite{isabelle-isar-ref}. |
|
57311 | 630 |
*} |
631 |
||
632 |
||
633 |
subsection {* Print context *} |
|
634 |
||
635 |
text {* |
|
57313 | 636 |
The \emph{Query} panel in \emph{Print Context} mode prints information from |
637 |
the theory or proof context, or proof state. See also the Isar commands |
|
638 |
@{command print_context}, @{command print_cases}, @{command print_binds}, |
|
639 |
@{command print_theorems}, @{command print_state} in |
|
640 |
\cite{isabelle-isar-ref}. |
|
57311 | 641 |
*} |
642 |
||
643 |
||
54352 | 644 |
section {* Tooltips and hyperlinks \label{sec:tooltips-hyperlinks} *} |
645 |
||
57310 | 646 |
text {* |
647 |
Formally processed text (prover input or output) contains rich markup |
|
648 |
information that can be explored further by using the @{verbatim CONTROL} |
|
649 |
modifier key on Linux and Windows, or @{verbatim COMMAND} on Mac OS X. |
|
650 |
Hovering with the mouse while the modifier is pressed reveals a |
|
651 |
\emph{tooltip} (grey box over the text with a yellow popup) and/or a |
|
652 |
\emph{hyperlink} (black rectangle over the text with change of mouse |
|
653 |
pointer); see also \figref{fig:tooltip}. |
|
54331 | 654 |
|
54357 | 655 |
\begin{figure}[htb] |
54331 | 656 |
\begin{center} |
57312 | 657 |
\includegraphics[scale=0.5]{popup1} |
54331 | 658 |
\end{center} |
54356 | 659 |
\caption{Tooltip and hyperlink for some formal entity} |
54350 | 660 |
\label{fig:tooltip} |
54331 | 661 |
\end{figure} |
662 |
||
57310 | 663 |
Tooltip popups use the same rendering mechanisms as the main text |
54350 | 664 |
area, and further tooltips and/or hyperlinks may be exposed |
54357 | 665 |
recursively by the same mechanism; see \figref{fig:nested-tooltips}. |
54323 | 666 |
|
54357 | 667 |
\begin{figure}[htb] |
54331 | 668 |
\begin{center} |
57312 | 669 |
\includegraphics[scale=0.5]{popup2} |
54331 | 670 |
\end{center} |
54356 | 671 |
\caption{Nested tooltips over formal entities} |
54350 | 672 |
\label{fig:nested-tooltips} |
54331 | 673 |
\end{figure} |
54350 | 674 |
|
675 |
The tooltip popup window provides some controls to \emph{close} or |
|
676 |
\emph{detach} the window, turning it into a separate \emph{Info} |
|
54372 | 677 |
window managed by jEdit. The @{verbatim ESCAPE} key closes |
54352 | 678 |
\emph{all} popups, which is particularly relevant when nested |
679 |
tooltips are stacking up. |
|
680 |
||
57310 | 681 |
\medskip A black rectangle in the text indicates a hyperlink that may be |
682 |
followed by a mouse click (while the @{verbatim CONTROL} or @{verbatim |
|
683 |
COMMAND} modifier key is still pressed). Such jumps to other text locations |
|
684 |
are recorded by the \emph{Navigator} plugin, which is bundled with |
|
685 |
Isabelle/jEdit and enabled by default, including navigation arrows in the |
|
686 |
main jEdit toolbar. |
|
54352 | 687 |
|
688 |
Also note that the link target may be a file that is itself not |
|
689 |
subject to formal document processing of the editor session and thus |
|
690 |
prevents further exploration: the chain of hyperlinks may end in |
|
54372 | 691 |
some source file of the underlying logic image, or within the |
692 |
Isabelle/ML bootstrap sources of Isabelle/Pure. *} |
|
54321 | 693 |
|
694 |
||
54361 | 695 |
section {* Text completion \label{sec:completion} *} |
696 |
||
54362 | 697 |
text {* \paragraph{Completion tables} are determined statically from |
698 |
the ``outer syntax'' of the underlying edit mode (for theory files |
|
54372 | 699 |
this is the syntax of Isar commands), and specifications of Isabelle |
54362 | 700 |
symbols (see also \secref{sec:symbols}). |
701 |
||
702 |
Symbols are completed in backslashed forms, e.g.\ @{verbatim |
|
703 |
"\\"}@{verbatim "forall"} or @{verbatim "\<forall>"} that both produce the |
|
704 |
Isabelle symbol @{text "\<forall>"} in its Unicode rendering.\footnote{The |
|
705 |
extra backslash avoids overlap with keywords of the buffer syntax, |
|
54372 | 706 |
and allows to produce Isabelle symbols robustly in most syntactic |
54362 | 707 |
contexts.} Alternatively, symbol abbreviations may be used as |
708 |
specified in @{file "$ISABELLE_HOME/etc/symbols"}. |
|
709 |
||
710 |
\paragraph{Completion popups} are required in situations of |
|
711 |
ambiguous completion results or where explicit confirmation is |
|
712 |
demanded before inserting completed text into the buffer. |
|
713 |
||
714 |
The popup is some minimally invasive GUI component over the text |
|
715 |
area. It interprets special keys @{verbatim TAB}, @{verbatim |
|
716 |
ESCAPE}, @{verbatim UP}, @{verbatim DOWN}, @{verbatim PAGE_UP}, |
|
717 |
@{verbatim PAGE_DOWN}, but all other key events are passed to the |
|
718 |
underlying text area. This allows to ignore unwanted completions |
|
719 |
most of the time and continue typing quickly. |
|
54361 | 720 |
|
54362 | 721 |
The meaning of special keys is as follows: |
722 |
||
723 |
\medskip |
|
724 |
\begin{tabular}{ll} |
|
54372 | 725 |
\textbf{key} & \textbf{action} \\\hline |
54362 | 726 |
@{verbatim "TAB"} & select completion \\ |
727 |
@{verbatim "ESCAPE"} & dismiss popup \\ |
|
728 |
@{verbatim "UP"} & move up one item \\ |
|
729 |
@{verbatim "DOWN"} & move down one item \\ |
|
730 |
@{verbatim "PAGE_UP"} & move up one page of items \\ |
|
731 |
@{verbatim "PAGE_DOWN"} & move down one page of items \\ |
|
732 |
\end{tabular} |
|
733 |
\medskip |
|
734 |
||
735 |
Movement within the popup is only active for multiple items. |
|
736 |
Otherwise the corresponding key event retains its standard meaning |
|
737 |
within the underlying text area. |
|
738 |
||
54372 | 739 |
\paragraph{Explicit completion} is triggered by the keyboard |
56059
2390391584c2
some document antiquotations for Isabelle/jEdit elements;
wenzelm
parents:
55880
diff
changeset
|
740 |
shortcut @{verbatim "C+b"} (action @{action "isabelle.complete"}). |
54372 | 741 |
This overrides the original jEdit binding for action @{verbatim |
742 |
"complete-word"}, but the latter is used as fall-back for |
|
54362 | 743 |
non-Isabelle edit modes. It is also possible to restore the |
54372 | 744 |
original jEdit keyboard mapping of @{verbatim "complete-word"} via |
745 |
\emph{Global Options / Shortcuts}. |
|
54361 | 746 |
|
54362 | 747 |
Replacement text is inserted immediately into the buffer, unless |
748 |
ambiguous results demand an explicit popup. |
|
749 |
||
57311 | 750 |
\paragraph{Implicit completion} is triggered by regular keyboard input |
751 |
events during of the editing process in the main jEdit text area (and a few |
|
752 |
additional text fields like the ones of the the \emph{Query} panel, see |
|
753 |
\secref{sec:query}). Implicit completion depends on on further |
|
754 |
side-conditions: |
|
54362 | 755 |
|
756 |
\begin{enumerate} |
|
757 |
||
758 |
\item The system option @{system_option jedit_completion} needs to |
|
759 |
be enabled (default). |
|
760 |
||
54372 | 761 |
\item Completion of syntax keywords requires at least 3 relevant |
762 |
characters in the text. |
|
54362 | 763 |
|
54372 | 764 |
\item The system option @{system_option jedit_completion_delay} |
57310 | 765 |
determines an additional delay (0.5 by default), before opening a |
54372 | 766 |
completion popup. |
54361 | 767 |
|
54362 | 768 |
\item The system option @{system_option jedit_completion_immediate} |
769 |
(disabled by default) controls whether replacement text should be |
|
54372 | 770 |
inserted immediately without popup. This is restricted to Isabelle |
771 |
symbols and their abbreviations (\secref{sec:symbols}) --- plain |
|
772 |
keywords always demand a popup for clarity. |
|
54362 | 773 |
|
54372 | 774 |
\item Completion of symbol abbreviations with only one relevant |
775 |
character in the text always enforces an explicit popup, |
|
776 |
independently of @{system_option jedit_completion_immediate}. |
|
54362 | 777 |
|
778 |
\end{enumerate} |
|
54361 | 779 |
|
54362 | 780 |
These completion options may be configured in \emph{Plugin Options / |
781 |
Isabelle / General / Completion}. The default is quite moderate in |
|
782 |
showing occasional popups and refraining from immediate insertion. |
|
54361 | 783 |
|
54372 | 784 |
In contrast, more aggressive completion works via @{system_option |
54362 | 785 |
jedit_completion_delay}~@{verbatim "= 0.0"} and @{system_option |
786 |
jedit_completion_immediate}~@{verbatim "= true"}. Thus the editing |
|
54372 | 787 |
process becomes dependent on the system guessing correctly what the |
788 |
user had in mind. It requires some practice (and study of the |
|
789 |
symbol abbreviation tables) to become productive in this advanced |
|
790 |
mode. |
|
54362 | 791 |
|
54372 | 792 |
In any case, unintended completions can be reverted by the regular |
57310 | 793 |
@{verbatim undo} operation of jEdit. *} |
54361 | 794 |
|
795 |
||
54362 | 796 |
section {* Isabelle symbols \label{sec:symbols} *} |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
797 |
|
54323 | 798 |
text {* Isabelle sources consist of \emph{symbols} that extend plain |
54330 | 799 |
ASCII to allow infinitely many mathematical symbols within the |
800 |
formal sources. This works without depending on particular |
|
54372 | 801 |
encodings and varying Unicode standards |
54352 | 802 |
\cite{Wenzel:2011:CICM}.\footnote{Raw Unicode characters within |
803 |
formal sources would compromise portability and reliability in the |
|
54372 | 804 |
face of changing interpretation of special features of Unicode, such |
805 |
as Combining Characters or Bi-directional Text.} |
|
54323 | 806 |
|
807 |
For the prover back-end, formal text consists of ASCII characters |
|
808 |
that are grouped according to some simple rules, e.g.\ as plain |
|
809 |
``@{verbatim a}'' or symbolic ``@{verbatim "\<alpha>"}''. |
|
810 |
||
54352 | 811 |
For the editor front-end, a certain subset of symbols is rendered |
812 |
physically via Unicode glyphs, in order to show ``@{verbatim "\<alpha>"}'' |
|
813 |
as ``@{text "\<alpha>"}'', for example. This symbol interpretation is |
|
814 |
specified by the Isabelle system distribution in @{file |
|
815 |
"$ISABELLE_HOME/etc/symbols"} and may be augmented by the user in |
|
54372 | 816 |
@{file_unchecked "$ISABELLE_HOME_USER/etc/symbols"}. |
54323 | 817 |
|
54329 | 818 |
The appendix of \cite{isabelle-isar-ref} gives an overview of the |
819 |
standard interpretation of finitely many symbols from the infinite |
|
54352 | 820 |
collection. Uninterpreted symbols are displayed literally, e.g.\ |
821 |
``@{verbatim "\<foobar>"}''. Overlap of Unicode characters used in |
|
54372 | 822 |
symbol interpretation with informal ones (which might appear e.g.\ |
823 |
in comments) needs to be avoided! Raw Unicode characters within |
|
824 |
prover source files should be restricted to informal parts, e.g.\ to |
|
825 |
write text in non-latin alphabets in comments. |
|
54323 | 826 |
|
54352 | 827 |
\medskip \paragraph{Encoding.} Technically, the Unicode view on |
828 |
Isabelle symbols is an \emph{encoding} in jEdit (not in the |
|
829 |
underlying JVM) that is called @{verbatim "UTF-8-Isabelle"}. It is |
|
830 |
provided by the Isabelle/jEdit plugin and enabled by default for all |
|
831 |
source files. Sometimes such defaults are reset accidentally, or |
|
832 |
malformed UTF-8 sequences in the text force jEdit to fall back on a |
|
833 |
different encoding like @{verbatim "ISO-8859-15"}. In that case, |
|
834 |
verbatim ``@{verbatim "\<alpha>"}'' will be shown in the text buffer |
|
835 |
instead of its Unicode rendering ``@{text "\<alpha>"}''. The jEdit menu |
|
836 |
operation \emph{File / Reload with Encoding / UTF-8-Isabelle} helps |
|
837 |
to resolve such problems, potentially after repairing malformed |
|
838 |
parts of the text. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
839 |
|
54352 | 840 |
\medskip \paragraph{Font.} Correct rendering via Unicode requires a |
841 |
font that contains glyphs for the corresponding codepoints. Most |
|
842 |
system fonts lack that, so Isabelle/jEdit prefers its own |
|
843 |
application font @{verbatim IsabelleText}, which ensures that |
|
844 |
standard collection of Isabelle symbols are actually seen on the |
|
845 |
screen (or printer). |
|
54329 | 846 |
|
54330 | 847 |
Note that a Java/AWT/Swing application can load additional fonts |
54372 | 848 |
only if they are not installed on the operating system already! |
849 |
Some old version of @{verbatim IsabelleText} that happens to be |
|
57310 | 850 |
provided by the operating system would prevent Isabelle/jEdit to use |
54372 | 851 |
its bundled version. This could lead to missing glyphs (black |
852 |
rectangles), when the system version of @{verbatim IsabelleText} is |
|
853 |
older than the application version. This problem can be avoided by |
|
854 |
refraining to ``install'' any version of @{verbatim IsabelleText} in |
|
57310 | 855 |
the first place (although it is occasionally tempting to use |
54372 | 856 |
the same font in other applications). |
54329 | 857 |
|
54323 | 858 |
\medskip \paragraph{Input methods.} In principle, Isabelle/jEdit |
859 |
could delegate the problem to produce Isabelle symbols in their |
|
860 |
Unicode rendering to the underlying operating system and its |
|
54329 | 861 |
\emph{input methods}. Regular jEdit also provides various ways to |
862 |
work with \emph{abbreviations} to produce certain non-ASCII |
|
863 |
characters. Since none of these standard input methods work |
|
864 |
satisfactorily for the mathematical characters required for |
|
865 |
Isabelle, various specific Isabelle/jEdit mechanisms are provided. |
|
54323 | 866 |
|
54329 | 867 |
Here is a summary for practically relevant input methods for |
54330 | 868 |
Isabelle symbols: |
54323 | 869 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
870 |
\begin{enumerate} |
54323 | 871 |
|
57310 | 872 |
\item The \emph{Symbols} panel: some GUI buttons allow to insert |
54323 | 873 |
certain symbols in the text buffer. There are also tooltips to |
54372 | 874 |
reveal the official Isabelle representation with some additional |
54323 | 875 |
information about \emph{symbol abbreviations} (see below). |
876 |
||
877 |
\item Copy / paste from decoded source files: text that is rendered |
|
54352 | 878 |
as Unicode already can be re-used to produce further text. This |
879 |
also works between different applications, e.g.\ Isabelle/jEdit and |
|
880 |
some web browser or mail client, as long as the same Unicode view on |
|
57310 | 881 |
Isabelle symbols is used. |
54323 | 882 |
|
54329 | 883 |
\item Copy / paste from prover output within Isabelle/jEdit. The |
884 |
same principles as for text buffers apply, but note that \emph{copy} |
|
54352 | 885 |
in secondary Isabelle/jEdit windows works via the keyboard shortcut |
54372 | 886 |
@{verbatim "C+c"}, while jEdit menu actions always refer to the |
54352 | 887 |
primary text area! |
54323 | 888 |
|
889 |
\item Completion provided by Isabelle plugin (see |
|
890 |
\secref{sec:completion}). Isabelle symbols have a canonical name |
|
891 |
and optional abbreviations. This can be used with the text |
|
892 |
completion mechanism of Isabelle/jEdit, to replace a prefix of the |
|
54329 | 893 |
actual symbol like @{verbatim "\<lambda>"}, or its backslashed name |
894 |
@{verbatim "\\"}@{verbatim "lambda"}, or its ASCII abbreviation |
|
54330 | 895 |
@{verbatim "%"} by the Unicode rendering. |
54323 | 896 |
|
897 |
The following table is an extract of the information provided by the |
|
54329 | 898 |
standard @{file "$ISABELLE_HOME/etc/symbols"} file: |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
899 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
900 |
\medskip |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
901 |
\begin{tabular}{lll} |
54372 | 902 |
\textbf{symbol} & \textbf{backslashed name} & \textbf{abbreviation} \\\hline |
903 |
@{text "\<lambda>"} & @{verbatim "\\lambda"} & @{verbatim "%"} \\ |
|
904 |
@{text "\<Rightarrow>"} & @{verbatim "\\Rightarrow"} & @{verbatim "=>"} \\ |
|
905 |
@{text "\<Longrightarrow>"} & @{verbatim "\\Longrightarrow"} & @{verbatim "==>"} \\[0.5ex] |
|
906 |
@{text "\<And>"} & @{verbatim "\\And"} & @{verbatim "!!"} \\ |
|
907 |
@{text "\<equiv>"} & @{verbatim "\\equiv"} & @{verbatim "=="} \\[0.5ex] |
|
908 |
@{text "\<forall>"} & @{verbatim "\\forall"} & @{verbatim "!"} \\ |
|
909 |
@{text "\<exists>"} & @{verbatim "\\exists"} & @{verbatim "?"} \\ |
|
910 |
@{text "\<longrightarrow>"} & @{verbatim "\\longrightarrow"} & @{verbatim "-->"} \\ |
|
911 |
@{text "\<and>"} & @{verbatim "\\and"} & @{verbatim "&"} \\ |
|
912 |
@{text "\<or>"} & @{verbatim "\\or"} & @{verbatim "|"} \\ |
|
913 |
@{text "\<not>"} & @{verbatim "\\not"} & @{verbatim "~"} \\ |
|
914 |
@{text "\<noteq>"} & @{verbatim "\\noteq"} & @{verbatim "~="} \\ |
|
915 |
@{text "\<in>"} & @{verbatim "\\in"} & @{verbatim ":"} \\ |
|
916 |
@{text "\<notin>"} & @{verbatim "\\notin"} & @{verbatim "~:"} \\ |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
917 |
\end{tabular} |
54329 | 918 |
\medskip |
919 |
||
920 |
Note that the above abbreviations refer to the input method. The |
|
921 |
logical notation provides ASCII alternatives that often coincide, |
|
54352 | 922 |
but deviate occasionally. This occasionally causes user confusion |
923 |
with very old-fashioned Isabelle source that use ASCII replacement |
|
54372 | 924 |
notation like @{verbatim "!"} or @{verbatim "ALL"} directly in the |
925 |
text. |
|
926 |
||
927 |
On the other hand, coincidence of symbol abbreviations with ASCII |
|
928 |
replacement syntax syntax helps to update old theory sources via |
|
929 |
explicit completion (see also @{verbatim "C+b"} explained in |
|
930 |
\secref{sec:completion}). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
931 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
932 |
\end{enumerate} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
933 |
|
54323 | 934 |
\paragraph{Control symbols.} There are some special control symbols |
54372 | 935 |
to modify the display style of a single symbol (without |
936 |
nesting). Control symbols may be applied to a region of selected |
|
937 |
text, either using the \emph{Symbols} panel or keyboard shortcuts or |
|
938 |
jEdit actions. These editor operations produce a separate control |
|
939 |
symbol for each symbol in the text, in order to make the whole text |
|
940 |
appear in a certain style. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
941 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
942 |
\medskip |
54352 | 943 |
\begin{tabular}{llll} |
54372 | 944 |
\textbf{style} & \textbf{symbol} & \textbf{shortcut} & \textbf{action} \\\hline |
56059
2390391584c2
some document antiquotations for Isabelle/jEdit elements;
wenzelm
parents:
55880
diff
changeset
|
945 |
superscript & @{verbatim "\<^sup>"} & @{verbatim "C+e UP"} & @{action "isabelle.control-sup"} \\ |
2390391584c2
some document antiquotations for Isabelle/jEdit elements;
wenzelm
parents:
55880
diff
changeset
|
946 |
subscript & @{verbatim "\<^sub>"} & @{verbatim "C+e DOWN"} & @{action "isabelle.control-sub"} \\ |
2390391584c2
some document antiquotations for Isabelle/jEdit elements;
wenzelm
parents:
55880
diff
changeset
|
947 |
bold face & @{verbatim "\<^bold>"} & @{verbatim "C+e RIGHT"} & @{action "isabelle.control-bold"} \\ |
2390391584c2
some document antiquotations for Isabelle/jEdit elements;
wenzelm
parents:
55880
diff
changeset
|
948 |
reset & & @{verbatim "C+e LEFT"} & @{action "isabelle.control-reset"} \\ |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
949 |
\end{tabular} |
54352 | 950 |
\medskip |
54323 | 951 |
|
54352 | 952 |
To produce a single control symbol, it is also possible to complete |
953 |
on @{verbatim "\\"}@{verbatim sup}, @{verbatim "\\"}@{verbatim sub}, |
|
954 |
@{verbatim "\\"}@{verbatim bold} as for regular symbols. *} |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
955 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
956 |
|
54355 | 957 |
section {* Automatically tried tools \label{sec:auto-tools} *} |
54353 | 958 |
|
54354 | 959 |
text {* Continuous document processing works asynchronously in the |
960 |
background. Visible document source that has been evaluated already |
|
961 |
may get augmented by additional results of \emph{asynchronous print |
|
962 |
functions}. The canonical example is proof state output, which is |
|
963 |
always enabled. More heavy-weight print functions may be applied, |
|
964 |
in order to prove or disprove parts of the formal text by other |
|
965 |
means. |
|
966 |
||
967 |
Isabelle/HOL provides various automatically tried tools that operate |
|
968 |
on outermost goal statements (e.g.\ @{command lemma}, @{command |
|
969 |
theorem}), independently of the state of the current proof attempt. |
|
970 |
They work implicitly without any arguments. Results are output as |
|
971 |
\emph{information messages}, which are indicated in the text area by |
|
54356 | 972 |
blue squiggles and a blue information sign in the gutter (see |
973 |
\figref{fig:auto-tools}). The message content may be shown as for |
|
57316 | 974 |
other output (see also \secref{sec:output}). Some tools |
54356 | 975 |
produce output with \emph{sendback} markup, which means that |
976 |
clicking on certain parts of the output inserts that text into the |
|
977 |
source in the proper place. |
|
978 |
||
54357 | 979 |
\begin{figure}[htb] |
54356 | 980 |
\begin{center} |
57312 | 981 |
\includegraphics[scale=0.333]{auto-tools} |
54356 | 982 |
\end{center} |
57312 | 983 |
\caption{Result of automatically tried tools} |
54356 | 984 |
\label{fig:auto-tools} |
985 |
\end{figure} |
|
54354 | 986 |
|
54372 | 987 |
\medskip The following Isabelle system options control the behavior |
54354 | 988 |
of automatically tried tools (see also the jEdit dialog window |
989 |
\emph{Plugin Options / Isabelle / General / Automatically tried |
|
990 |
tools}): |
|
991 |
||
992 |
\begin{itemize} |
|
993 |
||
994 |
\item @{system_option auto_methods} controls automatic use of a |
|
995 |
combination of standard proof methods (@{method auto}, @{method |
|
54372 | 996 |
simp}, @{method blast}, etc.). This corresponds to the Isar command |
54354 | 997 |
@{command "try0"}. |
998 |
||
999 |
The tool is disabled by default, since unparameterized invocation of |
|
1000 |
standard proof methods often consumes substantial CPU resources |
|
1001 |
without leading to success. |
|
1002 |
||
1003 |
\item @{system_option auto_nitpick} controls a slightly reduced |
|
1004 |
version of @{command nitpick}, which tests for counterexamples using |
|
1005 |
first-order relational logic. See also the Nitpick manual |
|
1006 |
\cite{isabelle-nitpick}. |
|
1007 |
||
1008 |
This tool is disabled by default, due to the extra overhead of |
|
1009 |
invoking an external Java process for each attempt to disprove a |
|
1010 |
subgoal. |
|
1011 |
||
1012 |
\item @{system_option auto_quickcheck} controls automatic use of |
|
1013 |
@{command quickcheck}, which tests for counterexamples using a |
|
1014 |
series of assignments for free variables of a subgoal. |
|
1015 |
||
1016 |
This tool is \emph{enabled} by default. It requires little |
|
1017 |
overhead, but is a bit weaker than @{command nitpick}. |
|
1018 |
||
1019 |
\item @{system_option auto_sledgehammer} controls a significantly |
|
1020 |
reduced version of @{command sledgehammer}, which attempts to prove |
|
1021 |
a subgoal using external automatic provers. See also the |
|
1022 |
Sledgehammer manual \cite{isabelle-sledgehammer}. |
|
1023 |
||
1024 |
This tool is disabled by default, due to the relatively heavy nature |
|
1025 |
of Sledgehammer. |
|
1026 |
||
1027 |
\item @{system_option auto_solve_direct} controls automatic use of |
|
1028 |
@{command solve_direct}, which checks whether the current subgoals |
|
1029 |
can be solved directly by an existing theorem. This also helps to |
|
1030 |
detect duplicate lemmas. |
|
1031 |
||
1032 |
This tool is \emph{enabled} by default. |
|
1033 |
||
1034 |
\end{itemize} |
|
1035 |
||
1036 |
Invocation of automatically tried tools is subject to some global |
|
1037 |
policies of parallel execution, which may be configured as follows: |
|
1038 |
||
1039 |
\begin{itemize} |
|
1040 |
||
1041 |
\item @{system_option auto_time_limit} (default 2.0) determines the |
|
54372 | 1042 |
timeout (in seconds) for each tool execution. |
54354 | 1043 |
|
1044 |
\item @{system_option auto_time_start} (default 1.0) determines the |
|
1045 |
start delay (in seconds) for automatically tried tools, after the |
|
1046 |
main command evaluation is finished. |
|
1047 |
||
1048 |
\end{itemize} |
|
1049 |
||
1050 |
Each tool is submitted independently to the pool of parallel |
|
1051 |
execution tasks in Isabelle/ML, using hardwired priorities according |
|
1052 |
to its relative ``heaviness''. The main stages of evaluation and |
|
1053 |
printing of proof states take precedence, but an already running |
|
1054 |
tool is not canceled and may thus reduce reactivity of proof |
|
1055 |
document processing. |
|
1056 |
||
1057 |
Users should experiment how the available CPU resources (number of |
|
1058 |
cores) are best invested to get additional feedback from prover in |
|
54372 | 1059 |
the background, by using a selection of weaker or stronger tools. |
1060 |
*} |
|
54353 | 1061 |
|
1062 |
||
1063 |
section {* Sledgehammer \label{sec:sledgehammer} *} |
|
1064 |
||
54356 | 1065 |
text {* The \emph{Sledgehammer} panel (\figref{fig:sledgehammer}) |
54372 | 1066 |
provides a view on some independent execution of the Isar command |
1067 |
@{command sledgehammer}, with process indicator (spinning wheel) and |
|
1068 |
GUI elements for important Sledgehammer arguments and options. Any |
|
54356 | 1069 |
number of Sledgehammer panels may be active, according to the |
54372 | 1070 |
standard policies of Dockable Window Management in jEdit. Closing |
1071 |
such windows also cancels the corresponding prover tasks. |
|
54356 | 1072 |
|
54357 | 1073 |
\begin{figure}[htb] |
54356 | 1074 |
\begin{center} |
57312 | 1075 |
\includegraphics[scale=0.333]{sledgehammer} |
54356 | 1076 |
\end{center} |
1077 |
\caption{An instance of the Sledgehammer panel} |
|
1078 |
\label{fig:sledgehammer} |
|
1079 |
\end{figure} |
|
54355 | 1080 |
|
1081 |
The \emph{Apply} button attaches a fresh invocation of @{command |
|
1082 |
sledgehammer} to the command where the cursor is pointing in the |
|
1083 |
text --- this should be some pending proof problem. Further buttons |
|
1084 |
like \emph{Cancel} and \emph{Locate} help to manage the running |
|
1085 |
process. |
|
1086 |
||
1087 |
Results appear incrementally in the output window of the panel. |
|
54372 | 1088 |
Proposed proof snippets are marked-up as \emph{sendback}, which |
54355 | 1089 |
means a single mouse click inserts the text into a suitable place of |
1090 |
the original source. Some manual editing may be required |
|
1091 |
nonetheless, say to remove earlier proof attempts. *} |
|
54353 | 1092 |
|
1093 |
||
54358 | 1094 |
chapter {* Miscellaneous tools *} |
1095 |
||
54359 | 1096 |
section {* Timing *} |
1097 |
||
1098 |
text {* Managed evaluation of commands within PIDE documents includes |
|
1099 |
timing information, which consists of elapsed (wall-clock) time, CPU |
|
1100 |
time, and GC (garbage collection) time. Note that in a |
|
1101 |
multithreaded system it is difficult to measure execution time |
|
1102 |
precisely: elapsed time is closer to the real requirements of |
|
1103 |
runtime resources than CPU or GC time, which are both subject to |
|
1104 |
influences from the parallel environment that are outside the scope |
|
1105 |
of the current command transaction. |
|
1106 |
||
1107 |
The \emph{Timing} panel provides an overview of cumulative command |
|
1108 |
timings for each document node. Commands with elapsed time below |
|
1109 |
the given threshold are ignored in the grand total. Nodes are |
|
1110 |
sorted according to their overall timing. For the document node |
|
1111 |
that corresponds to the current buffer, individual command timings |
|
1112 |
are shown as well. A double-click on a theory node or command moves |
|
1113 |
the editor focus to that particular source position. |
|
1114 |
||
1115 |
It is also possible to reveal individual timing information via some |
|
1116 |
tooltip for the corresponding command keyword, using the technique |
|
1117 |
of mouse hovering with @{verbatim CONTROL}/@{verbatim COMMAND} |
|
1118 |
modifier key as explained in \secref{sec:tooltips-hyperlinks}. |
|
1119 |
Actual display of timing depends on the global option |
|
1120 |
@{system_option jedit_timing_threshold}, which can be configured in |
|
54360 | 1121 |
"Plugin Options / Isabelle / General". |
1122 |
||
1123 |
\medskip The \emph{Monitor} panel provides a general impression of |
|
1124 |
recent activity of the farm of worker threads in Isabelle/ML. Its |
|
1125 |
display is continuously updated according to @{system_option |
|
1126 |
editor_chart_delay}. Note that the painting of the chart takes |
|
1127 |
considerable runtime itself --- on the Java Virtual Machine that |
|
1128 |
runs Isabelle/Scala, not Isabelle/ML. Internally, the |
|
1129 |
Isabelle/Scala module @{verbatim isabelle.ML_Statistics} provides |
|
54372 | 1130 |
further access to statistics of Isabelle/ML. *} |
54359 | 1131 |
|
1132 |
||
54358 | 1133 |
section {* Low-level output *} |
1134 |
||
1135 |
text {* Prover output is normally shown directly in the main text area |
|
54372 | 1136 |
or secondary \emph{Output} panels, as explained in |
57316 | 1137 |
\secref{sec:output}. |
54358 | 1138 |
|
1139 |
Beyond this, it is occasionally useful to inspect low-level output |
|
1140 |
channels via some of the following additional panels: |
|
1141 |
||
1142 |
\begin{itemize} |
|
1143 |
||
1144 |
\item \emph{Protocol} shows internal messages between the |
|
1145 |
Isabelle/Scala and Isabelle/ML side of the PIDE editing protocol. |
|
1146 |
Recording of messages starts with the first activation of the |
|
1147 |
corresponding dockable window; earlier messages are lost. |
|
1148 |
||
1149 |
Actual display of protocol messages causes considerable slowdown, so |
|
54372 | 1150 |
it is important to undock all \emph{Protocol} panels for production |
1151 |
work. |
|
54358 | 1152 |
|
1153 |
\item \emph{Raw Output} shows chunks of text from the @{verbatim |
|
1154 |
stdout} and @{verbatim stderr} channels of the prover process. |
|
1155 |
Recording of output starts with the first activation of the |
|
1156 |
corresponding dockable window; earlier output is lost. |
|
1157 |
||
1158 |
The implicit stateful nature of physical I/O channels makes it |
|
1159 |
difficult to relate raw output to the actual command from where it |
|
1160 |
was originating. Parallel execution may add to the confusion. |
|
1161 |
Peeking at physical process I/O is only the last resort to diagnose |
|
57310 | 1162 |
problems with tools that are not PIDE compliant. |
54358 | 1163 |
|
57310 | 1164 |
Under normal circumstances, prover output always works via managed message |
1165 |
channels (corresponding to @{ML writeln}, @{ML warning}, @{ML |
|
1166 |
Output.error_message} etc.\ in Isabelle/ML), which are displayed by regular |
|
57316 | 1167 |
means within the document model (\secref{sec:output}). |
54358 | 1168 |
|
1169 |
\item \emph{Syslog} shows system messages that might be relevant to |
|
1170 |
diagnose problems with the startup or shutdown phase of the prover |
|
1171 |
process; this also includes raw output on @{verbatim stderr}. |
|
1172 |
||
1173 |
A limited amount of syslog messages are buffered, independently of |
|
1174 |
the docking state of the \emph{Syslog} panel. This allows to |
|
1175 |
diagnose serious problems with Isabelle/PIDE process management, |
|
1176 |
outside of the actual protocol layer. |
|
1177 |
||
1178 |
Under normal situations, such low-level system output can be |
|
1179 |
ignored. |
|
1180 |
||
1181 |
\end{itemize} |
|
1182 |
*} |
|
1183 |
||
1184 |
||
54329 | 1185 |
chapter {* Known problems and workarounds \label{sec:problems} *} |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1186 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1187 |
text {* |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1188 |
\begin{itemize} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1189 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1190 |
\item \textbf{Problem:} Odd behavior of some diagnostic commands with |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1191 |
global side-effects, like writing a physical file. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1192 |
|
54372 | 1193 |
\textbf{Workaround:} Copy / paste complete command text from |
57310 | 1194 |
elsewhere, or disable continuous checking temporarily. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1195 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1196 |
\item \textbf{Problem:} No way to delete document nodes from the overall |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1197 |
collection of theories. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1198 |
|
54329 | 1199 |
\textbf{Workaround:} Ignore unused files. Restart whole |
1200 |
Isabelle/jEdit session in worst-case situation. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1201 |
|
54330 | 1202 |
\item \textbf{Problem:} Keyboard shortcuts @{verbatim "C+PLUS"} and |
1203 |
@{verbatim "C+MINUS"} for adjusting the editor font size depend on |
|
1204 |
platform details and national keyboards. |
|
1205 |
||
54372 | 1206 |
\textbf{Workaround:} Rebind keys via \emph{Global Options / |
1207 |
Shortcuts}. |
|
54330 | 1208 |
|
53886
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
1209 |
\item \textbf{Problem:} The Mac OS X keyboard shortcut @{verbatim |
54349 | 1210 |
"COMMAND+COMMA"} for application \emph{Preferences} is in conflict |
1211 |
with the jEdit default shortcut for \emph{Incremental Search Bar} |
|
1212 |
(action @{verbatim "quick-search"}). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1213 |
|
54372 | 1214 |
\textbf{Workaround:} Rebind key via \emph{Global Options / |
1215 |
Shortcuts} according to national keyboard, e.g.\ @{verbatim |
|
1216 |
"COMMAND+SLASH"} on English ones. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1217 |
|
54349 | 1218 |
\item \textbf{Problem:} Mac OS X system fonts sometimes lead to |
1219 |
character drop-outs in the main text area. |
|
1220 |
||
1221 |
\textbf{Workaround:} Use the default @{verbatim IsabelleText} font. |
|
1222 |
(Do not install that font on the system.) |
|
1223 |
||
54329 | 1224 |
\item \textbf{Problem:} Some Linux / X11 input methods such as IBus |
54330 | 1225 |
tend to disrupt key event handling of Java/AWT/Swing. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1226 |
|
54329 | 1227 |
\textbf{Workaround:} Do not use input methods, reset the environment |
1228 |
variable @{verbatim XMODIFIERS} within Isabelle settings (default in |
|
54639 | 1229 |
Isabelle2013-2). |
54329 | 1230 |
|
1231 |
\item \textbf{Problem:} Some Linux / X11 window managers that are |
|
1232 |
not ``re-parenting'' cause problems with additional windows opened |
|
54331 | 1233 |
by Java. This affects either historic or neo-minimalistic window |
1234 |
managers like @{verbatim awesome} or @{verbatim xmonad}. |
|
54329 | 1235 |
|
57310 | 1236 |
\textbf{Workaround:} Use a regular re-parenting window manager. |
54329 | 1237 |
|
1238 |
\item \textbf{Problem:} Recent forks of Linux / X11 window managers |
|
1239 |
and desktop environments (variants of Gnome) disrupt the handling of |
|
1240 |
menu popups and mouse positions of Java/AWT/Swing. |
|
1241 |
||
1242 |
\textbf{Workaround:} Use mainstream versions of Linux desktops. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1243 |
|
54349 | 1244 |
\item \textbf{Problem:} Full-screen mode via jEdit action @{verbatim |
1245 |
"toggle-full-screen"} (default shortcut @{verbatim F11}) works on |
|
1246 |
Windows, but not on Mac OS X or various Linux / X11 window managers. |
|
1247 |
||
1248 |
\textbf{Workaround:} Use native full-screen control of the window |
|
54372 | 1249 |
manager (notably on Mac OS X). |
54349 | 1250 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1251 |
\end{itemize} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1252 |
*} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1253 |
|
53769 | 1254 |
end |