author | wenzelm |
Sat, 12 Oct 2013 19:00:59 +0200 | |
changeset 54330 | 2189d05622c4 |
parent 54329 | e0fa4bd16c80 |
child 54331 | 9e944630be0c |
permissions | -rw-r--r-- |
53981 | 1 |
(*:wrap=hard:maxLineLen=78:*) |
2 |
||
53769 | 3 |
theory JEdit |
4 |
imports Base |
|
5 |
begin |
|
6 |
||
7 |
chapter {* Introduction *} |
|
8 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
9 |
section {* Concepts and terminology *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
10 |
|
54321 | 11 |
text {* Isabelle/jEdit is a Prover IDE that integrates \emph{parallel |
12 |
proof checking} \cite{Wenzel:2009,Wenzel:2013:ITP} with |
|
13 |
\emph{asynchronous user interaction} |
|
14 |
\cite{Wenzel:2010,Wenzel:2012:UITP-EPTCS}, based on a |
|
15 |
document-oriented approach to \emph{continuous proof processing} |
|
16 |
\cite{Wenzel:2011:CICM,Wenzel:2012}. Many concepts and system |
|
17 |
components are fit together in order to make this work. The main |
|
54329 | 18 |
building blocks are as follows. |
53769 | 19 |
|
54321 | 20 |
\begin{description} |
53769 | 21 |
|
54329 | 22 |
\item [PIDE] is a general framework for Prover IDEs based on |
23 |
Isabelle/Scala. It is built around a concept of parallel and |
|
24 |
asynchronous document processing, which is supported natively by the |
|
25 |
parallel proof engine that is implemented in Isabelle/ML. The prover |
|
26 |
discontinues the traditional TTY-based command loop, and supports |
|
27 |
direct editing of formal source text with rich formal markup for GUI |
|
28 |
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 |
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 |
|
54329 | 40 |
allows to transfer algebraic datatypes values and formatted text |
41 |
easily between ML and Scala, using asynchronous protocol commands. |
|
54321 | 42 |
|
54329 | 43 |
\item [jEdit] is a sophisticated text editor implemented in |
44 |
Java.\footnote{\url{http://www.jedit.org}} It is easily extensible |
|
45 |
by plugins written in languages that work on the JVM, e.g.\ |
|
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 |
|
51 |
slightly modified version of the official jEdit code base with a |
|
52 |
special plugin for Isabelle, integrated as standalone application |
|
53 |
for the 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. |
|
61 |
*} |
|
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 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
64 |
section {* The Isabelle/jEdit Prover IDE *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
65 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
66 |
text {* |
53773 | 67 |
\includegraphics[width=\textwidth]{isabelle-jedit} |
68 |
||
54321 | 69 |
Isabelle/jEdit consists of some plugins for the well-known jEdit |
70 |
text editor \url{http://www.jedit.org}, according to the following |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
71 |
principles. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
72 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
73 |
\begin{itemize} |
53769 | 74 |
|
54321 | 75 |
\item The original jEdit look-and-feel is generally preserved, |
76 |
although some default properties have been changed to accommodate |
|
77 |
Isabelle (e.g.\ the text area font). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
78 |
|
54321 | 79 |
\item Formal Isabelle/Isar text is checked asynchronously while |
80 |
editing. The user is in full command of the editor, and the prover |
|
81 |
refrains from locking portions of the buffer. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
82 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
83 |
\item Prover feedback works via colors, boxes, squiggly underline, |
54321 | 84 |
hyperlinks, popup windows, icons, clickable output, all based on |
85 |
semantic markup produced by Isabelle in the background. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
86 |
|
54321 | 87 |
\item Using the mouse together with the modifier key @{verbatim |
88 |
CONTROL} (Linux, Windows) or @{verbatim COMMAND} (Mac OS X) exposes |
|
89 |
additional formal content via tooltips and/or hyperlinks. |
|
53769 | 90 |
|
54321 | 91 |
\item Formal output (in popups etc.) may be explored recursively, |
92 |
using the same techniques as in the editor source buffer. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
93 |
|
54329 | 94 |
\item Additional panels (e.g.\ \emph{Output}, \emph{Symbols}) are |
95 |
organized by the Dockable Window Manager of jEdit, which also allows |
|
96 |
multiple floating instances of each window class. |
|
97 |
||
54321 | 98 |
\item The prover process and source files are managed on the editor |
99 |
side. The prover operates on timeless and stateless document |
|
100 |
content via Isabelle/Scala. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
101 |
|
54321 | 102 |
\item Plugin options of jEdit (for the \emph{Isabelle} plugin) give |
103 |
access to a selection of Isabelle/Scala options and its persistence |
|
104 |
preferences, usually with immediate effect on the prover back-end or |
|
105 |
editor front-end. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
106 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
107 |
\item The logic image of the prover session may be specified within |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
108 |
Isabelle/jEdit, but this requires restart. The new image is provided |
54320 | 109 |
automatically by the Isabelle build tool. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
110 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
111 |
\end{itemize} |
53769 | 112 |
*} |
113 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
114 |
|
54321 | 115 |
subsection {* Documentation *} |
116 |
||
117 |
text {* Regular jEdit documentation is accessible via its @{verbatim |
|
118 |
Help} menu or @{verbatim F1} keyboard shortcut. This includes a full |
|
119 |
\emph{User's Guide} and \emph{Frequently Asked Questions} for this |
|
120 |
sophisticated text editor. |
|
121 |
||
54329 | 122 |
Most of this information about jEdit is relevant for Isabelle/jEdit |
123 |
as well, but one needs to keep in mind that defaults sometimes |
|
124 |
differ, and the official jEdit documentation does not know about the |
|
125 |
Isabelle plugin with its special support for theory editing. |
|
54321 | 126 |
*} |
127 |
||
128 |
||
129 |
subsection {* Plugins *} |
|
130 |
||
131 |
text {* The \emph{Plugin Manager} of jEdit allows to augment editor |
|
132 |
functionality by JVM modules (jars) that are provided by the central |
|
133 |
plugin repository, or one of various mirror sites. The main |
|
54329 | 134 |
\emph{Isabelle} plugin is an integral part of Isabelle/jEdit needs |
135 |
to remain active at all times! A few additional plugins are bundled |
|
54321 | 136 |
with Isabelle/jEdit for convenience or out of necessity, notably |
137 |
\emph{Console} with its Isabelle/Scala sub-plugin and |
|
54329 | 138 |
\emph{SideKick} with some Isabelle-specific parsers for document |
139 |
tree structure. |
|
54321 | 140 |
|
141 |
Connecting to the plugin server infrastructure of the jEdit project |
|
142 |
allows to update bundled plugins or to add further |
|
143 |
functionality. This needs to be done with the usual care for such an |
|
144 |
open bazaar, with contributions of very mixed quality. Arbitrary |
|
145 |
combinations of add-on features are apt to cause problems. |
|
146 |
||
147 |
It is advisable to start with the default configuration of |
|
148 |
Isabelle/jEdit and develop some understanding how it is supposed to |
|
149 |
work, before loading additional plugins at a grand scale. |
|
150 |
*} |
|
151 |
||
152 |
||
153 |
subsection {* Options *} |
|
154 |
||
54329 | 155 |
text {* Both jEdit and Isabelle have distinctive management of |
156 |
persistent options. Regular jEdit options are accessible via the |
|
157 |
dialogs for \emph{Global Options} and \emph{Plugin Options}. This |
|
158 |
results in an environment of properties that is stored within the |
|
54321 | 159 |
\emph{settings directory} of jEdit; see also the menu |
160 |
\emph{Utilities / Settings Directory}. |
|
161 |
||
54329 | 162 |
Isabelle system options are managed by Isabelle/Scala; see also |
163 |
\cite{isabelle-sys}, especially the coverage of sessions and |
|
164 |
command-line tools like @{tool build} or @{tool options}. Isabelle |
|
165 |
options that are declared as \textbf{public} are exposed to the |
|
54330 | 166 |
jEdit \emph{Plugin Options} dialog, section \emph{Isabelle / |
167 |
General}. This provides a view on Isabelle options with persistent |
|
54329 | 168 |
preferences in @{verbatim "$ISABELLE_HOME_USER/etc/preferences"}, |
169 |
independently of the jEdit properties in its settings directory. |
|
54321 | 170 |
|
171 |
Some Isabelle options that are accessible in the Isabelle/jEdit |
|
172 |
Plugin Options dialog affect general parameters that are relevant |
|
173 |
outside Isabelle/jEdit as well, e.g.\ @{system_option threads} or |
|
174 |
@{system_option parallel_proofs} for the Isabelle build tool |
|
175 |
\cite{isabelle-sys}. |
|
54329 | 176 |
|
54330 | 177 |
\medskip Options are loaded on startup and saved on shutdown of |
54329 | 178 |
Isabelle/jEdit. Editing the machine-generated files @{verbatim |
179 |
"$ISABELLE_HOME_USER/jedit/properties"} or @{verbatim |
|
180 |
"$ISABELLE_HOME_USER/etc/preferences"} manually while the |
|
54330 | 181 |
application is running is likely to cause a lost update! *} |
54321 | 182 |
|
183 |
||
184 |
subsection {* Keymaps *} |
|
185 |
||
186 |
text {* Keyboard shortcuts used to be managed as jEdit properties in |
|
187 |
the past, but recent versions (2013) have a separate concept of |
|
54330 | 188 |
\emph{keymap}. The @{verbatim imported} keymap is derived from the |
189 |
initial environment of properties that is available at the first |
|
190 |
start of the editor. |
|
54321 | 191 |
|
192 |
This is relevant for Isabelle/jEdit due to various fine-tuning of |
|
193 |
default properties, and additional keyboard shortcuts for Isabelle |
|
194 |
specific functionality. Users may change their keymap later on, but |
|
54329 | 195 |
may need to copy Isabelle-specific key bindings manually. |
54321 | 196 |
*} |
197 |
||
198 |
||
54322 | 199 |
subsection {* Look-and-feel *} |
54321 | 200 |
|
54330 | 201 |
text {* jEdit is a Java/AWT/Swing application with some ambition to |
54329 | 202 |
support ``native'' look-and-feel on all platforms, within the limits |
54330 | 203 |
of what Oracle as Java provider and major operating system |
204 |
distributors allow (see also \secref{sec:problems}). |
|
54321 | 205 |
|
54329 | 206 |
Isabelle/jEdit enables platform-specific look-and-feel by default as |
54330 | 207 |
follows: |
54321 | 208 |
|
209 |
\begin{description} |
|
210 |
||
211 |
\item[Linux] The platform-independent \emph{Nimbus} is used by |
|
54322 | 212 |
default, but the classic \emph{Metal} also works. \emph{GTK+} works |
213 |
under the side-condition that the overall GTK theme is selected in a |
|
54330 | 214 |
Swing-friendly way. |
54321 | 215 |
|
216 |
\item[Windows] Regular \emph{Windows} is used by default, but |
|
217 |
platform-independent \emph{Nimbus} and \emph{Metal} also work. |
|
218 |
||
54329 | 219 |
\item[Mac OS X] Standard \emph{Apple Aqua} is used by default. |
54321 | 220 |
Moreover the bundled \emph{MacOSX} plugin provides various functions |
221 |
that are expected from applications on that particular platform: |
|
222 |
quit from menu or dock, preferences menu, drag-and-drop of text |
|
223 |
files on the application, full-screen mode for main editor windows |
|
224 |
etc. |
|
225 |
||
226 |
\end{description} |
|
227 |
||
228 |
Users may experiment with different look-and-feels, but need to keep |
|
54329 | 229 |
in mind that this extra variance of GUI functionality is unlikely to |
230 |
work in arbitrary combinations. The \emph{GTK+} look-and-feel is |
|
54321 | 231 |
particularly critical due to its additional dimension of ``themes''. |
232 |
||
233 |
After changing the look-and-feel in \emph{Global Options / |
|
234 |
Appearance}, it is advisable to restart Isabelle/jEdit in order to |
|
235 |
take full effect. |
|
236 |
*} |
|
237 |
||
238 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
239 |
chapter {* Prover IDE functionality *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
240 |
|
54322 | 241 |
section {* Buffers and theories *} |
242 |
||
243 |
text {* jEdit maintains a collection of open \emph{text buffers} to |
|
244 |
store source files. Each buffer may be associated with any number |
|
54330 | 245 |
of visible \emph{text areas}. Buffers are subject to an \emph{edit |
246 |
mode} that is determined from the file type. Files with extension |
|
247 |
\texttt{.thy} are assigned to the mode \emph{isabelle} and treated |
|
248 |
specifically. |
|
54321 | 249 |
|
54329 | 250 |
\medskip Isabelle theory files are automatically added to the formal |
251 |
document model of Isabelle/Scala, which maintains a family of |
|
252 |
versions of all sources for the prover. The \emph{Theories} panel |
|
54322 | 253 |
provides an overview of the status of continuous checking of theory |
54329 | 254 |
sources. Unlike batch sessions \cite{isabelle-sys}, theory nodes |
255 |
are identified by full path names; this allows to work with multiple |
|
256 |
(disjoint) Isabelle sessions simultaneously within the same editor |
|
257 |
session. |
|
54322 | 258 |
|
54329 | 259 |
Certain events to open or update buffers with theory files cause |
260 |
Isabelle/jEdit to resolve dependencies of \emph{theory imports}. |
|
54330 | 261 |
The system requests to load further files into editor buffers, in |
262 |
order to be added to the theory document model for further checking. |
|
263 |
It is also possible to resolve dependencies automatically, depending |
|
264 |
on the option @{system_option jedit_auto_load}. |
|
54321 | 265 |
|
54329 | 266 |
\medskip The open text area views on theory buffers define the |
267 |
visible \emph{perspective} of Isabelle/jEdit. This is taken as a |
|
268 |
hint for document processing: the prover ensures that those parts of |
|
269 |
a theory where the user is looking are checked, while other parts |
|
54330 | 270 |
that are presently not required are ignored. The perspective can be |
271 |
changed by opening or closing text area windows, or scrolling within |
|
272 |
some window. |
|
54322 | 273 |
|
54330 | 274 |
The \emph{Theories} panel provides some further options to influence |
275 |
the process of continuous checking: it may be switched off globally |
|
276 |
to perform superficial processing of command syntax only. It is |
|
277 |
also possible to indicate theory nodes as \emph{required} for |
|
278 |
continuous checking: this means such nodes and all their imports are |
|
279 |
always processed independently of the visibility status (if |
|
280 |
continuous checking is enabled). Big theory libraries that are |
|
281 |
marked as required can have significant impact on performance, |
|
282 |
though. |
|
54322 | 283 |
|
284 |
\medskip Formal markup of checked theory content is turned into GUI |
|
285 |
rendering, based on a standard repertoire known from IDEs for |
|
286 |
programming languages: colors, icons, highlighting, squiggly |
|
54329 | 287 |
underline, tooltips, hyperlinks etc. For outer syntax of |
288 |
Isabelle/Isar there is some traditional syntax-highlighting, based |
|
289 |
on static keyword tables and tokenization within the editor. In |
|
290 |
contrast, the painting of inner syntax (term language etc.) is |
|
291 |
based on semantic information that is reported dynamically from the |
|
292 |
logical context. Thus the prover can provide additional markup to |
|
293 |
help the user understanding the meaning of the text, and to produce |
|
294 |
more text with some add-on tools (e.g.\ information messages by |
|
295 |
automated provers or disprovers running in the background). |
|
54322 | 296 |
|
297 |
Such formally annotated text can be explored further by using the |
|
54329 | 298 |
@{verbatim CONTROL} modifier key on Linux and Windows, or @{verbatim |
54322 | 299 |
COMMAND} on Mac OS X. Hovering with the mouse while the modifier is |
300 |
pressed reveals \emph{tooltips} (grey box within the text with a |
|
301 |
yellow popup) and/or \emph{hyperlinks} (dark grey rectangle within |
|
302 |
the text). Tooltip popups use the same rendering principles as the |
|
303 |
main text area, and further tooltips and/or hyperlinks may be |
|
304 |
exposed recursively by the same mechanism. |
|
54323 | 305 |
|
306 |
%FIXME screenshot of term "x = x" with typing/sorting |
|
54322 | 307 |
*} |
54321 | 308 |
|
309 |
||
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
310 |
section {* Isabelle symbols and fonts *} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
311 |
|
54323 | 312 |
text {* Isabelle sources consist of \emph{symbols} that extend plain |
54330 | 313 |
ASCII to allow infinitely many mathematical symbols within the |
314 |
formal sources. This works without depending on particular |
|
315 |
encodings or varying Unicode standards \cite{Wenzel:2011:CICM}. |
|
54323 | 316 |
|
317 |
For the prover back-end, formal text consists of ASCII characters |
|
318 |
that are grouped according to some simple rules, e.g.\ as plain |
|
319 |
``@{verbatim a}'' or symbolic ``@{verbatim "\<alpha>"}''. |
|
320 |
||
54329 | 321 |
For the editor front-end, a certain subset of symbols is rendered as |
54330 | 322 |
Unicode glyphs, in order to show ``@{verbatim "\<alpha>"}'' as ``@{text |
323 |
"\<alpha>"}'', for example. This symbol interpretation is specified by the |
|
324 |
Isabelle system distribution (@{file "$ISABELLE_HOME/etc/symbols"}) |
|
325 |
or by the user (@{verbatim "$ISABELLE_HOME_USER/etc/symbols"}). |
|
54323 | 326 |
|
54329 | 327 |
The appendix of \cite{isabelle-isar-ref} gives an overview of the |
328 |
standard interpretation of finitely many symbols from the infinite |
|
54330 | 329 |
collection. Uninterpreted symbols are shown literally, e.g.\ |
330 |
``@{verbatim "\<foobar>"}''. |
|
54323 | 331 |
|
332 |
\medskip Technically, the Unicode view on Isabelle symbols is an |
|
333 |
\emph{encoding} in Isabelle/jEdit, which is called @{verbatim |
|
334 |
"UTF-8-Isabelle"} and enabled by default. Sometimes such defaults |
|
335 |
are reset accidentally, or malformed UTF-8 sequences in the text |
|
336 |
force jEdit to fall back on a different encoding like @{verbatim |
|
54330 | 337 |
"ISO-8859-15"}. In that case, verbatim ``@{verbatim "\<alpha>"}'' will be |
338 |
shown in the text buffer instead of its Unicode rendering ``@{text |
|
339 |
"\<alpha>"}''. The jEdit menu operation \emph{File / Reload with Encoding |
|
340 |
/ UTF-8-Isabelle} helps to resolve such problems, potentially after |
|
54323 | 341 |
repairing malformed parts of the text. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
342 |
|
54329 | 343 |
\medskip Correct rendering via Unicode requires a font that contains |
344 |
glyphs for the corresponding codepoints. Most system fonts lack |
|
345 |
that, so Isabelle/jEdit prefers its own application font @{verbatim |
|
54330 | 346 |
IsabelleText}, which ensures that standard collection of Isabelle |
347 |
symbols are actually seen on the screen (or printer). |
|
54329 | 348 |
|
54330 | 349 |
Note that a Java/AWT/Swing application can load additional fonts |
350 |
only if they are not installed as system font already! This means |
|
351 |
some old version of @{verbatim IsabelleText} that happens to be |
|
352 |
already present prevents Isabelle/jEdit from using its current |
|
353 |
bundled version. This might result in missing glyphs (black |
|
354 |
rectangles), since obsolete versions of @{verbatim IsabelleText} |
|
355 |
lack recent improvements of Unicode glyph coverage. This problem |
|
356 |
can be avoided by refraining to ``install'' any version of |
|
357 |
@{verbatim IsabelleText} in the first place. |
|
54329 | 358 |
|
54323 | 359 |
\medskip \paragraph{Input methods.} In principle, Isabelle/jEdit |
360 |
could delegate the problem to produce Isabelle symbols in their |
|
361 |
Unicode rendering to the underlying operating system and its |
|
54329 | 362 |
\emph{input methods}. Regular jEdit also provides various ways to |
363 |
work with \emph{abbreviations} to produce certain non-ASCII |
|
364 |
characters. Since none of these standard input methods work |
|
365 |
satisfactorily for the mathematical characters required for |
|
366 |
Isabelle, various specific Isabelle/jEdit mechanisms are provided. |
|
54323 | 367 |
|
54329 | 368 |
Here is a summary for practically relevant input methods for |
54330 | 369 |
Isabelle symbols: |
54323 | 370 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
371 |
\begin{enumerate} |
54323 | 372 |
|
54330 | 373 |
\item The \emph{Symbols} panel with some GUI buttons to insert |
54323 | 374 |
certain symbols in the text buffer. There are also tooltips to |
375 |
reveal to official Isabelle representation with some additional |
|
376 |
information about \emph{symbol abbreviations} (see below). |
|
377 |
||
378 |
\item Copy / paste from decoded source files: text that is rendered |
|
54330 | 379 |
as Unicode already can be re-used to produce further such text. |
54323 | 380 |
This also works between different applications, e.g.\ Isabelle/jEdit |
54329 | 381 |
and some web browser or mail client, as long as the same Unicode |
382 |
view on Isabelle symbols is used uniformly. |
|
54323 | 383 |
|
54329 | 384 |
\item Copy / paste from prover output within Isabelle/jEdit. The |
385 |
same principles as for text buffers apply, but note that \emph{copy} |
|
386 |
in Isabelle \emph{Output} works via the keyboard shortcut @{verbatim |
|
54330 | 387 |
"C+c"}, not jEdit menu actions. |
54323 | 388 |
|
389 |
\item Completion provided by Isabelle plugin (see |
|
390 |
\secref{sec:completion}). Isabelle symbols have a canonical name |
|
391 |
and optional abbreviations. This can be used with the text |
|
392 |
completion mechanism of Isabelle/jEdit, to replace a prefix of the |
|
54329 | 393 |
actual symbol like @{verbatim "\<lambda>"}, or its backslashed name |
394 |
@{verbatim "\\"}@{verbatim "lambda"}, or its ASCII abbreviation |
|
54330 | 395 |
@{verbatim "%"} by the Unicode rendering. |
54323 | 396 |
|
397 |
The following table is an extract of the information provided by the |
|
54329 | 398 |
standard @{file "$ISABELLE_HOME/etc/symbols"} file: |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
399 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
400 |
\medskip |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
401 |
\begin{tabular}{lll} |
54329 | 402 |
\textbf{symbol} & \textbf{abbreviation} & \textbf{backslashed name} \\\hline |
53771 | 403 |
@{text "\<lambda>"} & @{verbatim "%"} & @{verbatim "\\lambda"} \\ |
404 |
@{text "\<Rightarrow>"} & @{verbatim "=>"} & @{verbatim "\\Rightarrow"} \\ |
|
405 |
@{text "\<Longrightarrow>"} & @{verbatim "==>"} & @{verbatim "\\Longrightarrow"} \\ |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
406 |
|
53771 | 407 |
@{text "\<And>"} & @{verbatim "!!"} & @{verbatim "\\And"} \\ |
408 |
@{text "\<equiv>"} & @{verbatim "=="} & @{verbatim "\\equiv"} \\ |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
409 |
|
53771 | 410 |
@{text "\<forall>"} & @{verbatim "!"} & @{verbatim "\\forall"} \\ |
411 |
@{text "\<exists>"} & @{verbatim "?"} & @{verbatim "\\exists"} \\ |
|
412 |
@{text "\<longrightarrow>"} & @{verbatim "-->"} & @{verbatim "\\longrightarrow"} \\ |
|
413 |
@{text "\<and>"} & @{verbatim "&"} & @{verbatim "\\and"} \\ |
|
414 |
@{text "\<or>"} & @{verbatim "|"} & @{verbatim "\\or"} \\ |
|
415 |
@{text "\<not>"} & @{verbatim "~"} & @{verbatim "\\not"} \\ |
|
416 |
@{text "\<noteq>"} & @{verbatim "~="} & @{verbatim "\\noteq"} \\ |
|
417 |
@{text "\<in>"} & @{verbatim ":"} & @{verbatim "\\in"} \\ |
|
418 |
@{text "\<notin>"} & @{verbatim "~:"} & @{verbatim "\\notin"} \\ |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
419 |
\end{tabular} |
54329 | 420 |
\medskip |
421 |
||
422 |
Note that the above abbreviations refer to the input method. The |
|
423 |
logical notation provides ASCII alternatives that often coincide, |
|
424 |
but deviate occasionally. Writing formal sources directly with |
|
425 |
ASCII replacement notation like @{verbatim "!"} or @{verbatim "ALL"} |
|
54330 | 426 |
is considered old-fashioned in 2013! |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
427 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
428 |
\end{enumerate} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
429 |
|
54329 | 430 |
Raw Unicode characters within prover source files should be |
54323 | 431 |
restricted to informal parts, e.g.\ to write text in non-latin |
432 |
alphabets. Mathematical symbols should be defined via the official |
|
433 |
rendering tables, to avoid problems with portability and longterm |
|
434 |
storage of formal text. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
435 |
|
54323 | 436 |
\paragraph{Control symbols.} There are some special control symbols |
54329 | 437 |
to modify the style of a single symbol (without nesting). Control |
438 |
symbols may be applied to a region of selected text, either using |
|
439 |
the \emph{Symbols} panel or keyboard shortcuts; these editor |
|
440 |
operations produce a separate control symbol for each symbol in the |
|
54330 | 441 |
text, in order to make the whole text appear in a certain style. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
442 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
443 |
\medskip |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
444 |
\begin{tabular}{lll} |
54321 | 445 |
\textbf{symbol} & style & keyboard shortcut \\\hline |
54323 | 446 |
@{verbatim "\<^sup>"} & superscript & @{verbatim "C+e UP"} \\ |
447 |
@{verbatim "\<^sub>"} & subscript & @{verbatim "C+e DOWN"} \\ |
|
448 |
@{verbatim "\<^bold>"} & bold face & @{verbatim "C+e RIGHT"} \\ |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
449 |
& reset & @{verbatim "C+e LEFT"} \\ |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
450 |
\end{tabular} |
54323 | 451 |
|
452 |
It is also possible to complete on @{verbatim "\\"}@{verbatim sup}, |
|
453 |
@{verbatim "\\"}@{verbatim sub}, @{verbatim "\\"}@{verbatim bold} as |
|
454 |
for regular symbols. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
455 |
*} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
456 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
457 |
|
54323 | 458 |
section {* Text completion \label{sec:completion} *} |
53769 | 459 |
|
53981 | 460 |
text {* |
461 |
Text completion works via some light-weight GUI popup, which is triggered by |
|
462 |
keyboard events during the normal editing process in the main jEdit text |
|
463 |
area and a few additional text fields. The popup interprets special keys: |
|
464 |
@{verbatim TAB}, @{verbatim ESCAPE}, @{verbatim UP}, @{verbatim DOWN}, |
|
465 |
@{verbatim PAGE_UP}, @{verbatim PAGE_DOWN}. All other key events are passed |
|
466 |
to the jEdit text area --- this allows to ignore unwanted completions most |
|
467 |
of the time and continue typing quickly. |
|
468 |
||
469 |
Various Isabelle plugin options control the popup behavior and immediate |
|
470 |
insertion into buffer. |
|
471 |
||
54320 | 472 |
Isabelle Symbols are completed in backslashed forms, e.g.\ @{verbatim |
53981 | 473 |
"\\"}@{verbatim "forall"} or @{verbatim "\<forall>"} that both produce the Isabelle |
53982 | 474 |
symbol @{text "\<forall>"} in its Unicode rendering. Alternatively, symbol |
475 |
abbreviations may be used as specified in @{file |
|
476 |
"$ISABELLE_HOME/etc/symbols"}. |
|
53981 | 477 |
|
478 |
\emph{Explicit completion} works via standard jEdit shortcut @{verbatim |
|
479 |
"C+b"}, which is remapped to action @{verbatim "isabelle.complete"}, with a |
|
480 |
fall-back on regular @{verbatim "complete-word"} for non-Isabelle buffers. |
|
481 |
||
482 |
\emph{Implicit completion} works via keyboard input on text area, with popup |
|
483 |
or immediate insertion into buffer. Plain words require at least 3 |
|
484 |
characters to be completed. |
|
485 |
||
486 |
\emph{Immediate completion} means the (unique) replacement text is inserted |
|
487 |
into the buffer without popup. This mode ignores plain words and requires |
|
488 |
more than one characters for symbol abbreviations. Otherwise it falls back |
|
489 |
on completion popup. |
|
490 |
*} |
|
53769 | 491 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
492 |
|
54329 | 493 |
chapter {* Known problems and workarounds \label{sec:problems} *} |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
494 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
495 |
text {* |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
496 |
\begin{itemize} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
497 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
498 |
\item \textbf{Problem:} Lack of dependency management for auxiliary files |
53771 | 499 |
that contribute to a theory (e.g.\ @{command ML_file}). |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
500 |
|
54330 | 501 |
\textbf{Workaround:} Re-load files manually within the prover, by |
502 |
editing corresponding command in the text. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
503 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
504 |
\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
|
505 |
global side-effects, like writing a physical file. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
506 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
507 |
\textbf{Workaround:} Avoid such commands. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
508 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
509 |
\item \textbf{Problem:} No way to delete document nodes from the overall |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
510 |
collection of theories. |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
511 |
|
54329 | 512 |
\textbf{Workaround:} Ignore unused files. Restart whole |
513 |
Isabelle/jEdit session in worst-case situation. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
514 |
|
54330 | 515 |
\item \textbf{Problem:} Keyboard shortcuts @{verbatim "C+PLUS"} and |
516 |
@{verbatim "C+MINUS"} for adjusting the editor font size depend on |
|
517 |
platform details and national keyboards. |
|
518 |
||
519 |
\textbf{Workaround:} Use numeric keypad or rebind keys in the |
|
520 |
jEdit Shortcuts options dialog. |
|
521 |
||
53886
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
522 |
\item \textbf{Problem:} The Mac OS X keyboard shortcut @{verbatim |
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
523 |
"COMMAND+COMMA"} for Preferences is in conflict with the jEdit default |
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
524 |
binding for @{verbatim "quick-search"}. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
525 |
|
53886
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
526 |
\textbf{Workaround:} Remap in jEdit manually according to national |
c83727c7a510
updated documentation concerning MacOSX plugin 1.3;
wenzelm
parents:
53773
diff
changeset
|
527 |
keyboard, e.g.\ @{verbatim "COMMAND+SLASH"} on English ones. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
528 |
|
54329 | 529 |
\item \textbf{Problem:} Some Linux / X11 input methods such as IBus |
54330 | 530 |
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
|
531 |
|
54329 | 532 |
\textbf{Workaround:} Do not use input methods, reset the environment |
533 |
variable @{verbatim XMODIFIERS} within Isabelle settings (default in |
|
534 |
Isabelle2013-1). |
|
535 |
||
536 |
\item \textbf{Problem:} Some Linux / X11 window managers that are |
|
537 |
not ``re-parenting'' cause problems with additional windows opened |
|
538 |
by the Java VM. This affects either historic or neo-minimalistic |
|
539 |
window managers like @{verbatim awesome} or @{verbatim xmonad}. |
|
540 |
||
541 |
\textbf{Workaround:} Use regular re-parenting window manager. |
|
542 |
||
543 |
\item \textbf{Problem:} Recent forks of Linux / X11 window managers |
|
544 |
and desktop environments (variants of Gnome) disrupt the handling of |
|
545 |
menu popups and mouse positions of Java/AWT/Swing. |
|
546 |
||
547 |
\textbf{Workaround:} Use mainstream versions of Linux desktops. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
548 |
|
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
549 |
\end{itemize} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
550 |
*} |
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
551 |
|
53769 | 552 |
end |