author | wenzelm |
Mon, 04 May 2015 20:16:19 +0200 | |
changeset 60256 | 2925c5552e25 |
parent 60255 | 0466bd194d74 |
child 60257 | 9ed816c033c5 |
permissions | -rw-r--r-- |
53981 | 1 |
(*:wrap=hard:maxLineLen=78:*) |
2 |
||
53769 | 3 |
theory JEdit |
4 |
imports Base |
|
5 |
begin |
|
6 |
||
58618 | 7 |
chapter \<open>Introduction\<close> |
53769 | 8 |
|
58618 | 9 |
section \<open>Concepts and terminology\<close> |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
10 |
|
58618 | 11 |
text \<open> |
57420 | 12 |
Isabelle/jEdit is a Prover IDE that integrates \emph{parallel proof |
58554 | 13 |
checking} @{cite "Wenzel:2009" and "Wenzel:2013:ITP"} with |
14 |
\emph{asynchronous user interaction} @{cite "Wenzel:2010" and |
|
58556 | 15 |
"Wenzel:2012:UITP-EPTCS" and "Wenzel:2014:ITP-PIDE" and "Wenzel:2014:UITP"}, |
16 |
based on a document-oriented approach to \emph{continuous proof processing} |
|
17 |
@{cite "Wenzel:2011:CICM" and "Wenzel:2012"}. Many concepts and system |
|
18 |
components are fit together in order to make this work. The main building |
|
19 |
blocks are as follows. |
|
53769 | 20 |
|
54321 | 21 |
\begin{description} |
53769 | 22 |
|
57310 | 23 |
\item [PIDE] is a general framework for Prover IDEs based on Isabelle/Scala. |
24 |
It is built around a concept of parallel and asynchronous document |
|
25 |
processing, which is supported natively by the parallel proof engine that is |
|
26 |
implemented in Isabelle/ML. The traditional prover command loop is given up; |
|
27 |
instead there is direct support for editing of source text, with rich formal |
|
28 |
markup for GUI rendering. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
29 |
|
54321 | 30 |
\item [Isabelle/ML] is the implementation and extension language of |
58554 | 31 |
Isabelle, see also @{cite "isabelle-implementation"}. It is integrated |
54329 | 32 |
into the logical context of Isabelle/Isar and allows to manipulate |
33 |
logical entities directly. Arbitrary add-on tools may be implemented |
|
34 |
for object-logics such as Isabelle/HOL. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
35 |
|
54321 | 36 |
\item [Isabelle/Scala] is the system programming language of |
37 |
Isabelle. It extends the pure logical environment of Isabelle/ML |
|
38 |
towards the ``real world'' of graphical user interfaces, text |
|
39 |
editors, IDE frameworks, web services etc. Special infrastructure |
|
54372 | 40 |
allows to transfer algebraic datatypes and formatted text easily |
41 |
between ML and Scala, using asynchronous protocol commands. |
|
54321 | 42 |
|
54329 | 43 |
\item [jEdit] is a sophisticated text editor implemented in |
54703 | 44 |
Java.\footnote{@{url "http://www.jedit.org"}} It is easily extensible |
54329 | 45 |
by plugins written in languages that work on the JVM, e.g.\ |
57337 | 46 |
Scala\footnote{@{url "http://www.scala-lang.org"}}. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
47 |
|
54321 | 48 |
\item [Isabelle/jEdit] is the main example application of the PIDE |
54329 | 49 |
framework and the default user-interface for Isabelle. It targets |
50 |
both beginners and experts. Technically, Isabelle/jEdit combines a |
|
54372 | 51 |
slightly modified version of the jEdit code base with a special |
52 |
plugin for Isabelle, integrated as standalone application for the |
|
53 |
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
|
54 |
|
54321 | 55 |
\end{description} |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
56 |
|
54321 | 57 |
The subtle differences of Isabelle/ML versus Standard ML, |
54330 | 58 |
Isabelle/Scala versus Scala, Isabelle/jEdit versus jEdit need to be |
59 |
taken into account when discussing any of these PIDE building blocks |
|
60 |
in public forums, mailing lists, or even scientific publications. |
|
58618 | 61 |
\<close> |
53770
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 |
|
58618 | 64 |
section \<open>The Isabelle/jEdit Prover IDE\<close> |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
65 |
|
58618 | 66 |
text \<open> |
54357 | 67 |
\begin{figure}[htb] |
54331 | 68 |
\begin{center} |
57312 | 69 |
\includegraphics[scale=0.333]{isabelle-jedit} |
54331 | 70 |
\end{center} |
71 |
\caption{The Isabelle/jEdit Prover IDE} |
|
54357 | 72 |
\label{fig:isabelle-jedit} |
54331 | 73 |
\end{figure} |
53773 | 74 |
|
57337 | 75 |
Isabelle/jEdit (\figref{fig:isabelle-jedit}) consists of some plugins for |
76 |
the jEdit text editor, while preserving its general look-and-feel as far as |
|
77 |
possible. The main plugin is called ``Isabelle'' and has its own menu |
|
57420 | 78 |
\emph{Plugins~/ Isabelle} with access to several panels (see also |
57337 | 79 |
\secref{sec:dockables}), as well as \emph{Plugins~/ Plugin Options~/ |
80 |
Isabelle} (see also \secref{sec:options}). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
81 |
|
57337 | 82 |
The options allow to specify a logic session name --- the same selector is |
83 |
accessible in the \emph{Theories} panel (\secref{sec:theories}). On |
|
84 |
application startup, the selected logic session image is provided |
|
58554 | 85 |
automatically by the Isabelle build tool @{cite "isabelle-sys"}: if it is |
57337 | 86 |
absent or outdated wrt.\ its sources, the build process updates it before |
87 |
entering the Prover IDE. Changing the logic session within Isabelle/jEdit |
|
57420 | 88 |
requires a restart of the whole application. |
53769 | 89 |
|
57337 | 90 |
\medskip The main job of the Prover IDE is to manage sources and their |
91 |
changes, taking the logical structure as a formal document into account (see |
|
92 |
also \secref{sec:document-model}). The editor and the prover are connected |
|
93 |
asynchronously in a lock-free manner. The prover is free to organize the |
|
94 |
checking of the formal text in parallel on multiple cores, and provides |
|
95 |
feedback via markup, which is rendered in the editor via colors, boxes, |
|
57420 | 96 |
squiggly underlines, hyperlinks, popup windows, icons, clickable output etc. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
97 |
|
57337 | 98 |
Using the mouse together with the modifier key @{verbatim CONTROL} (Linux, |
99 |
Windows) or @{verbatim COMMAND} (Mac OS X) exposes additional formal content |
|
100 |
via tooltips and/or hyperlinks (see also \secref{sec:tooltips-hyperlinks}). |
|
57420 | 101 |
Output (in popups etc.) may be explored recursively, using the same |
57337 | 102 |
techniques as in the editor source buffer. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
103 |
|
57337 | 104 |
Thus the Prover IDE gives an impression of direct access to formal content |
105 |
of the prover within the editor, but in reality only certain aspects are |
|
57420 | 106 |
exposed, according to the possibilities of the prover and its many tools. |
58618 | 107 |
\<close> |
53769 | 108 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
109 |
|
58618 | 110 |
subsection \<open>Documentation\<close> |
54321 | 111 |
|
58618 | 112 |
text \<open> |
57310 | 113 |
The \emph{Documentation} panel of Isabelle/jEdit provides access to the |
114 |
standard Isabelle documentation: PDF files are opened by regular desktop |
|
57338 | 115 |
operations of the underlying platform. The section ``Original jEdit |
116 |
Documentation'' contains the original \emph{User's Guide} of this |
|
117 |
sophisticated text editor. The same is accessible via the @{verbatim Help} |
|
118 |
menu or @{verbatim F1} keyboard shortcut, using the built-in HTML viewer of |
|
119 |
Java/Swing. The latter also includes \emph{Frequently Asked Questions} and |
|
120 |
documentation of individual plugins. |
|
54321 | 121 |
|
57310 | 122 |
Most of the information about generic jEdit is relevant for Isabelle/jEdit |
123 |
as well, but one needs to keep in mind that defaults sometimes differ, and |
|
124 |
the official jEdit documentation does not know about the Isabelle plugin |
|
125 |
with its support for continuous checking of formal source text: jEdit is a |
|
126 |
plain text editor, but Isabelle/jEdit is a Prover IDE. |
|
58618 | 127 |
\<close> |
54321 | 128 |
|
129 |
||
58618 | 130 |
subsection \<open>Plugins\<close> |
54321 | 131 |
|
58618 | 132 |
text \<open> |
57420 | 133 |
The \emph{Plugin Manager} of jEdit allows to augment editor functionality by |
134 |
JVM modules (jars) that are provided by the central plugin repository, which |
|
135 |
is accessible via various mirror sites. |
|
54321 | 136 |
|
57420 | 137 |
Connecting to the plugin server-infrastructure of the jEdit project allows |
138 |
to update bundled plugins or to add further functionality. This needs to be |
|
139 |
done with the usual care for such an open bazaar of contributions. Arbitrary |
|
140 |
combinations of add-on features are apt to cause problems. It is advisable |
|
141 |
to start with the default configuration of Isabelle/jEdit and develop some |
|
142 |
understanding how it is supposed to work, before loading additional plugins |
|
143 |
at a grand scale. |
|
54321 | 144 |
|
54348 | 145 |
\medskip The main \emph{Isabelle} plugin is an integral part of |
57310 | 146 |
Isabelle/jEdit and needs to remain active at all times! A few additional |
147 |
plugins are bundled with Isabelle/jEdit for convenience or out of necessity, |
|
148 |
notably \emph{Console} with its Isabelle/Scala sub-plugin |
|
149 |
(\secref{sec:scala-console}) and \emph{SideKick} with some Isabelle-specific |
|
150 |
parsers for document tree structure (\secref{sec:sidekick}). The |
|
151 |
\emph{Navigator} plugin is particularly important for hyperlinks within the |
|
152 |
formal document-model (\secref{sec:tooltips-hyperlinks}). Further plugins |
|
153 |
(e.g.\ \emph{ErrorList}, \emph{Code2HTML}) are included to saturate the |
|
154 |
dependencies of bundled plugins, but have no particular use in |
|
57420 | 155 |
Isabelle/jEdit. |
58618 | 156 |
\<close> |
54321 | 157 |
|
158 |
||
58618 | 159 |
subsection \<open>Options \label{sec:options}\<close> |
54321 | 160 |
|
58618 | 161 |
text \<open>Both jEdit and Isabelle have distinctive management of |
54348 | 162 |
persistent options. |
54321 | 163 |
|
57335 | 164 |
Regular jEdit options are accessible via the dialogs \emph{Utilities~/ |
165 |
Global Options} or \emph{Plugins~/ Plugin Options}, with a second chance to |
|
57310 | 166 |
flip the two within the central options dialog. Changes are stored in |
167 |
@{file_unchecked "$ISABELLE_HOME_USER/jedit/properties"} and |
|
168 |
@{file_unchecked "$ISABELLE_HOME_USER/jedit/keymaps"}. |
|
169 |
||
170 |
Isabelle system options are managed by Isabelle/Scala and changes are stored |
|
171 |
in @{file_unchecked "$ISABELLE_HOME_USER/etc/preferences"}, independently of |
|
58554 | 172 |
other jEdit properties. See also @{cite "isabelle-sys"}, especially the |
57310 | 173 |
coverage of sessions and command-line tools like @{tool build} or @{tool |
54372 | 174 |
options}. |
54321 | 175 |
|
57310 | 176 |
Those Isabelle options that are declared as \textbf{public} are configurable |
57335 | 177 |
in Isabelle/jEdit via \emph{Plugin Options~/ Isabelle~/ General}. Moreover, |
57310 | 178 |
there are various options for rendering of document content, which are |
57335 | 179 |
configurable via \emph{Plugin Options~/ Isabelle~/ Rendering}. Thus |
180 |
\emph{Plugin Options~/ Isabelle} in jEdit provides a view on a subset of |
|
57310 | 181 |
Isabelle system options. Note that some of these options affect general |
182 |
parameters that are relevant outside Isabelle/jEdit as well, e.g.\ |
|
183 |
@{system_option threads} or @{system_option parallel_proofs} for the |
|
58554 | 184 |
Isabelle build tool @{cite "isabelle-sys"}, but it is possible to use the |
57310 | 185 |
settings variable @{setting ISABELLE_BUILD_OPTIONS} to change defaults for |
186 |
batch builds without affecting Isabelle/jEdit. |
|
54329 | 187 |
|
57627
65fc7ae1bf66
added action "isabelle.options" (despite problems with initial window size);
wenzelm
parents:
57603
diff
changeset
|
188 |
The jEdit action @{action_def isabelle.options} opens the options dialog for |
65fc7ae1bf66
added action "isabelle.options" (despite problems with initial window size);
wenzelm
parents:
57603
diff
changeset
|
189 |
the Isabelle plugin; it can be mapped to editor GUI elements as usual. |
65fc7ae1bf66
added action "isabelle.options" (despite problems with initial window size);
wenzelm
parents:
57603
diff
changeset
|
190 |
|
57310 | 191 |
\medskip Options are usually loaded on startup and saved on shutdown of |
192 |
Isabelle/jEdit. Editing the machine-generated @{file_unchecked |
|
54372 | 193 |
"$ISABELLE_HOME_USER/jedit/properties"} or @{file_unchecked |
57310 | 194 |
"$ISABELLE_HOME_USER/etc/preferences"} manually while the application is |
58618 | 195 |
running is likely to cause surprise due to lost update!\<close> |
54321 | 196 |
|
197 |
||
58618 | 198 |
subsection \<open>Keymaps\<close> |
54321 | 199 |
|
58618 | 200 |
text \<open>Keyboard shortcuts used to be managed as jEdit properties in |
54321 | 201 |
the past, but recent versions (2013) have a separate concept of |
57335 | 202 |
\emph{keymap} that is configurable via \emph{Global Options~/ |
54348 | 203 |
Shortcuts}. The @{verbatim imported} keymap is derived from the |
54330 | 204 |
initial environment of properties that is available at the first |
54348 | 205 |
start of the editor; afterwards the keymap file takes precedence. |
54321 | 206 |
|
57310 | 207 |
This is relevant for Isabelle/jEdit due to various fine-tuning of default |
208 |
properties, and additional keyboard shortcuts for Isabelle-specific |
|
209 |
functionality. Users may change their keymap later, but need to copy some |
|
57335 | 210 |
keyboard shortcuts manually (see also @{file_unchecked |
57420 | 211 |
"$ISABELLE_HOME_USER/jedit/keymaps"} versus @{verbatim shortcut} properties |
212 |
in @{file "$ISABELLE_HOME/src/Tools/jEdit/src/jEdit.props"}). |
|
58618 | 213 |
\<close> |
54321 | 214 |
|
215 |
||
58618 | 216 |
section \<open>Command-line invocation \label{sec:command-line}\<close> |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
217 |
|
58618 | 218 |
text \<open> |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
219 |
Isabelle/jEdit is normally invoked as standalone application, with |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
220 |
platform-specific executable wrappers for Linux, Windows, Mac OS X. |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
221 |
Nonetheless it is occasionally useful to invoke the Prover IDE on the |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
222 |
command-line, with some extra options and environment settings as explained |
57329 | 223 |
below. The command-line usage of @{tool_def jedit} is as follows: |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
224 |
\begin{ttbox} |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
225 |
Usage: isabelle jedit [OPTIONS] [FILES ...] |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
226 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
227 |
Options are: |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
228 |
-J OPTION add JVM runtime option (default JEDIT_JAVA_OPTIONS) |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
229 |
-b build only |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
230 |
-d DIR include session directory |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
231 |
-f fresh build |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
232 |
-j OPTION add jEdit runtime option (default JEDIT_OPTIONS) |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
233 |
-l NAME logic image name (default ISABELLE_LOGIC) |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
234 |
-m MODE add print mode for output |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
235 |
-n no build of session image on startup |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
236 |
-s system build mode for session image |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
237 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
238 |
Start jEdit with Isabelle plugin setup and open theory FILES |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
239 |
(default "\$USER_HOME/Scratch.thy"). |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
240 |
\end{ttbox} |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
241 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
242 |
The @{verbatim "-l"} option specifies the session name of the logic |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
243 |
image to be used for proof processing. Additional session root |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
244 |
directories may be included via option @{verbatim "-d"} to augment |
58554 | 245 |
that name space of @{tool build} @{cite "isabelle-sys"}. |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
246 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
247 |
By default, the specified image is checked and built on demand. The |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
248 |
@{verbatim "-s"} option determines where to store the result session image |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
249 |
of @{tool build}. The @{verbatim "-n"} option bypasses the implicit build |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
250 |
process for the selected session image. |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
251 |
|
57420 | 252 |
The @{verbatim "-m"} option specifies additional print modes for the prover |
253 |
process. Note that the system option @{system_option_ref jedit_print_mode} |
|
254 |
allows to do the same persistently (e.g.\ via the \emph{Plugin Options} |
|
255 |
dialog of Isabelle/jEdit), without requiring command-line invocation. |
|
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
256 |
|
57420 | 257 |
The @{verbatim "-J"} and @{verbatim "-j"} options allow to pass additional |
258 |
low-level options to the JVM or jEdit, respectively. The defaults are |
|
58554 | 259 |
provided by the Isabelle settings environment @{cite "isabelle-sys"}, but |
260 |
note that these only work for the command-line tool described here, and not |
|
261 |
the regular application. |
|
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
262 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
263 |
The @{verbatim "-b"} and @{verbatim "-f"} options control the self-build |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
264 |
mechanism of Isabelle/jEdit. This is only relevant for building from |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
265 |
sources, which also requires an auxiliary @{verbatim jedit_build} component |
57420 | 266 |
from @{url "http://isabelle.in.tum.de/components"}. The official |
267 |
Isabelle release already includes a pre-built version of Isabelle/jEdit. |
|
58618 | 268 |
\<close> |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
269 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
270 |
|
58618 | 271 |
chapter \<open>Augmented jEdit functionality\<close> |
57318 | 272 |
|
58618 | 273 |
section \<open>Look-and-feel\<close> |
54321 | 274 |
|
58618 | 275 |
text \<open>jEdit is a Java/AWT/Swing application with some ambition to |
54329 | 276 |
support ``native'' look-and-feel on all platforms, within the limits |
54330 | 277 |
of what Oracle as Java provider and major operating system |
278 |
distributors allow (see also \secref{sec:problems}). |
|
54321 | 279 |
|
54329 | 280 |
Isabelle/jEdit enables platform-specific look-and-feel by default as |
57420 | 281 |
follows. |
54321 | 282 |
|
283 |
\begin{description} |
|
284 |
||
57420 | 285 |
\item[Linux:] The platform-independent \emph{Nimbus} is used by |
54372 | 286 |
default. |
54321 | 287 |
|
60256 | 288 |
\emph{GTK+} also works under the side-condition that the overall GTK theme |
289 |
is selected in a Swing-friendly way.\footnote{GTK support in Java/Swing was |
|
290 |
once marketed aggressively by Sun, but never quite finished. Today (2015) it |
|
57310 | 291 |
is lagging behind further development of Swing and GTK. The graphics |
60256 | 292 |
rendering performance can be worse than for other Swing look-and-feels. |
293 |
Nonetheless it has its uses for displays with very high resolution (such as |
|
294 |
``4K'' or ``UHD'' models), because the rendering by the external library is |
|
295 |
subject to global system settings for font scaling.} |
|
54321 | 296 |
|
57420 | 297 |
\item[Windows:] Regular \emph{Windows} is used by default, but |
54381 | 298 |
\emph{Windows Classic} also works. |
54372 | 299 |
|
57420 | 300 |
\item[Mac OS X:] Regular \emph{Mac OS X} is used by default. |
54372 | 301 |
|
57420 | 302 |
The bundled \emph{MacOSX} plugin provides various functions that are |
303 |
expected from applications on that particular platform: quit from menu or |
|
304 |
dock, preferences menu, drag-and-drop of text files on the application, |
|
57310 | 305 |
full-screen mode for main editor windows. It is advisable to have the |
57420 | 306 |
\emph{MacOSX} plugin enabled all the time on that platform. |
54321 | 307 |
|
308 |
\end{description} |
|
309 |
||
310 |
Users may experiment with different look-and-feels, but need to keep |
|
54329 | 311 |
in mind that this extra variance of GUI functionality is unlikely to |
54372 | 312 |
work in arbitrary combinations. The platform-independent |
313 |
\emph{Nimbus} and \emph{Metal} should always work. The historic |
|
314 |
\emph{CDE/Motif} is better avoided. |
|
315 |
||
57335 | 316 |
After changing the look-and-feel in \emph{Global Options~/ |
54372 | 317 |
Appearance}, it is advisable to restart Isabelle/jEdit in order to |
58618 | 318 |
take full effect.\<close> |
54321 | 319 |
|
320 |
||
58618 | 321 |
section \<open>Dockable windows \label{sec:dockables}\<close> |
57316 | 322 |
|
58618 | 323 |
text \<open> |
57316 | 324 |
In jEdit terminology, a \emph{view} is an editor window with one or more |
325 |
\emph{text areas} that show the content of one or more \emph{buffers}. A |
|
326 |
regular view may be surrounded by \emph{dockable windows} that show |
|
327 |
additional information in arbitrary format, not just text; a \emph{plain |
|
328 |
view} does not allow dockables. The \emph{dockable window manager} of jEdit |
|
329 |
organizes these dockable windows, either as \emph{floating} windows, or |
|
330 |
\emph{docked} panels within one of the four margins of the view. There may |
|
331 |
be any number of floating instances of some dockable window, but at most one |
|
332 |
docked instance; jEdit actions that address \emph{the} dockable window of a |
|
333 |
particular kind refer to the unique docked instance. |
|
334 |
||
335 |
Dockables are used routinely in jEdit for important functionality like |
|
336 |
\emph{HyperSearch Results} or the \emph{File System Browser}. Plugins often |
|
337 |
provide a central dockable to access their key functionality, which may be |
|
338 |
opened by the user on demand. The Isabelle/jEdit plugin takes this approach |
|
57420 | 339 |
to the extreme: its plugin menu merely provides entry-points to panels that |
340 |
are managed as dockable windows. Some important panels are docked by |
|
57316 | 341 |
default, e.g.\ \emph{Documentation}, \emph{Output}, \emph{Query}, but the |
342 |
user can change this arrangement easily. |
|
343 |
||
344 |
Compared to plain jEdit, dockable window management in Isabelle/jEdit is |
|
345 |
slightly augmented according to the the following principles: |
|
346 |
||
347 |
\begin{itemize} |
|
348 |
||
349 |
\item Floating windows are dependent on the main window as \emph{dialog} in |
|
350 |
the sense of Java/AWT/Swing. Dialog windows always stay on top of the view, |
|
351 |
which is particularly important in full-screen mode. The desktop environment |
|
352 |
of the underlying platform may impose further policies on such dependent |
|
353 |
dialogs, in contrast to fully independent windows, e.g.\ some window |
|
354 |
management functions may be missing. |
|
355 |
||
356 |
\item Keyboard focus of the main view vs.\ a dockable window is carefully |
|
357 |
managed according to the intended semantics, as a panel mainly for output or |
|
358 |
input. For example, activating the \emph{Output} (\secref{sec:output}) panel |
|
359 |
via the dockable window manager returns keyboard focus to the main text |
|
360 |
area, but for \emph{Query} (\secref{sec:query}) the focus is given to the |
|
361 |
main input field of that panel. |
|
362 |
||
363 |
\item Panels that provide their own text area for output have an additional |
|
364 |
dockable menu item \emph{Detach}. This produces an independent copy of the |
|
365 |
current output as a floating \emph{Info} window, which displays that content |
|
366 |
independently of ongoing changes of the PIDE document-model. Note that |
|
367 |
Isabelle/jEdit popup windows (\secref{sec:tooltips-hyperlinks}) provide a |
|
368 |
similar \emph{Detach} operation as an icon. |
|
369 |
||
370 |
\end{itemize} |
|
58618 | 371 |
\<close> |
57316 | 372 |
|
373 |
||
58618 | 374 |
section \<open>Isabelle symbols \label{sec:symbols}\<close> |
57319 | 375 |
|
58618 | 376 |
text \<open> |
57420 | 377 |
Isabelle sources consist of \emph{symbols} that extend plain ASCII to allow |
378 |
infinitely many mathematical symbols within the formal sources. This works |
|
379 |
without depending on particular encodings and varying Unicode |
|
380 |
standards.\footnote{Raw Unicode characters within formal sources would |
|
381 |
compromise portability and reliability in the face of changing |
|
382 |
interpretation of special features of Unicode, such as Combining Characters |
|
58554 | 383 |
or Bi-directional Text.} See also @{cite "Wenzel:2011:CICM"}. |
57319 | 384 |
|
57420 | 385 |
For the prover back-end, formal text consists of ASCII characters that are |
386 |
grouped according to some simple rules, e.g.\ as plain ``@{verbatim a}'' or |
|
387 |
symbolic ``@{verbatim "\<alpha>"}''. For the editor front-end, a certain subset of |
|
388 |
symbols is rendered physically via Unicode glyphs, in order to show |
|
389 |
``@{verbatim "\<alpha>"}'' as ``@{text "\<alpha>"}'', for example. This symbol |
|
390 |
interpretation is specified by the Isabelle system distribution in @{file |
|
57319 | 391 |
"$ISABELLE_HOME/etc/symbols"} and may be augmented by the user in |
392 |
@{file_unchecked "$ISABELLE_HOME_USER/etc/symbols"}. |
|
393 |
||
58554 | 394 |
The appendix of @{cite "isabelle-isar-ref"} gives an overview of the |
57319 | 395 |
standard interpretation of finitely many symbols from the infinite |
58554 | 396 |
collection. Uninterpreted symbols are displayed literally, e.g.\ |
397 |
``@{verbatim "\<foobar>"}''. Overlap of Unicode characters used in symbol |
|
398 |
interpretation with informal ones (which might appear e.g.\ in comments) |
|
399 |
needs to be avoided. Raw Unicode characters within prover source files |
|
400 |
should be restricted to informal parts, e.g.\ to write text in non-latin |
|
401 |
alphabets in comments. |
|
57319 | 402 |
|
57420 | 403 |
\medskip \paragraph{Encoding.} Technically, the Unicode view on Isabelle |
404 |
symbols is an \emph{encoding} in jEdit (not in the underlying JVM) that is |
|
405 |
called @{verbatim "UTF-8-Isabelle"}. It is provided by the Isabelle/jEdit |
|
406 |
plugin and enabled by default for all source files. Sometimes such defaults |
|
407 |
are reset accidentally, or malformed UTF-8 sequences in the text force jEdit |
|
408 |
to fall back on a different encoding like @{verbatim "ISO-8859-15"}. In that |
|
409 |
case, verbatim ``@{verbatim "\<alpha>"}'' will be shown in the text buffer instead |
|
410 |
of its Unicode rendering ``@{text "\<alpha>"}''. The jEdit menu operation |
|
411 |
\emph{File~/ Reload with Encoding~/ UTF-8-Isabelle} helps to resolve such |
|
412 |
problems (after repairing malformed parts of the text). |
|
57319 | 413 |
|
414 |
\medskip \paragraph{Font.} Correct rendering via Unicode requires a |
|
415 |
font that contains glyphs for the corresponding codepoints. Most |
|
416 |
system fonts lack that, so Isabelle/jEdit prefers its own |
|
417 |
application font @{verbatim IsabelleText}, which ensures that |
|
418 |
standard collection of Isabelle symbols are actually seen on the |
|
419 |
screen (or printer). |
|
420 |
||
57420 | 421 |
Note that a Java/AWT/Swing application can load additional fonts only if |
422 |
they are not installed on the operating system already! Some outdated |
|
423 |
version of @{verbatim IsabelleText} that happens to be provided by the |
|
424 |
operating system would prevent Isabelle/jEdit to use its bundled version. |
|
425 |
This could lead to missing glyphs (black rectangles), when the system |
|
426 |
version of @{verbatim IsabelleText} is older than the application version. |
|
427 |
This problem can be avoided by refraining to ``install'' any version of |
|
428 |
@{verbatim IsabelleText} in the first place, although it is occasionally |
|
429 |
tempting to use the same font in other applications. |
|
57319 | 430 |
|
431 |
\medskip \paragraph{Input methods.} In principle, Isabelle/jEdit |
|
432 |
could delegate the problem to produce Isabelle symbols in their |
|
433 |
Unicode rendering to the underlying operating system and its |
|
434 |
\emph{input methods}. Regular jEdit also provides various ways to |
|
435 |
work with \emph{abbreviations} to produce certain non-ASCII |
|
436 |
characters. Since none of these standard input methods work |
|
437 |
satisfactorily for the mathematical characters required for |
|
438 |
Isabelle, various specific Isabelle/jEdit mechanisms are provided. |
|
439 |
||
57420 | 440 |
This is a summary for practically relevant input methods for Isabelle |
441 |
symbols. |
|
57319 | 442 |
|
443 |
\begin{enumerate} |
|
444 |
||
445 |
\item The \emph{Symbols} panel: some GUI buttons allow to insert |
|
446 |
certain symbols in the text buffer. There are also tooltips to |
|
447 |
reveal the official Isabelle representation with some additional |
|
448 |
information about \emph{symbol abbreviations} (see below). |
|
449 |
||
57335 | 450 |
\item Copy/paste from decoded source files: text that is rendered |
57319 | 451 |
as Unicode already can be re-used to produce further text. This |
452 |
also works between different applications, e.g.\ Isabelle/jEdit and |
|
453 |
some web browser or mail client, as long as the same Unicode view on |
|
454 |
Isabelle symbols is used. |
|
455 |
||
57335 | 456 |
\item Copy/paste from prover output within Isabelle/jEdit. The |
57319 | 457 |
same principles as for text buffers apply, but note that \emph{copy} |
458 |
in secondary Isabelle/jEdit windows works via the keyboard shortcut |
|
459 |
@{verbatim "C+c"}, while jEdit menu actions always refer to the |
|
460 |
primary text area! |
|
461 |
||
462 |
\item Completion provided by Isabelle plugin (see |
|
463 |
\secref{sec:completion}). Isabelle symbols have a canonical name |
|
464 |
and optional abbreviations. This can be used with the text |
|
465 |
completion mechanism of Isabelle/jEdit, to replace a prefix of the |
|
57328 | 466 |
actual symbol like @{verbatim "\<lambda>"}, or its name preceded by backslash |
57319 | 467 |
@{verbatim "\\"}@{verbatim "lambda"}, or its ASCII abbreviation |
468 |
@{verbatim "%"} by the Unicode rendering. |
|
469 |
||
470 |
The following table is an extract of the information provided by the |
|
471 |
standard @{file "$ISABELLE_HOME/etc/symbols"} file: |
|
472 |
||
473 |
\medskip |
|
474 |
\begin{tabular}{lll} |
|
57328 | 475 |
\textbf{symbol} & \textbf{name with backslash} & \textbf{abbreviation} \\\hline |
57319 | 476 |
@{text "\<lambda>"} & @{verbatim "\\lambda"} & @{verbatim "%"} \\ |
477 |
@{text "\<Rightarrow>"} & @{verbatim "\\Rightarrow"} & @{verbatim "=>"} \\ |
|
478 |
@{text "\<Longrightarrow>"} & @{verbatim "\\Longrightarrow"} & @{verbatim "==>"} \\[0.5ex] |
|
479 |
@{text "\<And>"} & @{verbatim "\\And"} & @{verbatim "!!"} \\ |
|
480 |
@{text "\<equiv>"} & @{verbatim "\\equiv"} & @{verbatim "=="} \\[0.5ex] |
|
481 |
@{text "\<forall>"} & @{verbatim "\\forall"} & @{verbatim "!"} \\ |
|
482 |
@{text "\<exists>"} & @{verbatim "\\exists"} & @{verbatim "?"} \\ |
|
483 |
@{text "\<longrightarrow>"} & @{verbatim "\\longrightarrow"} & @{verbatim "-->"} \\ |
|
484 |
@{text "\<and>"} & @{verbatim "\\and"} & @{verbatim "&"} \\ |
|
485 |
@{text "\<or>"} & @{verbatim "\\or"} & @{verbatim "|"} \\ |
|
486 |
@{text "\<not>"} & @{verbatim "\\not"} & @{verbatim "~"} \\ |
|
487 |
@{text "\<noteq>"} & @{verbatim "\\noteq"} & @{verbatim "~="} \\ |
|
488 |
@{text "\<in>"} & @{verbatim "\\in"} & @{verbatim ":"} \\ |
|
489 |
@{text "\<notin>"} & @{verbatim "\\notin"} & @{verbatim "~:"} \\ |
|
490 |
\end{tabular} |
|
491 |
\medskip |
|
492 |
||
57420 | 493 |
Note that the above abbreviations refer to the input method. The logical |
494 |
notation provides ASCII alternatives that often coincide, but sometimes |
|
495 |
deviate. This occasionally causes user confusion with very old-fashioned |
|
496 |
Isabelle source that use ASCII replacement notation like @{verbatim "!"} or |
|
497 |
@{verbatim "ALL"} directly in the text. |
|
57319 | 498 |
|
499 |
On the other hand, coincidence of symbol abbreviations with ASCII |
|
500 |
replacement syntax syntax helps to update old theory sources via |
|
501 |
explicit completion (see also @{verbatim "C+b"} explained in |
|
502 |
\secref{sec:completion}). |
|
503 |
||
504 |
\end{enumerate} |
|
505 |
||
506 |
\paragraph{Control symbols.} There are some special control symbols |
|
507 |
to modify the display style of a single symbol (without |
|
508 |
nesting). Control symbols may be applied to a region of selected |
|
509 |
text, either using the \emph{Symbols} panel or keyboard shortcuts or |
|
510 |
jEdit actions. These editor operations produce a separate control |
|
511 |
symbol for each symbol in the text, in order to make the whole text |
|
512 |
appear in a certain style. |
|
513 |
||
514 |
\medskip |
|
515 |
\begin{tabular}{llll} |
|
516 |
\textbf{style} & \textbf{symbol} & \textbf{shortcut} & \textbf{action} \\\hline |
|
57329 | 517 |
superscript & @{verbatim "\<^sup>"} & @{verbatim "C+e UP"} & @{action_ref "isabelle.control-sup"} \\ |
518 |
subscript & @{verbatim "\<^sub>"} & @{verbatim "C+e DOWN"} & @{action_ref "isabelle.control-sub"} \\ |
|
519 |
bold face & @{verbatim "\<^bold>"} & @{verbatim "C+e RIGHT"} & @{action_ref "isabelle.control-bold"} \\ |
|
520 |
reset & & @{verbatim "C+e LEFT"} & @{action_ref "isabelle.control-reset"} \\ |
|
57319 | 521 |
\end{tabular} |
522 |
\medskip |
|
523 |
||
524 |
To produce a single control symbol, it is also possible to complete |
|
525 |
on @{verbatim "\\"}@{verbatim sup}, @{verbatim "\\"}@{verbatim sub}, |
|
58618 | 526 |
@{verbatim "\\"}@{verbatim bold} as for regular symbols.\<close> |
57319 | 527 |
|
528 |
||
58618 | 529 |
section \<open>SideKick parsers \label{sec:sidekick}\<close> |
57319 | 530 |
|
58618 | 531 |
text \<open> |
57319 | 532 |
The \emph{SideKick} plugin provides some general services to display buffer |
533 |
structure in a tree view. |
|
534 |
||
57336 | 535 |
Isabelle/jEdit provides SideKick parsers for its main mode for theory files, |
536 |
as well as some minor modes for the @{verbatim NEWS} file (see |
|
537 |
\figref{fig:sidekick}), session @{verbatim ROOT} files, and system |
|
538 |
@{verbatim options}. |
|
539 |
||
540 |
\begin{figure}[htb] |
|
541 |
\begin{center} |
|
542 |
\includegraphics[scale=0.333]{sidekick} |
|
543 |
\end{center} |
|
544 |
\caption{The Isabelle NEWS file with SideKick tree view} |
|
545 |
\label{fig:sidekick} |
|
546 |
\end{figure} |
|
57319 | 547 |
|
548 |
Moreover, the special SideKick parser @{verbatim "isabelle-markup"} |
|
549 |
provides access to the full (uninterpreted) markup tree of the PIDE |
|
550 |
document model of the current buffer. This is occasionally useful |
|
551 |
for informative purposes, but the amount of displayed information |
|
552 |
might cause problems for large buffers, both for the human and the |
|
553 |
machine. |
|
58618 | 554 |
\<close> |
57319 | 555 |
|
556 |
||
58618 | 557 |
section \<open>Scala console \label{sec:scala-console}\<close> |
57319 | 558 |
|
58618 | 559 |
text \<open> |
57319 | 560 |
The \emph{Console} plugin manages various shells (command interpreters), |
561 |
e.g.\ \emph{BeanShell}, which is the official jEdit scripting language, and |
|
562 |
the cross-platform \emph{System} shell. Thus the console provides similar |
|
57603 | 563 |
functionality than the Emacs buffers @{verbatim "*scratch*"} and |
57319 | 564 |
@{verbatim "*shell*"}. |
565 |
||
566 |
Isabelle/jEdit extends the repertoire of the console by \emph{Scala}, which |
|
57420 | 567 |
is the regular Scala toplevel loop running inside the same JVM process as |
568 |
Isabelle/jEdit itself. This means the Scala command interpreter has access |
|
57603 | 569 |
to the JVM name space and state of the running Prover IDE application. The |
570 |
default environment imports the full content of packages @{verbatim |
|
571 |
"isabelle"} and @{verbatim "isabelle.jedit"}. |
|
572 |
||
573 |
For example, @{verbatim PIDE} refers to the Isabelle/jEdit plugin object, |
|
574 |
and @{verbatim view} to the current editor view of jEdit. The Scala |
|
575 |
expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE document snapshot |
|
576 |
of the current buffer within the current editor view. |
|
57319 | 577 |
|
578 |
This helps to explore Isabelle/Scala functionality interactively. Some care |
|
579 |
is required to avoid interference with the internals of the running |
|
580 |
application, especially in production use. |
|
58618 | 581 |
\<close> |
57319 | 582 |
|
583 |
||
58618 | 584 |
section \<open>File-system access\<close> |
57318 | 585 |
|
58618 | 586 |
text \<open> |
57420 | 587 |
File specifications in jEdit follow various formats and conventions |
588 |
according to \emph{Virtual File Systems}, which may be also provided by |
|
589 |
additional plugins. This allows to access remote files via the @{verbatim |
|
590 |
"http:"} protocol prefix, for example. Isabelle/jEdit attempts to work with |
|
591 |
the file-system model of jEdit as far as possible. In particular, theory |
|
592 |
sources are passed directly from the editor to the prover, without |
|
593 |
indirection via physical files. |
|
57318 | 594 |
|
57420 | 595 |
Despite the flexibility of URLs in jEdit, local files are particularly |
596 |
important and are accessible without protocol prefix. Here the path notation |
|
597 |
is that of the Java Virtual Machine on the underlying platform. On Windows |
|
598 |
the preferred form uses backslashes, but happens to accept forward slashes |
|
599 |
like Unix/POSIX. Further differences arise due to Windows drive letters and |
|
600 |
network shares. |
|
57318 | 601 |
|
57331 | 602 |
The Java notation for files needs to be distinguished from the one of |
603 |
Isabelle, which uses POSIX notation with forward slashes on \emph{all} |
|
604 |
platforms.\footnote{Isabelle/ML on Windows uses Cygwin file-system access |
|
605 |
and Unix-style path notation.} Moreover, environment variables from the |
|
57318 | 606 |
Isabelle process may be used freely, e.g.\ @{file |
607 |
"$ISABELLE_HOME/etc/symbols"} or @{file_unchecked "$POLYML_HOME/README"}. |
|
57331 | 608 |
There are special shortcuts: @{file "~"} for @{file "$USER_HOME"} and @{file |
609 |
"~~"} for @{file "$ISABELLE_HOME"}. |
|
57318 | 610 |
|
57420 | 611 |
\medskip Since jEdit happens to support environment variables within file |
612 |
specifications as well, it is natural to use similar notation within the |
|
613 |
editor, e.g.\ in the file-browser. This does not work in full generality, |
|
614 |
though, due to the bias of jEdit towards platform-specific notation and of |
|
615 |
Isabelle towards POSIX. Moreover, the Isabelle settings environment is not |
|
616 |
yet active when starting Isabelle/jEdit via its standard application |
|
617 |
wrapper, in contrast to @{verbatim "isabelle jedit"} run from the command |
|
618 |
line (\secref{sec:command-line}). |
|
57318 | 619 |
|
57331 | 620 |
Isabelle/jEdit imitates @{verbatim "$ISABELLE_HOME"} and @{verbatim |
621 |
"$ISABELLE_HOME_USER"} within the Java process environment, in order to |
|
622 |
allow easy access to these important places from the editor. The file |
|
623 |
browser of jEdit also includes \emph{Favorites} for these two important |
|
57326 | 624 |
locations. |
57318 | 625 |
|
626 |
\medskip Path specifications in prover input or output usually include |
|
627 |
formal markup that turns it into a hyperlink (see also |
|
628 |
\secref{sec:tooltips-hyperlinks}). This allows to open the corresponding |
|
629 |
file in the text editor, independently of the path notation. |
|
630 |
||
631 |
Formally checked paths in prover input are subject to completion |
|
57420 | 632 |
(\secref{sec:completion}): partial specifications are resolved via |
57318 | 633 |
directory content and possible completions are offered in a popup. |
58618 | 634 |
\<close> |
57318 | 635 |
|
636 |
||
58618 | 637 |
chapter \<open>Prover IDE functionality \label{sec:document-model}\<close> |
57315 | 638 |
|
58618 | 639 |
section \<open>Document model \label{sec:document-model}\<close> |
57322 | 640 |
|
58618 | 641 |
text \<open> |
57322 | 642 |
The document model is central to the PIDE architecture: the editor and the |
643 |
prover have a common notion of structured source text with markup, which is |
|
644 |
produced by formal processing. The editor is responsible for edits of |
|
645 |
document source, as produced by the user. The prover is responsible for |
|
646 |
reports of document markup, as produced by its processing in the background. |
|
647 |
||
648 |
Isabelle/jEdit handles classic editor events of jEdit, in order to connect |
|
649 |
the physical world of the GUI (with its singleton state) to the mathematical |
|
650 |
world of multiple document versions (with timeless and stateless updates). |
|
58618 | 651 |
\<close> |
57322 | 652 |
|
54322 | 653 |
|
58618 | 654 |
subsection \<open>Editor buffers and document nodes \label{sec:buffer-node}\<close> |
57322 | 655 |
|
58618 | 656 |
text \<open> |
57322 | 657 |
As a regular text editor, jEdit maintains a collection of \emph{buffers} to |
658 |
store text files; each buffer may be associated with any number of visible |
|
659 |
\emph{text areas}. Buffers are subject to an \emph{edit mode} that is |
|
660 |
determined from the file name extension. The following modes are treated |
|
661 |
specifically in Isabelle/jEdit: |
|
662 |
||
663 |
\medskip |
|
664 |
\begin{tabular}{lll} |
|
665 |
\textbf{mode} & \textbf{file extension} & \textbf{content} \\\hline |
|
666 |
@{verbatim "isabelle"} & @{verbatim ".thy"} & theory source \\ |
|
667 |
@{verbatim "isabelle-ml"} & @{verbatim ".ML"} & Isabelle/ML source \\ |
|
668 |
@{verbatim "sml"} & @{verbatim ".sml"} or @{verbatim ".sig"} & Standard ML source \\ |
|
669 |
\end{tabular} |
|
670 |
\medskip |
|
54321 | 671 |
|
57322 | 672 |
All jEdit buffers are automatically added to the PIDE document-model as |
673 |
\emph{document nodes}. The overall document structure is defined by the |
|
674 |
theory nodes in two dimensions: |
|
675 |
||
676 |
\begin{enumerate} |
|
677 |
||
678 |
\item via \textbf{theory imports} that are specified in the \emph{theory |
|
57329 | 679 |
header} using concrete syntax of the @{command_ref theory} command |
58554 | 680 |
@{cite "isabelle-isar-ref"}; |
57322 | 681 |
|
682 |
\item via \textbf{auxiliary files} that are loaded into a theory by special |
|
57329 | 683 |
\emph{load commands}, notably @{command_ref ML_file} and @{command_ref |
58554 | 684 |
SML_file} @{cite "isabelle-isar-ref"}. |
57322 | 685 |
|
686 |
\end{enumerate} |
|
54322 | 687 |
|
57322 | 688 |
In any case, source files are managed by the PIDE infrastructure: the |
689 |
physical file-system only plays a subordinate role. The relevant version of |
|
690 |
source text is passed directly from the editor to the prover, via internal |
|
691 |
communication channels. |
|
58618 | 692 |
\<close> |
57322 | 693 |
|
694 |
||
58618 | 695 |
subsection \<open>Theories \label{sec:theories}\<close> |
57322 | 696 |
|
58618 | 697 |
text \<open> |
57339 | 698 |
The \emph{Theories} panel (see also \figref{fig:theories}) provides an |
57322 | 699 |
overview of the status of continuous checking of theory nodes within the |
58554 | 700 |
document model. Unlike batch sessions of @{tool build} @{cite |
701 |
"isabelle-sys"}, theory nodes are identified by full path names; this allows |
|
702 |
to work with multiple (disjoint) Isabelle sessions simultaneously within the |
|
703 |
same editor session. |
|
57322 | 704 |
|
57339 | 705 |
\begin{figure}[htb] |
706 |
\begin{center} |
|
707 |
\includegraphics[scale=0.333]{theories} |
|
708 |
\end{center} |
|
709 |
\caption{Theories panel with an overview of the document-model, and some |
|
710 |
jEdit text areas as editable view on some of the document nodes} |
|
711 |
\label{fig:theories} |
|
712 |
\end{figure} |
|
713 |
||
57322 | 714 |
Certain events to open or update editor buffers cause Isabelle/jEdit to |
715 |
resolve dependencies of theory imports. The system requests to load |
|
716 |
additional files into editor buffers, in order to be included in the |
|
717 |
document model for further checking. It is also possible to let the system |
|
57420 | 718 |
resolve dependencies automatically, according to the system option |
719 |
@{system_option jedit_auto_load}. |
|
54321 | 720 |
|
57322 | 721 |
\medskip The visible \emph{perspective} of Isabelle/jEdit is defined by the |
722 |
collective view on theory buffers via open text areas. The perspective is |
|
723 |
taken as a hint for document processing: the prover ensures that those parts |
|
724 |
of a theory where the user is looking are checked, while other parts that |
|
725 |
are presently not required are ignored. The perspective is changed by |
|
726 |
opening or closing text area windows, or scrolling within a window. |
|
54322 | 727 |
|
54330 | 728 |
The \emph{Theories} panel provides some further options to influence |
729 |
the process of continuous checking: it may be switched off globally |
|
54350 | 730 |
to restrict the prover to superficial processing of command syntax. |
731 |
It is also possible to indicate theory nodes as \emph{required} for |
|
54330 | 732 |
continuous checking: this means such nodes and all their imports are |
733 |
always processed independently of the visibility status (if |
|
734 |
continuous checking is enabled). Big theory libraries that are |
|
735 |
marked as required can have significant impact on performance, |
|
736 |
though. |
|
54322 | 737 |
|
738 |
\medskip Formal markup of checked theory content is turned into GUI |
|
57310 | 739 |
rendering, based on a standard repertoire known from IDEs for programming |
57420 | 740 |
languages: colors, icons, highlighting, squiggly underlines, tooltips, |
57310 | 741 |
hyperlinks etc. For outer syntax of Isabelle/Isar there is some traditional |
742 |
syntax-highlighting via static keyword tables and tokenization within the |
|
743 |
editor. In contrast, the painting of inner syntax (term language etc.)\ uses |
|
744 |
semantic information that is reported dynamically from the logical context. |
|
745 |
Thus the prover can provide additional markup to help the user to understand |
|
746 |
the meaning of formal text, and to produce more text with some add-on tools |
|
747 |
(e.g.\ information messages with \emph{sendback} markup by automated provers |
|
57322 | 748 |
or disprovers in the background). |
749 |
||
58618 | 750 |
\<close> |
57322 | 751 |
|
58618 | 752 |
subsection \<open>Auxiliary files \label{sec:aux-files}\<close> |
57322 | 753 |
|
58618 | 754 |
text \<open> |
57329 | 755 |
Special load commands like @{command_ref ML_file} and @{command_ref |
58554 | 756 |
SML_file} @{cite "isabelle-isar-ref"} refer to auxiliary files within some |
57329 | 757 |
theory. Conceptually, the file argument of the command extends the theory |
758 |
source by the content of the file, but its editor buffer may be loaded~/ |
|
759 |
changed~/ saved separately. The PIDE document model propagates changes of |
|
760 |
auxiliary file content to the corresponding load command in the theory, to |
|
761 |
update and process it accordingly: changes of auxiliary file content are |
|
762 |
treated as changes of the corresponding load command. |
|
57323 | 763 |
|
764 |
\medskip As a concession to the massive amount of ML files in Isabelle/HOL |
|
765 |
itself, the content of auxiliary files is only added to the PIDE |
|
766 |
document-model on demand, the first time when opened explicitly in the |
|
57420 | 767 |
editor. There are further tricks to manage markup of ML files, such that |
768 |
Isabelle/HOL may be edited conveniently in the Prover IDE on small machines |
|
769 |
with only 4--8\,GB of main memory. Using @{verbatim Pure} as logic session |
|
770 |
image, the exploration may start at the top @{file |
|
57323 | 771 |
"$ISABELLE_HOME/src/HOL/Main.thy"} or the bottom @{file |
772 |
"$ISABELLE_HOME/src/HOL/HOL.thy"}, for example. |
|
773 |
||
774 |
Initially, before an auxiliary file is opened in the editor, the prover |
|
775 |
reads its content from the physical file-system. After the file is opened |
|
776 |
for the first time in the editor, e.g.\ by following the hyperlink |
|
777 |
(\secref{sec:tooltips-hyperlinks}) for the argument of its @{command |
|
778 |
ML_file} command, the content is taken from the jEdit buffer. |
|
779 |
||
780 |
The change of responsibility from prover to editor counts as an update of |
|
781 |
the document content, so subsequent theory sources need to be re-checked. |
|
57420 | 782 |
When the buffer is closed, the responsibility remains to the editor: the |
783 |
file may be opened again without causing another document update. |
|
57323 | 784 |
|
785 |
A file that is opened in the editor, but its theory with the load command is |
|
786 |
not, is presently inactive in the document model. A file that is loaded via |
|
787 |
multiple load commands is associated to an arbitrary one: this situation is |
|
788 |
morally unsupported and might lead to confusion. |
|
789 |
||
790 |
\medskip Output that refers to an auxiliary file is combined with that of |
|
791 |
the corresponding load command, and shown whenever the file or the command |
|
792 |
are active (see also \secref{sec:output}). |
|
793 |
||
794 |
Warnings, errors, and other useful markup is attached directly to the |
|
795 |
positions in the auxiliary file buffer, in the manner of other well-known |
|
796 |
IDEs. By using the load command @{command SML_file} as explained in @{file |
|
797 |
"$ISABELLE_HOME/src/Tools/SML/Examples.thy"}, Isabelle/jEdit may be used as |
|
798 |
fully-featured IDE for Standard ML, independently of theory or proof |
|
799 |
development: the required theory merely serves as some kind of project |
|
800 |
file for a collection of SML source modules. |
|
58618 | 801 |
\<close> |
54322 | 802 |
|
54352 | 803 |
|
58618 | 804 |
section \<open>Output \label{sec:output}\<close> |
54353 | 805 |
|
58618 | 806 |
text \<open> |
57420 | 807 |
Prover output consists of \emph{markup} and \emph{messages}. Both are |
808 |
directly attached to the corresponding positions in the original source |
|
809 |
text, and visualized in the text area, e.g.\ as text colours for free and |
|
810 |
bound variables, or as squiggly underlines for warnings, errors etc.\ (see |
|
811 |
also \figref{fig:output}). In the latter case, the corresponding messages |
|
812 |
are shown by hovering with the mouse over the highlighted text --- although |
|
813 |
in many situations the user should already get some clue by looking at the |
|
814 |
position of the text highlighting, without the text itself. |
|
54357 | 815 |
|
816 |
\begin{figure}[htb] |
|
817 |
\begin{center} |
|
57312 | 818 |
\includegraphics[scale=0.333]{output} |
54357 | 819 |
\end{center} |
54372 | 820 |
\caption{Multiple views on prover output: gutter area with icon, |
821 |
text area with popup, overview area, Theories panel, Output panel} |
|
54357 | 822 |
\label{fig:output} |
823 |
\end{figure} |
|
54353 | 824 |
|
825 |
The ``gutter area'' on the left-hand-side of the text area uses |
|
54372 | 826 |
icons to provide a summary of the messages within the adjacent |
54353 | 827 |
line of text. Message priorities are used to prefer errors over |
57310 | 828 |
warnings, warnings over information messages, but plain output is |
829 |
ignored. |
|
54353 | 830 |
|
57310 | 831 |
The ``overview area'' on the right-hand-side of the text area uses similar |
832 |
information to paint small rectangles for the overall status of the whole |
|
833 |
text buffer. The graphics is scaled to fit the logical buffer length into |
|
834 |
the given window height. Mouse clicks on the overview area position the |
|
835 |
cursor approximately to the corresponding line of text in the buffer. |
|
836 |
Repainting the overview in real-time causes problems with big theories, so |
|
57420 | 837 |
it is restricted according to the system option @{system_option |
838 |
jedit_text_overview_limit} (in characters). |
|
54353 | 839 |
|
840 |
Another course-grained overview is provided by the \emph{Theories} |
|
54372 | 841 |
panel, but without direct correspondence to text positions. A |
842 |
double-click on one of the theory entries with their status overview |
|
843 |
opens the corresponding text buffer, without changing the cursor |
|
844 |
position. |
|
54353 | 845 |
|
846 |
\medskip In addition, the \emph{Output} panel displays prover |
|
847 |
messages that correspond to a given command, within a separate |
|
848 |
window. |
|
849 |
||
57310 | 850 |
The cursor position in the presently active text area determines the prover |
851 |
command whose cumulative message output is appended and shown in that window |
|
852 |
(in canonical order according to the internal execution of the command). |
|
853 |
There are also control elements to modify the update policy of the output |
|
854 |
wrt.\ continued editor movements. This is particularly useful with several |
|
855 |
independent instances of the \emph{Output} panel, which the Dockable Window |
|
856 |
Manager of jEdit can handle conveniently. |
|
54353 | 857 |
|
57310 | 858 |
Former users of the old TTY interaction model (e.g.\ Proof~General) might |
859 |
find a separate window for prover messages familiar, but it is important to |
|
860 |
understand that the main Prover IDE feedback happens elsewhere. It is |
|
57420 | 861 |
possible to do meaningful proof editing within the primary text area and its |
862 |
markup, while using secondary output windows only rarely. |
|
54353 | 863 |
|
864 |
The main purpose of the output window is to ``debug'' unclear |
|
865 |
situations by inspecting internal state of the prover.\footnote{In |
|
54355 | 866 |
that sense, unstructured tactic scripts depend on continuous |
54353 | 867 |
debugging with internal state inspection.} Consequently, some |
868 |
special messages for \emph{tracing} or \emph{proof state} only |
|
869 |
appear here, and are not attached to the original source. |
|
870 |
||
871 |
\medskip In any case, prover messages also contain markup that may |
|
872 |
be explored recursively via tooltips or hyperlinks (see |
|
873 |
\secref{sec:tooltips-hyperlinks}), or clicked directly to initiate |
|
54355 | 874 |
certain actions (see \secref{sec:auto-tools} and |
58618 | 875 |
\secref{sec:sledgehammer}).\<close> |
54353 | 876 |
|
877 |
||
58618 | 878 |
section \<open>Query \label{sec:query}\<close> |
57311 | 879 |
|
58618 | 880 |
text \<open> |
57311 | 881 |
The \emph{Query} panel provides various GUI forms to request extra |
57420 | 882 |
information from the prover. In old times the user would have issued some |
57314 | 883 |
diagnostic command like @{command find_theorems} and inspected its output, |
884 |
but this is now integrated into the Prover IDE. |
|
57311 | 885 |
|
886 |
A \emph{Query} window provides some input fields and buttons for a |
|
887 |
particular query command, with output in a dedicated text area. There are |
|
888 |
various query modes: \emph{Find Theorems}, \emph{Find Constants}, |
|
57314 | 889 |
\emph{Print Context}, e.g.\ see \figref{fig:query}. As usual in jEdit, |
890 |
multiple \emph{Query} windows may be active at the same time: any number of |
|
57313 | 891 |
floating instances, but at most one docked instance (which is used by |
892 |
default). |
|
893 |
||
894 |
\begin{figure}[htb] |
|
895 |
\begin{center} |
|
896 |
\includegraphics[scale=0.333]{query} |
|
897 |
\end{center} |
|
898 |
\caption{An instance of the Query panel} |
|
899 |
\label{fig:query} |
|
900 |
\end{figure} |
|
57311 | 901 |
|
57314 | 902 |
\medskip The following GUI elements are common to all query modes: |
57311 | 903 |
\begin{itemize} |
904 |
||
905 |
\item The spinning wheel provides feedback about the status of a pending |
|
906 |
query wrt.\ the evaluation of its context and its own operation. |
|
907 |
||
908 |
\item The \emph{Apply} button attaches a fresh query invocation to the |
|
909 |
current context of the command where the cursor is pointing in the text. |
|
910 |
||
911 |
\item The \emph{Search} field allows to highlight query output according to |
|
57313 | 912 |
some regular expression, in the notation that is commonly used on the Java |
57420 | 913 |
platform.\footnote{@{url |
914 |
"http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html"}} |
|
915 |
This may serve as an additional visual filter of the result. |
|
57311 | 916 |
|
917 |
\item The \emph{Zoom} box controls the font size of the output area. |
|
918 |
||
919 |
\end{itemize} |
|
920 |
||
921 |
All query operations are asynchronous: there is no need to wait for the |
|
922 |
evaluation of the document for the query context, nor for the query |
|
923 |
operation itself. Query output may be detached as independent \emph{Info} |
|
924 |
window, using a menu operation of the dockable window manager. The printed |
|
925 |
result usually provides sufficient clues about the original query, with some |
|
926 |
hyperlink to its context (via markup of its head line). |
|
58618 | 927 |
\<close> |
57311 | 928 |
|
929 |
||
58618 | 930 |
subsection \<open>Find theorems\<close> |
57311 | 931 |
|
58618 | 932 |
text \<open> |
57313 | 933 |
The \emph{Query} panel in \emph{Find Theorems} mode retrieves facts from the |
934 |
theory or proof context matching all of given criteria in the \emph{Find} |
|
935 |
text field. A single criterium has the following syntax: |
|
57311 | 936 |
|
57313 | 937 |
@{rail \<open> |
938 |
('-'?) ('name' ':' @{syntax nameref} | 'intro' | 'elim' | 'dest' | |
|
939 |
'solves' | 'simp' ':' @{syntax term} | @{syntax term}) |
|
940 |
\<close>} |
|
941 |
||
57329 | 942 |
See also the Isar command @{command_ref find_theorems} in |
58554 | 943 |
@{cite "isabelle-isar-ref"}. |
58618 | 944 |
\<close> |
57311 | 945 |
|
946 |
||
58618 | 947 |
subsection \<open>Find constants\<close> |
57311 | 948 |
|
58618 | 949 |
text \<open> |
57313 | 950 |
The \emph{Query} panel in \emph{Find Constants} mode prints all constants |
951 |
whose type meets all of the given criteria in the \emph{Find} text field. |
|
952 |
A single criterium has the following syntax: |
|
953 |
||
954 |
@{rail \<open> |
|
955 |
('-'?) |
|
956 |
('name' ':' @{syntax nameref} | 'strict' ':' @{syntax type} | @{syntax type}) |
|
957 |
\<close>} |
|
958 |
||
58554 | 959 |
See also the Isar command @{command_ref find_consts} in @{cite |
960 |
"isabelle-isar-ref"}. |
|
58618 | 961 |
\<close> |
57311 | 962 |
|
963 |
||
58618 | 964 |
subsection \<open>Print context\<close> |
57311 | 965 |
|
58618 | 966 |
text \<open> |
57313 | 967 |
The \emph{Query} panel in \emph{Print Context} mode prints information from |
968 |
the theory or proof context, or proof state. See also the Isar commands |
|
57329 | 969 |
@{command_ref print_context}, @{command_ref print_cases}, @{command_ref |
58554 | 970 |
print_term_bindings}, @{command_ref print_theorems}, @{command_ref |
971 |
print_state} described in @{cite "isabelle-isar-ref"}. |
|
58618 | 972 |
\<close> |
57311 | 973 |
|
974 |
||
58618 | 975 |
section \<open>Tooltips and hyperlinks \label{sec:tooltips-hyperlinks}\<close> |
54352 | 976 |
|
58618 | 977 |
text \<open> |
57310 | 978 |
Formally processed text (prover input or output) contains rich markup |
979 |
information that can be explored further by using the @{verbatim CONTROL} |
|
980 |
modifier key on Linux and Windows, or @{verbatim COMMAND} on Mac OS X. |
|
981 |
Hovering with the mouse while the modifier is pressed reveals a |
|
982 |
\emph{tooltip} (grey box over the text with a yellow popup) and/or a |
|
983 |
\emph{hyperlink} (black rectangle over the text with change of mouse |
|
984 |
pointer); see also \figref{fig:tooltip}. |
|
54331 | 985 |
|
54357 | 986 |
\begin{figure}[htb] |
54331 | 987 |
\begin{center} |
57312 | 988 |
\includegraphics[scale=0.5]{popup1} |
54331 | 989 |
\end{center} |
54356 | 990 |
\caption{Tooltip and hyperlink for some formal entity} |
54350 | 991 |
\label{fig:tooltip} |
54331 | 992 |
\end{figure} |
993 |
||
57310 | 994 |
Tooltip popups use the same rendering mechanisms as the main text |
54350 | 995 |
area, and further tooltips and/or hyperlinks may be exposed |
54357 | 996 |
recursively by the same mechanism; see \figref{fig:nested-tooltips}. |
54323 | 997 |
|
54357 | 998 |
\begin{figure}[htb] |
54331 | 999 |
\begin{center} |
57312 | 1000 |
\includegraphics[scale=0.5]{popup2} |
54331 | 1001 |
\end{center} |
54356 | 1002 |
\caption{Nested tooltips over formal entities} |
54350 | 1003 |
\label{fig:nested-tooltips} |
54331 | 1004 |
\end{figure} |
54350 | 1005 |
|
1006 |
The tooltip popup window provides some controls to \emph{close} or |
|
1007 |
\emph{detach} the window, turning it into a separate \emph{Info} |
|
54372 | 1008 |
window managed by jEdit. The @{verbatim ESCAPE} key closes |
54352 | 1009 |
\emph{all} popups, which is particularly relevant when nested |
1010 |
tooltips are stacking up. |
|
1011 |
||
57310 | 1012 |
\medskip A black rectangle in the text indicates a hyperlink that may be |
1013 |
followed by a mouse click (while the @{verbatim CONTROL} or @{verbatim |
|
1014 |
COMMAND} modifier key is still pressed). Such jumps to other text locations |
|
1015 |
are recorded by the \emph{Navigator} plugin, which is bundled with |
|
1016 |
Isabelle/jEdit and enabled by default, including navigation arrows in the |
|
1017 |
main jEdit toolbar. |
|
54352 | 1018 |
|
1019 |
Also note that the link target may be a file that is itself not |
|
1020 |
subject to formal document processing of the editor session and thus |
|
1021 |
prevents further exploration: the chain of hyperlinks may end in |
|
54372 | 1022 |
some source file of the underlying logic image, or within the |
58618 | 1023 |
Isabelle/ML bootstrap sources of Isabelle/Pure.\<close> |
54321 | 1024 |
|
1025 |
||
58618 | 1026 |
section \<open>Completion \label{sec:completion}\<close> |
57324 | 1027 |
|
58618 | 1028 |
text \<open> |
57328 | 1029 |
Smart completion of partial input is the IDE functionality \emph{par |
1030 |
excellance}. Isabelle/jEdit combines several sources of information to |
|
1031 |
achieve that. Despite its complexity, it should be possible to get some idea |
|
1032 |
how completion works by experimentation, based on the overview of completion |
|
57335 | 1033 |
varieties in \secref{sec:completion-varieties}. The remaining subsections |
1034 |
explain concepts around completion more systematically. |
|
57325 | 1035 |
|
57335 | 1036 |
\medskip \emph{Explicit completion} is triggered by the action @{action_ref |
1037 |
"isabelle.complete"}, which is bound to the keyboard shortcut @{verbatim |
|
1038 |
"C+b"}, and thus overrides the jEdit default for @{action_ref |
|
1039 |
"complete-word"}. |
|
1040 |
||
57328 | 1041 |
\emph{Implicit completion} hooks into the regular keyboard input stream of |
57335 | 1042 |
the editor, with some event filtering and optional delays. |
54361 | 1043 |
|
57335 | 1044 |
\medskip Completion options may be configured in \emph{Plugin Options~/ |
1045 |
Isabelle~/ General~/ Completion}. These are explained in further detail |
|
57328 | 1046 |
below, whenever relevant. There is also a summary of options in |
1047 |
\secref{sec:completion-options}. |
|
1048 |
||
57335 | 1049 |
The asynchronous nature of PIDE interaction means that information from the |
1050 |
prover is delayed --- at least by a full round-trip of the document update |
|
1051 |
protocol. The default options already take this into account, with a |
|
57324 | 1052 |
sufficiently long completion delay to speculate on the availability of all |
57335 | 1053 |
relevant information from the editor and the prover, before completing text |
1054 |
immediately or producing a popup. Although there is an inherent danger of |
|
1055 |
non-deterministic behaviour due to such real-time parameters, the general |
|
1056 |
completion policy aims at determined results as far as possible. |
|
58618 | 1057 |
\<close> |
57324 | 1058 |
|
1059 |
||
58618 | 1060 |
subsection \<open>Varieties of completion \label{sec:completion-varieties}\<close> |
57324 | 1061 |
|
58618 | 1062 |
subsubsection \<open>Built-in templates\<close> |
57324 | 1063 |
|
58618 | 1064 |
text \<open> |
57327 | 1065 |
Isabelle is ultimately a framework of nested sub-languages of different |
57328 | 1066 |
kinds and purposes. The completion mechanism supports this by the following |
1067 |
built-in templates: |
|
1068 |
||
57335 | 1069 |
\begin{description} |
57324 | 1070 |
|
57335 | 1071 |
\item[] @{verbatim "`"} (single ASCII back-quote) supports \emph{quotations} |
57327 | 1072 |
via text cartouches. There are three selections, which are always presented |
57328 | 1073 |
in the same order and do not depend on any context information. The default |
57327 | 1074 |
choice produces a template ``@{text "\<open>\<box>\<close>"}'', where the box indicates the |
1075 |
cursor position after insertion; the other choices help to repair the block |
|
1076 |
structure of unbalanced text cartouches. |
|
57324 | 1077 |
|
57335 | 1078 |
\item[] @{verbatim "@{"} is completed to the template ``@{text "@{\<box>}"}'', |
1079 |
where the box indicates the cursor position after insertion. Here it is |
|
1080 |
convenient to use the wildcard ``@{verbatim __}'' or a more specific name |
|
1081 |
prefix to let semantic completion of name-space entries propose |
|
1082 |
antiquotation names. |
|
1083 |
||
1084 |
\end{description} |
|
1085 |
||
1086 |
With some practice, input of quoted sub-languages and antiquotations of |
|
1087 |
embedded languages should work fluently. Note that national keyboard layouts |
|
1088 |
might cause problems with back-quote as dead key: if possible, dead keys |
|
1089 |
should be disabled. |
|
58618 | 1090 |
\<close> |
57335 | 1091 |
|
57327 | 1092 |
|
58618 | 1093 |
subsubsection \<open>Syntax keywords\<close> |
57335 | 1094 |
|
58618 | 1095 |
text \<open> |
57335 | 1096 |
Syntax completion tables are determined statically from the keywords of the |
1097 |
``outer syntax'' of the underlying edit mode: for theory files this is the |
|
1098 |
syntax of Isar commands. |
|
57327 | 1099 |
|
57335 | 1100 |
Keywords are usually plain words, which means the completion mechanism only |
1101 |
inserts them directly into the text for explicit completion |
|
1102 |
(\secref{sec:completion-input}), but produces a popup |
|
1103 |
(\secref{sec:completion-popup}) otherwise. |
|
1104 |
||
1105 |
At the point where outer syntax keywords are defined, it is possible to |
|
1106 |
specify an alternative replacement string to be inserted instead of the |
|
1107 |
keyword itself. An empty string means to suppress the keyword altogether, |
|
1108 |
which is occasionally useful to avoid confusion, e.g.\ the rare keyword |
|
1109 |
@{command simproc_setup} vs.\ the frequent name-space entry @{text simp}. |
|
58618 | 1110 |
\<close> |
57324 | 1111 |
|
1112 |
||
58618 | 1113 |
subsubsection \<open>Isabelle symbols\<close> |
57324 | 1114 |
|
58618 | 1115 |
text \<open> |
57325 | 1116 |
The completion tables for Isabelle symbols (\secref{sec:symbols}) are |
1117 |
determined statically from @{file "$ISABELLE_HOME/etc/symbols"} and |
|
57328 | 1118 |
@{file_unchecked "$ISABELLE_HOME_USER/etc/symbols"} for each symbol |
1119 |
specification as follows: |
|
57325 | 1120 |
|
1121 |
\medskip |
|
1122 |
\begin{tabular}{ll} |
|
1123 |
\textbf{completion entry} & \textbf{example} \\\hline |
|
1124 |
literal symbol & @{verbatim "\<forall>"} \\ |
|
57328 | 1125 |
symbol name with backslash & @{verbatim "\\"}@{verbatim forall} \\ |
57335 | 1126 |
symbol abbreviation & @{verbatim "ALL"} or @{verbatim "!"} \\ |
57325 | 1127 |
\end{tabular} |
1128 |
\medskip |
|
1129 |
||
57335 | 1130 |
When inserted into the text, the above examples all produce the same Unicode |
57325 | 1131 |
rendering @{text "\<forall>"} of the underlying symbol @{verbatim "\<forall>"}. |
1132 |
||
57335 | 1133 |
A symbol abbreviation that is a plain word, like @{verbatim "ALL"}, is |
1134 |
treated like a syntax keyword. Non-word abbreviations like @{verbatim "-->"} |
|
1135 |
are inserted more aggressively, except for single-character abbreviations |
|
1136 |
like @{verbatim "!"} above. |
|
57324 | 1137 |
|
57335 | 1138 |
\medskip Symbol completion depends on the semantic language context |
1139 |
(\secref{sec:completion-context}), to enable or disable that aspect for a |
|
1140 |
particular sub-language of Isabelle. For example, symbol completion is |
|
1141 |
suppressed within document source to avoid confusion with {\LaTeX} macros |
|
1142 |
that use similar notation. |
|
58618 | 1143 |
\<close> |
57324 | 1144 |
|
1145 |
||
58618 | 1146 |
subsubsection \<open>Name-space entries\<close> |
57324 | 1147 |
|
58618 | 1148 |
text \<open> |
57324 | 1149 |
This is genuine semantic completion, using information from the prover, so |
1150 |
it requires some delay. A \emph{failed name-space lookup} produces an error |
|
57335 | 1151 |
message that is annotated with a list of alternative names that are legal. |
1152 |
The list of results is truncated according to the system option |
|
1153 |
@{system_option_ref completion_limit}. The completion mechanism takes this |
|
1154 |
into account when collecting information on the prover side. |
|
57324 | 1155 |
|
57328 | 1156 |
Already recognized names are \emph{not} completed further, but completion |
1157 |
may be extended by appending a suffix of underscores. This provokes a failed |
|
1158 |
lookup, and another completion attempt while ignoring the underscores. For |
|
1159 |
example, in a name space where @{verbatim "foo"} and @{verbatim "foobar"} |
|
1160 |
are known, the input @{verbatim "foo"} remains unchanged, but @{verbatim |
|
1161 |
"foo_"} may be completed to @{verbatim "foo"} or @{verbatim "foobar"}. |
|
57324 | 1162 |
|
57326 | 1163 |
The special identifier ``@{verbatim "__"}'' serves as a wild-card for |
1164 |
arbitrary completion: it exposes the name-space content to the completion |
|
1165 |
mechanism (truncated according to @{system_option completion_limit}). This |
|
1166 |
is occasionally useful to explore an unknown name-space, e.g.\ in some |
|
57324 | 1167 |
template. |
58618 | 1168 |
\<close> |
57324 | 1169 |
|
1170 |
||
58618 | 1171 |
subsubsection \<open>File-system paths\<close> |
57324 | 1172 |
|
58618 | 1173 |
text \<open> |
57324 | 1174 |
Depending on prover markup about file-system path specifications in the |
57335 | 1175 |
source text, e.g.\ for the argument of a load command |
57324 | 1176 |
(\secref{sec:aux-files}), the completion mechanism explores the directory |
1177 |
content and offers the result as completion popup. Relative path |
|
1178 |
specifications are understood wrt.\ the \emph{master directory} of the |
|
57335 | 1179 |
document node (\secref{sec:buffer-node}) of the enclosing editor buffer; |
1180 |
this requires a proper theory, not an auxiliary file. |
|
57324 | 1181 |
|
1182 |
A suffix of slashes may be used to continue the exploration of an already |
|
1183 |
recognized directory name. |
|
58618 | 1184 |
\<close> |
57324 | 1185 |
|
1186 |
||
58618 | 1187 |
subsubsection \<open>Spell-checking\<close> |
57328 | 1188 |
|
58618 | 1189 |
text \<open> |
57328 | 1190 |
The spell-checker combines semantic markup from the prover (regions of plain |
1191 |
words) with static dictionaries (word lists) that are known to the editor. |
|
1192 |
||
57333 | 1193 |
Unknown words are underlined in the text, using @{system_option_ref |
57328 | 1194 |
spell_checker_color} (blue by default). This is not an error, but a hint to |
57335 | 1195 |
the user that some action may be taken. The jEdit context menu provides |
1196 |
various actions, as far as applicable: |
|
57328 | 1197 |
|
1198 |
\medskip |
|
1199 |
\begin{tabular}{l} |
|
57329 | 1200 |
@{action_ref "isabelle.complete-word"} \\ |
1201 |
@{action_ref "isabelle.exclude-word"} \\ |
|
1202 |
@{action_ref "isabelle.exclude-word-permanently"} \\ |
|
1203 |
@{action_ref "isabelle.include-word"} \\ |
|
1204 |
@{action_ref "isabelle.include-word-permanently"} \\ |
|
57328 | 1205 |
\end{tabular} |
1206 |
\medskip |
|
1207 |
||
57329 | 1208 |
Instead of the specific @{action_ref "isabelle.complete-word"}, it is also |
1209 |
possible to use the generic @{action_ref "isabelle.complete"} with its |
|
57335 | 1210 |
default keyboard shortcut @{verbatim "C+b"}. |
57328 | 1211 |
|
1212 |
\medskip Dictionary lookup uses some educated guesses about lower-case, |
|
1213 |
upper-case, and capitalized words. This is oriented on common use in |
|
57335 | 1214 |
English, where this aspect is not decisive for proper spelling, in contrast |
1215 |
to German, for example. |
|
58618 | 1216 |
\<close> |
57328 | 1217 |
|
1218 |
||
58618 | 1219 |
subsection \<open>Semantic completion context \label{sec:completion-context}\<close> |
57325 | 1220 |
|
58618 | 1221 |
text \<open> |
57325 | 1222 |
Completion depends on a semantic context that is provided by the prover, |
1223 |
although with some delay, because at least a full PIDE protocol round-trip |
|
1224 |
is required. Until that information becomes available in the PIDE |
|
1225 |
document-model, the default context is given by the outer syntax of the |
|
1226 |
editor mode (see also \secref{sec:buffer-node}). |
|
1227 |
||
57335 | 1228 |
The semantic \emph{language context} provides information about nested |
1229 |
sub-languages of Isabelle: keywords are only completed for outer syntax, |
|
1230 |
symbols or antiquotations for languages that support them. E.g.\ there is no |
|
1231 |
symbol completion for ML source, but within ML strings, comments, |
|
1232 |
antiquotations. |
|
57325 | 1233 |
|
57335 | 1234 |
The prover may produce \emph{no completion} markup in exceptional |
1235 |
situations, to tell that some language keywords should be excluded from |
|
1236 |
further completion attempts. For example, @{verbatim ":"} within accepted |
|
1237 |
Isar syntax looses its meaning as abbreviation for symbol @{text "\<in>"}. |
|
57589 | 1238 |
|
1239 |
\medskip The completion context is \emph{ignored} for built-in templates and |
|
1240 |
symbols in their explicit form ``@{verbatim "\<foobar>"}''; see also |
|
1241 |
\secref{sec:completion-varieties}. This allows to complete within broken |
|
1242 |
input that escapes its normal semantic context, e.g.\ antiquotations or |
|
1243 |
string literals in ML, which do not allow arbitrary backslash sequences. |
|
58618 | 1244 |
\<close> |
57325 | 1245 |
|
1246 |
||
58618 | 1247 |
subsection \<open>Input events \label{sec:completion-input}\<close> |
57324 | 1248 |
|
58618 | 1249 |
text \<open> |
57332 | 1250 |
Completion is triggered by certain events produced by the user, with |
1251 |
optional delay after keyboard input according to @{system_option |
|
1252 |
jedit_completion_delay}. |
|
57325 | 1253 |
|
57332 | 1254 |
\begin{description} |
1255 |
||
57335 | 1256 |
\item[Explicit completion] works via action @{action_ref |
1257 |
"isabelle.complete"} with keyboard shortcut @{verbatim "C+b"}. This |
|
1258 |
overrides the shortcut for @{action_ref "complete-word"} in jEdit, but it is |
|
1259 |
possible to restore the original jEdit keyboard mapping of @{action |
|
1260 |
"complete-word"} via \emph{Global Options~/ Shortcuts} and invent a |
|
1261 |
different one for @{action "isabelle.complete"}. |
|
57325 | 1262 |
|
57335 | 1263 |
\item[Explicit spell-checker completion] works via @{action_ref |
57332 | 1264 |
"isabelle.complete-word"}, which is exposed in the jEdit context menu, if |
1265 |
the mouse points to a word that the spell-checker can complete. |
|
1266 |
||
57335 | 1267 |
\item[Implicit completion] works via regular keyboard input of the editor. |
1268 |
It depends on further side-conditions: |
|
57325 | 1269 |
|
1270 |
\begin{enumerate} |
|
1271 |
||
57329 | 1272 |
\item The system option @{system_option_ref jedit_completion} needs to |
57325 | 1273 |
be enabled (default). |
1274 |
||
1275 |
\item Completion of syntax keywords requires at least 3 relevant |
|
1276 |
characters in the text. |
|
1277 |
||
57329 | 1278 |
\item The system option @{system_option_ref jedit_completion_delay} |
57332 | 1279 |
determines an additional delay (0.5 by default), before opening a completion |
1280 |
popup. The delay gives the prover a chance to provide semantic completion |
|
1281 |
information, notably the context (\secref{sec:completion-context}). |
|
57325 | 1282 |
|
57329 | 1283 |
\item The system option @{system_option_ref jedit_completion_immediate} |
57425
625a369b4f32
jedit_completion_immediate is enabled by default: let all users participate in slightly more ambitious symbol insertion;
wenzelm
parents:
57420
diff
changeset
|
1284 |
(enabled by default) controls whether replacement text should be inserted |
57332 | 1285 |
immediately without popup, regardless of @{system_option |
1286 |
jedit_completion_delay}. This aggressive mode of completion is restricted to |
|
1287 |
Isabelle symbols and their abbreviations (\secref{sec:symbols}). |
|
57325 | 1288 |
|
1289 |
\item Completion of symbol abbreviations with only one relevant |
|
1290 |
character in the text always enforces an explicit popup, |
|
57332 | 1291 |
regardless of @{system_option_ref jedit_completion_immediate}. |
57325 | 1292 |
|
1293 |
\end{enumerate} |
|
1294 |
||
57332 | 1295 |
\end{description} |
58618 | 1296 |
\<close> |
57324 | 1297 |
|
1298 |
||
58618 | 1299 |
subsection \<open>Completion popup \label{sec:completion-popup}\<close> |
57324 | 1300 |
|
58618 | 1301 |
text \<open> |
57335 | 1302 |
A \emph{completion popup} is a minimally invasive GUI component over the |
1303 |
text area that offers a selection of completion items to be inserted into |
|
57420 | 1304 |
the text, e.g.\ by mouse clicks. Items are sorted dynamically, according to |
57833
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1305 |
the frequency of selection, with persistent history. The popup may interpret |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1306 |
special keys @{verbatim ENTER}, @{verbatim TAB}, @{verbatim ESCAPE}, |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1307 |
@{verbatim UP}, @{verbatim DOWN}, @{verbatim PAGE_UP}, @{verbatim |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1308 |
PAGE_DOWN}, but all other key events are passed to the underlying text area. |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1309 |
This allows to ignore unwanted completions most of the time and continue |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1310 |
typing quickly. Thus the popup serves as a mechanism of confirmation of |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1311 |
proposed items, but the default is to continue without completion. |
57324 | 1312 |
|
1313 |
The meaning of special keys is as follows: |
|
1314 |
||
1315 |
\medskip |
|
1316 |
\begin{tabular}{ll} |
|
1317 |
\textbf{key} & \textbf{action} \\\hline |
|
57833
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1318 |
@{verbatim "ENTER"} & select completion (if @{system_option jedit_completion_select_enter}) \\ |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1319 |
@{verbatim "TAB"} & select completion (if @{system_option jedit_completion_select_tab}) \\ |
57324 | 1320 |
@{verbatim "ESCAPE"} & dismiss popup \\ |
1321 |
@{verbatim "UP"} & move up one item \\ |
|
1322 |
@{verbatim "DOWN"} & move down one item \\ |
|
1323 |
@{verbatim "PAGE_UP"} & move up one page of items \\ |
|
1324 |
@{verbatim "PAGE_DOWN"} & move down one page of items \\ |
|
1325 |
\end{tabular} |
|
1326 |
\medskip |
|
1327 |
||
1328 |
Movement within the popup is only active for multiple items. |
|
1329 |
Otherwise the corresponding key event retains its standard meaning |
|
1330 |
within the underlying text area. |
|
58618 | 1331 |
\<close> |
57324 | 1332 |
|
1333 |
||
58618 | 1334 |
subsection \<open>Insertion \label{sec:completion-insert}\<close> |
57324 | 1335 |
|
58618 | 1336 |
text \<open> |
57333 | 1337 |
Completion may first propose replacements to be selected (via a popup), or |
1338 |
replace text immediately in certain situations and depending on certain |
|
1339 |
options like @{system_option jedit_completion_immediate}. In any case, |
|
57420 | 1340 |
insertion works uniformly, by imitating normal jEdit text insertion, |
1341 |
depending on the state of the \emph{text selection}. Isabelle/jEdit tries to |
|
1342 |
accommodate the most common forms of advanced selections in jEdit, but not |
|
1343 |
all combinations make sense. At least the following important cases are |
|
1344 |
well-defined: |
|
57333 | 1345 |
|
1346 |
\begin{description} |
|
1347 |
||
1348 |
\item[No selection.] The original is removed and the replacement inserted, |
|
1349 |
depending on the caret position. |
|
57324 | 1350 |
|
57420 | 1351 |
\item[Rectangular selection of zero width.] This special case is treated by |
57333 | 1352 |
jEdit as ``tall caret'' and insertion of completion imitates its normal |
57335 | 1353 |
behaviour: separate copies of the replacement are inserted for each line of |
1354 |
the selection. |
|
57333 | 1355 |
|
57335 | 1356 |
\item[Other rectangular selection or multiple selections.] Here the original |
1357 |
is removed and the replacement is inserted for each line (or segment) of the |
|
1358 |
selection. |
|
57333 | 1359 |
|
1360 |
\end{description} |
|
1361 |
||
57335 | 1362 |
Support for multiple selections is particularly useful for |
1363 |
\emph{HyperSearch}: clicking on one of the items in the \emph{HyperSearch |
|
1364 |
Results} window makes jEdit select all its occurrences in the corresponding |
|
1365 |
line of text. Then explicit completion can be invoked via @{verbatim "C+b"}, |
|
57420 | 1366 |
e.g.\ to replace occurrences of @{verbatim "-->"} by @{text "\<longrightarrow>"}. |
57333 | 1367 |
|
1368 |
\medskip Insertion works by removing and inserting pieces of text from the |
|
57335 | 1369 |
buffer. This counts as one atomic operation on the jEdit history. Thus |
1370 |
unintended completions may be reverted by the regular @{action undo} action |
|
1371 |
of jEdit. According to normal jEdit policies, the recovered text after |
|
1372 |
@{action undo} is selected: @{verbatim ESCAPE} is required to reset the |
|
1373 |
selection and to continue typing more text. |
|
58618 | 1374 |
\<close> |
57324 | 1375 |
|
1376 |
||
58618 | 1377 |
subsection \<open>Options \label{sec:completion-options}\<close> |
57324 | 1378 |
|
58618 | 1379 |
text \<open> |
57324 | 1380 |
This is a summary of Isabelle/Scala system options that are relevant for |
57335 | 1381 |
completion. They may be configured in \emph{Plugin Options~/ Isabelle~/ |
57332 | 1382 |
General} as usual. |
1383 |
||
1384 |
\begin{itemize} |
|
1385 |
||
57335 | 1386 |
\item @{system_option_def completion_limit} specifies the maximum number of |
57332 | 1387 |
name-space entries exposed in semantic completion by the prover. |
1388 |
||
1389 |
\item @{system_option_def jedit_completion} guards implicit completion via |
|
57335 | 1390 |
regular jEdit key events (\secref{sec:completion-input}): it allows to |
1391 |
disable implicit completion altogether. |
|
57324 | 1392 |
|
57833
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1393 |
\item @{system_option_def jedit_completion_select_enter} and |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1394 |
@{system_option_def jedit_completion_select_tab} enable keys to select a |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1395 |
completion item from the popup (\secref{sec:completion-popup}). Note that a |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1396 |
regular mouse click on the list of items is always possible. |
2c2bae3da1c2
completion popup supports both ENTER and TAB (default);
wenzelm
parents:
57822
diff
changeset
|
1397 |
|
57332 | 1398 |
\item @{system_option_def jedit_completion_context} specifies whether the |
57335 | 1399 |
language context provided by the prover should be used at all. Disabling |
1400 |
that option makes completion less ``semantic''. Note that incomplete or |
|
1401 |
severely broken input may cause some disagreement of the prover and the user |
|
1402 |
about the intended language context. |
|
57332 | 1403 |
|
57333 | 1404 |
\item @{system_option_def jedit_completion_delay} and @{system_option_def |
1405 |
jedit_completion_immediate} determine the handling of keyboard events for |
|
1406 |
implicit completion (\secref{sec:completion-input}). |
|
57332 | 1407 |
|
57333 | 1408 |
A @{system_option jedit_completion_delay}~@{verbatim "> 0"} postpones the |
57335 | 1409 |
processing of key events, until after the user has stopped typing for the |
57333 | 1410 |
given time span, but @{system_option jedit_completion_immediate}~@{verbatim |
1411 |
"= true"} means that abbreviations of Isabelle symbols are handled |
|
1412 |
nonetheless. |
|
57332 | 1413 |
|
1414 |
\item @{system_option_def jedit_completion_path_ignore} specifies ``glob'' |
|
57335 | 1415 |
patterns to ignore in file-system path completion (separated by colons), |
1416 |
e.g.\ backup files ending with tilde. |
|
57332 | 1417 |
|
57333 | 1418 |
\item @{system_option_def spell_checker} is a global guard for all |
1419 |
spell-checker operations: it allows to disable that mechanism altogether. |
|
57332 | 1420 |
|
57333 | 1421 |
\item @{system_option_def spell_checker_dictionary} determines the current |
57335 | 1422 |
dictionary, taken from the colon-separated list in the settings variable |
57333 | 1423 |
@{setting_def JORTHO_DICTIONARIES}. There are jEdit actions to specify local |
1424 |
updates to a dictionary, by including or excluding words. The result of |
|
1425 |
permanent dictionary updates is stored in the directory @{file_unchecked |
|
57335 | 1426 |
"$ISABELLE_HOME_USER/dictionaries"}, in a separate file for each dictionary. |
57332 | 1427 |
|
57333 | 1428 |
\item @{system_option_def spell_checker_elements} specifies a |
1429 |
comma-separated list of markup elements that delimit words in the source |
|
1430 |
that is subject to spell-checking, including various forms of comments. |
|
57332 | 1431 |
|
1432 |
\end{itemize} |
|
58618 | 1433 |
\<close> |
54361 | 1434 |
|
1435 |
||
58618 | 1436 |
section \<open>Automatically tried tools \label{sec:auto-tools}\<close> |
54353 | 1437 |
|
58618 | 1438 |
text \<open> |
57325 | 1439 |
Continuous document processing works asynchronously in the background. |
1440 |
Visible document source that has been evaluated may get augmented by |
|
1441 |
additional results of \emph{asynchronous print functions}. The canonical |
|
1442 |
example is proof state output, which is always enabled. More heavy-weight |
|
1443 |
print functions may be applied, in order to prove or disprove parts of the |
|
1444 |
formal text by other means. |
|
54354 | 1445 |
|
1446 |
Isabelle/HOL provides various automatically tried tools that operate |
|
1447 |
on outermost goal statements (e.g.\ @{command lemma}, @{command |
|
1448 |
theorem}), independently of the state of the current proof attempt. |
|
1449 |
They work implicitly without any arguments. Results are output as |
|
1450 |
\emph{information messages}, which are indicated in the text area by |
|
54356 | 1451 |
blue squiggles and a blue information sign in the gutter (see |
1452 |
\figref{fig:auto-tools}). The message content may be shown as for |
|
57316 | 1453 |
other output (see also \secref{sec:output}). Some tools |
54356 | 1454 |
produce output with \emph{sendback} markup, which means that |
1455 |
clicking on certain parts of the output inserts that text into the |
|
1456 |
source in the proper place. |
|
1457 |
||
54357 | 1458 |
\begin{figure}[htb] |
54356 | 1459 |
\begin{center} |
57312 | 1460 |
\includegraphics[scale=0.333]{auto-tools} |
54356 | 1461 |
\end{center} |
57312 | 1462 |
\caption{Result of automatically tried tools} |
54356 | 1463 |
\label{fig:auto-tools} |
1464 |
\end{figure} |
|
54354 | 1465 |
|
54372 | 1466 |
\medskip The following Isabelle system options control the behavior |
54354 | 1467 |
of automatically tried tools (see also the jEdit dialog window |
57335 | 1468 |
\emph{Plugin Options~/ Isabelle~/ General~/ Automatically tried |
54354 | 1469 |
tools}): |
1470 |
||
1471 |
\begin{itemize} |
|
1472 |
||
57329 | 1473 |
\item @{system_option_ref auto_methods} controls automatic use of a |
54354 | 1474 |
combination of standard proof methods (@{method auto}, @{method |
54372 | 1475 |
simp}, @{method blast}, etc.). This corresponds to the Isar command |
58554 | 1476 |
@{command_ref "try0"} @{cite "isabelle-isar-ref"}. |
54354 | 1477 |
|
1478 |
The tool is disabled by default, since unparameterized invocation of |
|
1479 |
standard proof methods often consumes substantial CPU resources |
|
1480 |
without leading to success. |
|
1481 |
||
57329 | 1482 |
\item @{system_option_ref auto_nitpick} controls a slightly reduced |
1483 |
version of @{command_ref nitpick}, which tests for counterexamples using |
|
54354 | 1484 |
first-order relational logic. See also the Nitpick manual |
58554 | 1485 |
@{cite "isabelle-nitpick"}. |
54354 | 1486 |
|
1487 |
This tool is disabled by default, due to the extra overhead of |
|
1488 |
invoking an external Java process for each attempt to disprove a |
|
1489 |
subgoal. |
|
1490 |
||
57329 | 1491 |
\item @{system_option_ref auto_quickcheck} controls automatic use of |
1492 |
@{command_ref quickcheck}, which tests for counterexamples using a |
|
54354 | 1493 |
series of assignments for free variables of a subgoal. |
1494 |
||
1495 |
This tool is \emph{enabled} by default. It requires little |
|
1496 |
overhead, but is a bit weaker than @{command nitpick}. |
|
1497 |
||
57329 | 1498 |
\item @{system_option_ref auto_sledgehammer} controls a significantly |
1499 |
reduced version of @{command_ref sledgehammer}, which attempts to prove |
|
54354 | 1500 |
a subgoal using external automatic provers. See also the |
58554 | 1501 |
Sledgehammer manual @{cite "isabelle-sledgehammer"}. |
54354 | 1502 |
|
1503 |
This tool is disabled by default, due to the relatively heavy nature |
|
1504 |
of Sledgehammer. |
|
1505 |
||
57329 | 1506 |
\item @{system_option_ref auto_solve_direct} controls automatic use of |
1507 |
@{command_ref solve_direct}, which checks whether the current subgoals |
|
54354 | 1508 |
can be solved directly by an existing theorem. This also helps to |
1509 |
detect duplicate lemmas. |
|
1510 |
||
1511 |
This tool is \emph{enabled} by default. |
|
1512 |
||
1513 |
\end{itemize} |
|
1514 |
||
1515 |
Invocation of automatically tried tools is subject to some global |
|
1516 |
policies of parallel execution, which may be configured as follows: |
|
1517 |
||
1518 |
\begin{itemize} |
|
1519 |
||
57329 | 1520 |
\item @{system_option_ref auto_time_limit} (default 2.0) determines the |
54372 | 1521 |
timeout (in seconds) for each tool execution. |
54354 | 1522 |
|
57329 | 1523 |
\item @{system_option_ref auto_time_start} (default 1.0) determines the |
54354 | 1524 |
start delay (in seconds) for automatically tried tools, after the |
1525 |
main command evaluation is finished. |
|
1526 |
||
1527 |
\end{itemize} |
|
1528 |
||
1529 |
Each tool is submitted independently to the pool of parallel |
|
1530 |
execution tasks in Isabelle/ML, using hardwired priorities according |
|
1531 |
to its relative ``heaviness''. The main stages of evaluation and |
|
1532 |
printing of proof states take precedence, but an already running |
|
1533 |
tool is not canceled and may thus reduce reactivity of proof |
|
1534 |
document processing. |
|
1535 |
||
1536 |
Users should experiment how the available CPU resources (number of |
|
1537 |
cores) are best invested to get additional feedback from prover in |
|
54372 | 1538 |
the background, by using a selection of weaker or stronger tools. |
58618 | 1539 |
\<close> |
54353 | 1540 |
|
1541 |
||
58618 | 1542 |
section \<open>Sledgehammer \label{sec:sledgehammer}\<close> |
54353 | 1543 |
|
58618 | 1544 |
text \<open>The \emph{Sledgehammer} panel (\figref{fig:sledgehammer}) |
54372 | 1545 |
provides a view on some independent execution of the Isar command |
57329 | 1546 |
@{command_ref sledgehammer}, with process indicator (spinning wheel) and |
54372 | 1547 |
GUI elements for important Sledgehammer arguments and options. Any |
54356 | 1548 |
number of Sledgehammer panels may be active, according to the |
54372 | 1549 |
standard policies of Dockable Window Management in jEdit. Closing |
1550 |
such windows also cancels the corresponding prover tasks. |
|
54356 | 1551 |
|
54357 | 1552 |
\begin{figure}[htb] |
54356 | 1553 |
\begin{center} |
57312 | 1554 |
\includegraphics[scale=0.333]{sledgehammer} |
54356 | 1555 |
\end{center} |
1556 |
\caption{An instance of the Sledgehammer panel} |
|
1557 |
\label{fig:sledgehammer} |
|
1558 |
\end{figure} |
|
54355 | 1559 |
|
1560 |
The \emph{Apply} button attaches a fresh invocation of @{command |
|
1561 |
sledgehammer} to the command where the cursor is pointing in the |
|
1562 |
text --- this should be some pending proof problem. Further buttons |
|
1563 |
like \emph{Cancel} and \emph{Locate} help to manage the running |
|
1564 |
process. |
|
1565 |
||
1566 |
Results appear incrementally in the output window of the panel. |
|
54372 | 1567 |
Proposed proof snippets are marked-up as \emph{sendback}, which |
54355 | 1568 |
means a single mouse click inserts the text into a suitable place of |
1569 |
the original source. Some manual editing may be required |
|
58618 | 1570 |
nonetheless, say to remove earlier proof attempts.\<close> |
54353 | 1571 |
|
1572 |
||
60255
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1573 |
chapter \<open>Isabelle document preparation\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1574 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1575 |
text \<open>The ultimate purpose of Isabelle is to produce nicely rendered documents |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1576 |
with the Isabelle document preparation system, which is based on {\LaTeX}; |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1577 |
see also @{cite "isabelle-sys" and "isabelle-isar-ref"}. Isabelle/jEdit |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1578 |
provides some additional support for document editing.\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1579 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1580 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1581 |
section \<open>Document outline\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1582 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1583 |
text \<open>Theory sources may contain document markup commands, such as |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1584 |
@{command_ref chapter}, @{command_ref section}, @{command subsection}. The |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1585 |
Isabelle SideKick parser (\secref{sec:sidekick}) represents this document |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1586 |
outline as structured tree view, with formal statements and proofs nested |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1587 |
inside; see \figref{fig:sidekick-document}. |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1588 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1589 |
\begin{figure}[htb] |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1590 |
\begin{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1591 |
\includegraphics[scale=0.333]{sidekick-document} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1592 |
\end{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1593 |
\caption{Isabelle document outline via SideKick tree view} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1594 |
\label{fig:sidekick-document} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1595 |
\end{figure} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1596 |
\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1597 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1598 |
section \<open>Citations and Bib{\TeX} entries\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1599 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1600 |
text \<open>Citations are managed by {\LaTeX} and Bib{\TeX} in @{verbatim ".bib"} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1601 |
files. The Isabelle session build process and the |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1602 |
@{verbatim "isabelle latex"} tool @{cite "isabelle-sys"} are smart enough |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1603 |
to assemble the result, based on the session directory layout. |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1604 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1605 |
The document antiquotation @{text "@{cite}"} is described in @{cite |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1606 |
"isabelle-isar-ref"}. Within the Prover IDE it provides semantic markup for |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1607 |
tooltips, hyperlinks, and completion for Bib{\TeX} database entries. |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1608 |
Isabelle/jEdit does \emph{not} know about the actual Bib{\TeX} environment |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1609 |
used in {\LaTeX} batch-mode, but it can take citations from those @{verbatim |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1610 |
".bib"} files that happen to be open in the editor; see |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1611 |
\figref{fig:cite-completion}. |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1612 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1613 |
\begin{figure}[htb] |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1614 |
\begin{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1615 |
\includegraphics[scale=0.333]{cite-completion} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1616 |
\end{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1617 |
\caption{Semantic completion of citations from open Bib{\TeX} files} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1618 |
\label{fig:cite-completion} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1619 |
\end{figure} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1620 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1621 |
Isabelle/jEdit also provides some support for editing @{verbatim ".bib"} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1622 |
files themselves. There is syntax highlighting based on entry types |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1623 |
(according to standard Bib{\TeX} styles), a context-menu to compose entries |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1624 |
systematically, and a SideKick tree view of the overall content; see |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1625 |
\figref{fig:bibtex-mode}. |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1626 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1627 |
\begin{figure}[htb] |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1628 |
\begin{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1629 |
\includegraphics[scale=0.333]{bibtex-mode} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1630 |
\end{center} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1631 |
\caption{Bib{\TeX} mode with context menu and SideKick tree view} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1632 |
\label{fig:bibtex-mode} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1633 |
\end{figure} |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1634 |
\<close> |
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1635 |
|
0466bd194d74
more on Isabelle document preparation and bibtex files;
wenzelm
parents:
58618
diff
changeset
|
1636 |
|
58618 | 1637 |
chapter \<open>Miscellaneous tools\<close> |
54358 | 1638 |
|
58618 | 1639 |
section \<open>Timing\<close> |
54359 | 1640 |
|
58618 | 1641 |
text \<open>Managed evaluation of commands within PIDE documents includes |
54359 | 1642 |
timing information, which consists of elapsed (wall-clock) time, CPU |
1643 |
time, and GC (garbage collection) time. Note that in a |
|
1644 |
multithreaded system it is difficult to measure execution time |
|
1645 |
precisely: elapsed time is closer to the real requirements of |
|
1646 |
runtime resources than CPU or GC time, which are both subject to |
|
1647 |
influences from the parallel environment that are outside the scope |
|
1648 |
of the current command transaction. |
|
1649 |
||
1650 |
The \emph{Timing} panel provides an overview of cumulative command |
|
1651 |
timings for each document node. Commands with elapsed time below |
|
1652 |
the given threshold are ignored in the grand total. Nodes are |
|
1653 |
sorted according to their overall timing. For the document node |
|
1654 |
that corresponds to the current buffer, individual command timings |
|
1655 |
are shown as well. A double-click on a theory node or command moves |
|
1656 |
the editor focus to that particular source position. |
|
1657 |
||
1658 |
It is also possible to reveal individual timing information via some |
|
1659 |
tooltip for the corresponding command keyword, using the technique |
|
1660 |
of mouse hovering with @{verbatim CONTROL}/@{verbatim COMMAND} |
|
1661 |
modifier key as explained in \secref{sec:tooltips-hyperlinks}. |
|
1662 |
Actual display of timing depends on the global option |
|
57329 | 1663 |
@{system_option_ref jedit_timing_threshold}, which can be configured in |
57420 | 1664 |
\emph{Plugin Options~/ Isabelle~/ General}. |
54360 | 1665 |
|
57869 | 1666 |
\medskip The \emph{Monitor} panel visualizes various data collections about |
1667 |
recent activity of the Isabelle/ML task farm and the underlying ML runtime |
|
1668 |
system. The display is continuously updated according to @{system_option_ref |
|
1669 |
editor_chart_delay}. Note that the painting of the chart takes considerable |
|
1670 |
runtime itself --- on the Java Virtual Machine that runs Isabelle/Scala, not |
|
1671 |
Isabelle/ML. Internally, the Isabelle/Scala module @{verbatim |
|
1672 |
isabelle.ML_Statistics} provides further access to statistics of |
|
58618 | 1673 |
Isabelle/ML.\<close> |
54359 | 1674 |
|
1675 |
||
58618 | 1676 |
section \<open>Low-level output\<close> |
54358 | 1677 |
|
58618 | 1678 |
text \<open>Prover output is normally shown directly in the main text area |
54372 | 1679 |
or secondary \emph{Output} panels, as explained in |
57316 | 1680 |
\secref{sec:output}. |
54358 | 1681 |
|
1682 |
Beyond this, it is occasionally useful to inspect low-level output |
|
1683 |
channels via some of the following additional panels: |
|
1684 |
||
1685 |
\begin{itemize} |
|
1686 |
||
1687 |
\item \emph{Protocol} shows internal messages between the |
|
1688 |
Isabelle/Scala and Isabelle/ML side of the PIDE editing protocol. |
|
1689 |
Recording of messages starts with the first activation of the |
|
1690 |
corresponding dockable window; earlier messages are lost. |
|
1691 |
||
1692 |
Actual display of protocol messages causes considerable slowdown, so |
|
54372 | 1693 |
it is important to undock all \emph{Protocol} panels for production |
1694 |
work. |
|
54358 | 1695 |
|
1696 |
\item \emph{Raw Output} shows chunks of text from the @{verbatim |
|
1697 |
stdout} and @{verbatim stderr} channels of the prover process. |
|
1698 |
Recording of output starts with the first activation of the |
|
1699 |
corresponding dockable window; earlier output is lost. |
|
1700 |
||
1701 |
The implicit stateful nature of physical I/O channels makes it |
|
1702 |
difficult to relate raw output to the actual command from where it |
|
1703 |
was originating. Parallel execution may add to the confusion. |
|
1704 |
Peeking at physical process I/O is only the last resort to diagnose |
|
57310 | 1705 |
problems with tools that are not PIDE compliant. |
54358 | 1706 |
|
57310 | 1707 |
Under normal circumstances, prover output always works via managed message |
1708 |
channels (corresponding to @{ML writeln}, @{ML warning}, @{ML |
|
57420 | 1709 |
Output.error_message} in Isabelle/ML), which are displayed by regular means |
1710 |
within the document model (\secref{sec:output}). |
|
54358 | 1711 |
|
1712 |
\item \emph{Syslog} shows system messages that might be relevant to |
|
1713 |
diagnose problems with the startup or shutdown phase of the prover |
|
1714 |
process; this also includes raw output on @{verbatim stderr}. |
|
1715 |
||
1716 |
A limited amount of syslog messages are buffered, independently of |
|
1717 |
the docking state of the \emph{Syslog} panel. This allows to |
|
1718 |
diagnose serious problems with Isabelle/PIDE process management, |
|
1719 |
outside of the actual protocol layer. |
|
1720 |
||
1721 |
Under normal situations, such low-level system output can be |
|
1722 |
ignored. |
|
1723 |
||
1724 |
\end{itemize} |
|
58618 | 1725 |
\<close> |
54358 | 1726 |
|
1727 |
||
58618 | 1728 |
chapter \<open>Known problems and workarounds \label{sec:problems}\<close> |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1729 |
|
58618 | 1730 |
text \<open> |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1731 |
\begin{itemize} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1732 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1733 |
\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
|
1734 |
global side-effects, like writing a physical file. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1735 |
|
57335 | 1736 |
\textbf{Workaround:} Copy/paste complete command text from |
57310 | 1737 |
elsewhere, or disable continuous checking temporarily. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1738 |
|
57822 | 1739 |
\item \textbf{Problem:} No direct support to remove document nodes from the |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1740 |
collection of theories. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1741 |
|
57822 | 1742 |
\textbf{Workaround:} Clear the buffer content of unused files and close |
1743 |
\emph{without} saving changes. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1744 |
|
54330 | 1745 |
\item \textbf{Problem:} Keyboard shortcuts @{verbatim "C+PLUS"} and |
1746 |
@{verbatim "C+MINUS"} for adjusting the editor font size depend on |
|
1747 |
platform details and national keyboards. |
|
1748 |
||
57335 | 1749 |
\textbf{Workaround:} Rebind keys via \emph{Global Options~/ |
54372 | 1750 |
Shortcuts}. |
54330 | 1751 |
|
57335 | 1752 |
\item \textbf{Problem:} The Mac OS X key sequence @{verbatim |
1753 |
"COMMAND+COMMA"} for application \emph{Preferences} is in conflict with the |
|
1754 |
jEdit default keyboard shortcut for \emph{Incremental Search Bar} (action |
|
1755 |
@{action_ref "quick-search"}). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1756 |
|
57335 | 1757 |
\textbf{Workaround:} Rebind key via \emph{Global Options~/ |
54372 | 1758 |
Shortcuts} according to national keyboard, e.g.\ @{verbatim |
1759 |
"COMMAND+SLASH"} on English ones. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1760 |
|
54349 | 1761 |
\item \textbf{Problem:} Mac OS X system fonts sometimes lead to |
1762 |
character drop-outs in the main text area. |
|
1763 |
||
1764 |
\textbf{Workaround:} Use the default @{verbatim IsabelleText} font. |
|
1765 |
(Do not install that font on the system.) |
|
1766 |
||
57335 | 1767 |
\item \textbf{Problem:} Some Linux/X11 input methods such as IBus |
54330 | 1768 |
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
|
1769 |
|
57420 | 1770 |
\textbf{Workaround:} Do not use X11 input methods. Note that environment |
1771 |
variable @{verbatim XMODIFIERS} is reset by default within Isabelle |
|
1772 |
settings. |
|
54329 | 1773 |
|
57335 | 1774 |
\item \textbf{Problem:} Some Linux/X11 window managers that are |
54329 | 1775 |
not ``re-parenting'' cause problems with additional windows opened |
54331 | 1776 |
by Java. This affects either historic or neo-minimalistic window |
1777 |
managers like @{verbatim awesome} or @{verbatim xmonad}. |
|
54329 | 1778 |
|
57420 | 1779 |
\textbf{Workaround:} Use a regular re-parenting X11 window manager. |
54329 | 1780 |
|
57335 | 1781 |
\item \textbf{Problem:} Recent forks of Linux/X11 window managers |
54329 | 1782 |
and desktop environments (variants of Gnome) disrupt the handling of |
1783 |
menu popups and mouse positions of Java/AWT/Swing. |
|
1784 |
||
1785 |
\textbf{Workaround:} Use mainstream versions of Linux desktops. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1786 |
|
57334 | 1787 |
\item \textbf{Problem:} Full-screen mode via jEdit action @{action_ref |
57335 | 1788 |
"toggle-full-screen"} (default keyboard shortcut @{verbatim F11}) works on |
1789 |
Windows, but not on Mac OS X or various Linux/X11 window managers. |
|
54349 | 1790 |
|
1791 |
\textbf{Workaround:} Use native full-screen control of the window |
|
54372 | 1792 |
manager (notably on Mac OS X). |
54349 | 1793 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1794 |
\end{itemize} |
58618 | 1795 |
\<close> |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
1796 |
|
53769 | 1797 |
end |