author | wenzelm |
Fri, 18 Dec 2020 11:44:34 +0100 | |
changeset 73184 | 50c48773b954 |
parent 73171 | fa3fbbfc1f17 |
child 73216 | 51442c6dc296 |
permissions | -rw-r--r-- |
61656 | 1 |
(*:maxLineLen=78:*) |
53981 | 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> |
61574 | 12 |
Isabelle/jEdit is a Prover IDE that integrates \<^emph>\<open>parallel proof checking\<close> |
13 |
@{cite "Wenzel:2009" and "Wenzel:2013:ITP"} with \<^emph>\<open>asynchronous user |
|
14 |
interaction\<close> @{cite "Wenzel:2010" and "Wenzel:2012:UITP-EPTCS" and |
|
15 |
"Wenzel:2014:ITP-PIDE" and "Wenzel:2014:UITP"}, based on a document-oriented |
|
16 |
approach to \<^emph>\<open>continuous proof processing\<close> @{cite "Wenzel:2011:CICM" and |
|
70436 | 17 |
"Wenzel:2012" and "Wenzel:2018:FIDE" and "Wenzel:2019:MKM"}. Many concepts |
18 |
and system components are fit together in order to make this work. The main |
|
19 |
building blocks are as follows. |
|
53769 | 20 |
|
61574 | 21 |
\<^descr>[Isabelle/ML] is the implementation and extension language of Isabelle, |
22 |
see also @{cite "isabelle-implementation"}. It is integrated into the |
|
23 |
logical context of Isabelle/Isar and allows to manipulate logical entities |
|
24 |
directly. Arbitrary add-on tools may be implemented for object-logics such |
|
25 |
as Isabelle/HOL. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
26 |
|
61574 | 27 |
\<^descr>[Isabelle/Scala] is the system programming language of Isabelle. It |
62183 | 28 |
extends the pure logical environment of Isabelle/ML towards the outer |
29 |
world of graphical user interfaces, text editors, IDE frameworks, web |
|
66685 | 30 |
services, SSH servers, SQL databases etc. Special infrastructure allows to |
31 |
transfer algebraic datatypes and formatted text easily between ML and |
|
32 |
Scala, using asynchronous protocol commands. |
|
54321 | 33 |
|
62183 | 34 |
\<^descr>[PIDE] is a general framework for Prover IDEs based on Isabelle/Scala. It |
35 |
is built around a concept of parallel and asynchronous document |
|
36 |
processing, which is supported natively by the parallel proof engine that |
|
37 |
is implemented in Isabelle/ML. The traditional prover command loop is |
|
38 |
given up; instead there is direct support for editing of source text, with |
|
39 |
rich formal markup for GUI rendering. |
|
40 |
||
63680 | 41 |
\<^descr>[jEdit] is a sophisticated text editor\<^footnote>\<open>\<^url>\<open>http://www.jedit.org\<close>\<close> |
70436 | 42 |
implemented in Java\<^footnote>\<open>\<^url>\<open>https://adoptopenjdk.net\<close>\<close>. It is easily |
43 |
extensible by plugins written in any language that works on the JVM. In |
|
44 |
the context of Isabelle this is always |
|
45 |
Scala\<^footnote>\<open>\<^url>\<open>https://www.scala-lang.org\<close>\<close>. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
46 |
|
62183 | 47 |
\<^descr>[Isabelle/jEdit] is the main application of the PIDE framework and the |
48 |
default user-interface for Isabelle. It targets both beginners and |
|
49 |
experts. Technically, Isabelle/jEdit consists of the original jEdit code |
|
50 |
base with minimal patches and a special plugin for Isabelle. This is |
|
51 |
integrated as a desktop application for the main operating system |
|
73131
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72483
diff
changeset
|
52 |
families: Linux, Windows, macOS. |
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
53 |
|
62183 | 54 |
End-users of Isabelle download and run a standalone application that exposes |
55 |
jEdit as a text editor on the surface. Thus there is occasionally a tendency |
|
56 |
to apply the name ``jEdit'' to any of the Isabelle Prover IDE aspects, |
|
57 |
without proper differentiation. When discussing these PIDE building blocks |
|
58 |
in public forums, mailing lists, or even scientific publications, it is |
|
59 |
particularly important to distinguish Isabelle/ML versus Standard ML, |
|
60 |
Isabelle/Scala versus Scala, Isabelle/jEdit versus jEdit. |
|
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> |
62183 | 67 |
\begin{figure}[!htb] |
54331 | 68 |
\begin{center} |
70435 | 69 |
\includegraphics[width=\textwidth]{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 |
|
68068 | 78 |
\<^emph>\<open>Plugins~/ Isabelle\<close> with access to several actions and add-on panels (see |
79 |
also \secref{sec:dockables}), as well as \<^emph>\<open>Plugins~/ Plugin Options~/ |
|
80 |
Isabelle\<close> (see also \secref{sec:options}). |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
81 |
|
62183 | 82 |
The options allow to specify a logic session name, but the same selector is |
83 |
also accessible in the \<^emph>\<open>Theories\<close> panel (\secref{sec:theories}). After |
|
66685 | 84 |
startup of the Isabelle plugin, the selected logic session image is provided |
62183 | 85 |
automatically by the Isabelle build tool @{cite "isabelle-system"}: if it is |
66685 | 86 |
absent or outdated wrt.\ its sources, the build process updates it within |
87 |
the running text editor. Prover IDE functionality is fully activated after |
|
62183 | 88 |
successful termination of the build process. A failure may require changing |
66685 | 89 |
some options and restart of the Isabelle plugin or application. Changing the |
70436 | 90 |
logic session requires a restart of the whole application to take effect. |
53769 | 91 |
|
70436 | 92 |
\<^medskip> The main job of the Prover IDE is to manage sources and their changes, |
61574 | 93 |
taking the logical structure as a formal document into account (see also |
94 |
\secref{sec:document-model}). The editor and the prover are connected |
|
70436 | 95 |
asynchronously without locking. The prover is free to organize the checking |
96 |
of the formal text in parallel on multiple cores, and provides feedback via |
|
97 |
markup, which is rendered in the editor via colors, boxes, squiggly |
|
98 |
underlines, hyperlinks, popup windows, icons, clickable output etc. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
99 |
|
61574 | 100 |
Using the mouse together with the modifier key \<^verbatim>\<open>CONTROL\<close> (Linux, Windows) |
73131
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72483
diff
changeset
|
101 |
or \<^verbatim>\<open>COMMAND\<close> (macOS) exposes formal content via tooltips and/or |
62183 | 102 |
hyperlinks (see also \secref{sec:tooltips-hyperlinks}). Output (in popups |
103 |
etc.) may be explored recursively, using the same techniques as in the |
|
104 |
editor source buffer. |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
105 |
|
57337 | 106 |
Thus the Prover IDE gives an impression of direct access to formal content |
107 |
of the prover within the editor, but in reality only certain aspects are |
|
62183 | 108 |
exposed, according to the possibilities of the prover and its add-on tools. |
58618 | 109 |
\<close> |
53769 | 110 |
|
53770
db362319d766
added/updated material from src/Tools/jEdit/README.html;
wenzelm
parents:
53769
diff
changeset
|
111 |
|
58618 | 112 |
subsection \<open>Documentation\<close> |
54321 | 113 |
|
58618 | 114 |
text \<open> |
62183 | 115 |
The \<^emph>\<open>Documentation\<close> panel of Isabelle/jEdit provides access to some example |
116 |
theory files and the standard Isabelle documentation. PDF files are opened |
|
117 |
by regular desktop operations of the underlying platform. The section |
|
118 |
``Original jEdit Documentation'' contains the original \<^emph>\<open>User's Guide\<close> of |
|
119 |
this sophisticated text editor. The same is accessible via the \<^verbatim>\<open>Help\<close> menu |
|
120 |
or \<^verbatim>\<open>F1\<close> keyboard shortcut, using the built-in HTML viewer of Java/Swing. |
|
121 |
The latter also includes \<^emph>\<open>Frequently Asked Questions\<close> and documentation of |
|
122 |
individual plugins. |
|
54321 | 123 |
|
62183 | 124 |
Most of the information about jEdit is relevant for Isabelle/jEdit as well, |
66685 | 125 |
but users need to keep in mind that defaults sometimes differ, and the |
62183 | 126 |
official jEdit documentation does not know about the Isabelle plugin with |
127 |
its support for continuous checking of formal source text: jEdit is a plain |
|
128 |
text editor, but Isabelle/jEdit is a Prover IDE. |
|
58618 | 129 |
\<close> |
54321 | 130 |
|
131 |
||
58618 | 132 |
subsection \<open>Plugins\<close> |
54321 | 133 |
|
58618 | 134 |
text \<open> |
61574 | 135 |
The \<^emph>\<open>Plugin Manager\<close> of jEdit allows to augment editor functionality by JVM |
136 |
modules (jars) that are provided by the central plugin repository, which is |
|
137 |
accessible via various mirror sites. |
|
54321 | 138 |
|
57420 | 139 |
Connecting to the plugin server-infrastructure of the jEdit project allows |
140 |
to update bundled plugins or to add further functionality. This needs to be |
|
141 |
done with the usual care for such an open bazaar of contributions. Arbitrary |
|
142 |
combinations of add-on features are apt to cause problems. It is advisable |
|
70436 | 143 |
to start with the default configuration of Isabelle/jEdit and develop a |
64513 | 144 |
sense how it is meant to work, before loading too many other plugins. |
54321 | 145 |
|
61415 | 146 |
\<^medskip> |
66685 | 147 |
The \<^emph>\<open>Isabelle\<close> plugin is responsible for the main Prover IDE functionality |
148 |
of Isabelle/jEdit: it manages the prover session in the background. A few |
|
66463 | 149 |
additional plugins are bundled with Isabelle/jEdit for convenience or out of |
66685 | 150 |
necessity, notably \<^emph>\<open>Console\<close> with its \<^emph>\<open>Scala\<close> sub-plugin |
66463 | 151 |
(\secref{sec:scala-console}) and \<^emph>\<open>SideKick\<close> with some Isabelle-specific |
152 |
parsers for document tree structure (\secref{sec:sidekick}). The |
|
153 |
\<^emph>\<open>Navigator\<close> plugin is particularly important for hyperlinks within the |
|
154 |
formal document-model (\secref{sec:tooltips-hyperlinks}). Further plugins |
|
155 |
(e.g.\ \<^emph>\<open>ErrorList\<close>, \<^emph>\<open>Code2HTML\<close>) are included to saturate the dependencies |
|
66685 | 156 |
of bundled plugins, but have no particular use in Isabelle/jEdit. |
157 |
\<close> |
|
54321 | 158 |
|
159 |
||
58618 | 160 |
subsection \<open>Options \label{sec:options}\<close> |
54321 | 161 |
|
61574 | 162 |
text \<open> |
163 |
Both jEdit and Isabelle have distinctive management of persistent options. |
|
54321 | 164 |
|
61574 | 165 |
Regular jEdit options are accessible via the dialogs \<^emph>\<open>Utilities~/ Global |
166 |
Options\<close> or \<^emph>\<open>Plugins~/ Plugin Options\<close>, with a second chance to flip the |
|
70295 | 167 |
two within the central options dialog. Changes are stored in |
168 |
\<^path>\<open>$JEDIT_SETTINGS/properties\<close> and \<^path>\<open>$JEDIT_SETTINGS/keymaps\<close>. |
|
57310 | 169 |
|
170 |
Isabelle system options are managed by Isabelle/Scala and changes are stored |
|
69609 | 171 |
in \<^path>\<open>$ISABELLE_HOME_USER/etc/preferences\<close>, independently of |
60270 | 172 |
other jEdit properties. See also @{cite "isabelle-system"}, especially the |
57310 | 173 |
coverage of sessions and command-line tools like @{tool build} or @{tool |
54372 | 174 |
options}. |
54321 | 175 |
|
62183 | 176 |
Those Isabelle options that are declared as \<^verbatim>\<open>public\<close> are configurable in |
61574 | 177 |
Isabelle/jEdit via \<^emph>\<open>Plugin Options~/ Isabelle~/ General\<close>. Moreover, there |
66685 | 178 |
are various options for rendering document content, which are configurable |
179 |
via \<^emph>\<open>Plugin Options~/ Isabelle~/ Rendering\<close>. Thus \<^emph>\<open>Plugin Options~/ |
|
180 |
Isabelle\<close> in jEdit provides a view on a subset of Isabelle system options. |
|
181 |
Note that some of these options affect general parameters that are relevant |
|
182 |
outside Isabelle/jEdit as well, e.g.\ @{system_option threads} or |
|
61574 | 183 |
@{system_option parallel_proofs} for the Isabelle build tool @{cite |
184 |
"isabelle-system"}, but it is possible to use the settings variable |
|
185 |
@{setting ISABELLE_BUILD_OPTIONS} to change defaults for batch builds |
|
62183 | 186 |
without affecting the Prover IDE. |
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 |
|
61415 | 191 |
\<^medskip> |
192 |
Options are usually loaded on startup and saved on shutdown of |
|
69609 | 193 |
Isabelle/jEdit. Editing the generated \<^path>\<open>$JEDIT_SETTINGS/properties\<close> |
194 |
or \<^path>\<open>$ISABELLE_HOME_USER/etc/preferences\<close> manually while the |
|
70436 | 195 |
application is running may cause lost updates! |
61574 | 196 |
\<close> |
54321 | 197 |
|
198 |
||
58618 | 199 |
subsection \<open>Keymaps\<close> |
54321 | 200 |
|
61574 | 201 |
text \<open> |
62183 | 202 |
Keyboard shortcuts are managed as a separate concept of \<^emph>\<open>keymap\<close> that is |
61574 | 203 |
configurable via \<^emph>\<open>Global Options~/ Shortcuts\<close>. The \<^verbatim>\<open>imported\<close> keymap is |
204 |
derived from the initial environment of properties that is available at the |
|
62183 | 205 |
first start of the editor; afterwards the keymap file takes precedence and |
206 |
is no longer affected by change of default properties. |
|
54321 | 207 |
|
70436 | 208 |
Users may modify their keymap later, but this can lead to conflicts with |
66685 | 209 |
\<^verbatim>\<open>shortcut\<close> properties in \<^file>\<open>$JEDIT_HOME/src/jEdit.props\<close>. |
64513 | 210 |
|
211 |
The action @{action_def "isabelle.keymap-merge"} helps to resolve pending |
|
70436 | 212 |
Isabelle keymap changes wrt. the current jEdit keymap; non-conflicting |
213 |
changes are applied implicitly. This action is automatically invoked on |
|
214 |
Isabelle/jEdit startup. |
|
58618 | 215 |
\<close> |
54321 | 216 |
|
217 |
||
58618 | 218 |
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
|
219 |
|
58618 | 220 |
text \<open> |
62183 | 221 |
Isabelle/jEdit is normally invoked as a single-instance desktop application, |
73131
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72483
diff
changeset
|
222 |
based on platform-specific executables for Linux, Windows, macOS. |
62014 | 223 |
|
62183 | 224 |
It is also possible to invoke the Prover IDE on the command-line, with some |
225 |
extra options and environment settings. The command-line usage of @{tool_def |
|
226 |
jedit} is as follows: |
|
61408
9020a3ba6c9a
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61199
diff
changeset
|
227 |
@{verbatim [display] |
9020a3ba6c9a
@{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents:
61199
diff
changeset
|
228 |
\<open>Usage: isabelle jedit [OPTIONS] [FILES ...] |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
229 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
230 |
Options are: |
70873
8c7706b053c7
find theory files via session structure: much faster Prover IDE startup;
wenzelm
parents:
70483
diff
changeset
|
231 |
-A NAME ancestor session for option -R (default: parent) |
62039 | 232 |
-D NAME=X set JVM system property |
61132 | 233 |
-J OPTION add JVM runtime option |
66685 | 234 |
(default $JEDIT_JAVA_SYSTEM_OPTIONS $JEDIT_JAVA_OPTIONS) |
68371 | 235 |
-R NAME build image with requirements from other sessions |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
236 |
-b build only |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
237 |
-d DIR include session directory |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
238 |
-f fresh build |
68541 | 239 |
-i NAME include session in name-space of theories |
61132 | 240 |
-j OPTION add jEdit runtime option |
66685 | 241 |
(default $JEDIT_OPTIONS) |
61132 | 242 |
-l NAME logic image name |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
243 |
-m MODE add print mode for output |
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
244 |
-n no build of session image on startup |
63987
ac96fe9224f6
just one option is enough -- "isabelle jedit" java process may be prefixed directly in the shell;
wenzelm
parents:
63871
diff
changeset
|
245 |
-p CMD ML process command prefix (process policy) |
70035
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
246 |
-s system build mode for session image (system_heaps=true) |
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
247 |
-u user build mode for session image (system_heaps=false) |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
248 |
|
61512
933463440449
more uniform command-line for "isabelle jedit" and the isabelle.Main app wrapper;
wenzelm
parents:
61506
diff
changeset
|
249 |
Start jEdit with Isabelle plugin setup and open FILES |
933463440449
more uniform command-line for "isabelle jedit" and the isabelle.Main app wrapper;
wenzelm
parents:
61506
diff
changeset
|
250 |
(default "$USER_HOME/Scratch.thy" or ":" for empty buffer).\<close>} |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
251 |
|
61574 | 252 |
The \<^verbatim>\<open>-l\<close> option specifies the session name of the logic image to be used |
253 |
for proof processing. Additional session root directories may be included |
|
66685 | 254 |
via option \<^verbatim>\<open>-d\<close> to augment the session name space (see also @{cite |
68472 | 255 |
"isabelle-system"}). By default, the specified image is checked and built on |
70035
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
256 |
demand, but option \<^verbatim>\<open>-n\<close> bypasses the implicit build process for the |
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
257 |
selected session image. Options \<^verbatim>\<open>-s\<close> and \<^verbatim>\<open>-u\<close> override the default system |
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
258 |
option @{system_option system_heaps}: this determines where to store the |
cc0b3e177b49
system option "system_heaps" supersedes various command-line options for "system build mode";
wenzelm
parents:
69609
diff
changeset
|
259 |
session image of @{tool build}. |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
260 |
|
68472 | 261 |
The \<^verbatim>\<open>-R\<close> option builds an auxiliary logic image with all theories from |
262 |
other sessions that are not already present in its parent; it also opens the |
|
263 |
session \<^verbatim>\<open>ROOT\<close> entry in the editor to facilitate editing of the main |
|
70873
8c7706b053c7
find theory files via session structure: much faster Prover IDE startup;
wenzelm
parents:
70483
diff
changeset
|
264 |
session. The \<^verbatim>\<open>-A\<close> option specifies and alternative ancestor session for |
8c7706b053c7
find theory files via session structure: much faster Prover IDE startup;
wenzelm
parents:
70483
diff
changeset
|
265 |
option \<^verbatim>\<open>-R\<close>: this allows to restructure the hierarchy of session images on |
8c7706b053c7
find theory files via session structure: much faster Prover IDE startup;
wenzelm
parents:
70483
diff
changeset
|
266 |
the spot. |
66987
352b23c97ac8
support focus_session, for much faster startup of Isabelle/jEdit;
wenzelm
parents:
66977
diff
changeset
|
267 |
|
68541 | 268 |
The \<^verbatim>\<open>-i\<close> option includes additional sessions into the name-space of |
269 |
theories: multiple occurrences are possible. |
|
270 |
||
61574 | 271 |
The \<^verbatim>\<open>-m\<close> option specifies additional print modes for the prover process. |
272 |
Note that the system option @{system_option_ref jedit_print_mode} allows to |
|
273 |
do the same persistently (e.g.\ via the \<^emph>\<open>Plugin Options\<close> dialog of |
|
274 |
Isabelle/jEdit), without requiring command-line invocation. |
|
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
275 |
|
66685 | 276 |
The \<^verbatim>\<open>-J\<close> and \<^verbatim>\<open>-j\<close> options pass additional low-level options to the JVM or |
277 |
jEdit, respectively. The defaults are provided by the Isabelle settings |
|
278 |
environment @{cite "isabelle-system"}, but note that these only work for the |
|
70436 | 279 |
command-line tool described here, and not the desktop application. |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
280 |
|
62039 | 281 |
The \<^verbatim>\<open>-D\<close> option allows to define JVM system properties; this is passed |
282 |
directly to the underlying \<^verbatim>\<open>java\<close> process. |
|
283 |
||
61574 | 284 |
The \<^verbatim>\<open>-b\<close> and \<^verbatim>\<open>-f\<close> options control the self-build mechanism of |
285 |
Isabelle/jEdit. This is only relevant for building from sources, which also |
|
63680 | 286 |
requires an auxiliary \<^verbatim>\<open>jedit_build\<close> component from |
68227 | 287 |
\<^url>\<open>https://isabelle.in.tum.de/components\<close>. The official Isabelle release |
62014 | 288 |
already includes a pre-built version of Isabelle/jEdit. |
289 |
||
62183 | 290 |
\<^bigskip> |
62014 | 291 |
It is also possible to connect to an already running Isabelle/jEdit process |
292 |
via @{tool_def jedit_client}: |
|
293 |
@{verbatim [display] |
|
294 |
\<open>Usage: isabelle jedit_client [OPTIONS] [FILES ...] |
|
295 |
||
296 |
Options are: |
|
297 |
-c only check presence of server |
|
298 |
-n only report server name |
|
299 |
-s NAME server name (default Isabelle) |
|
300 |
||
301 |
Connect to already running Isabelle/jEdit instance and open FILES\<close>} |
|
302 |
||
303 |
The \<^verbatim>\<open>-c\<close> option merely checks the presence of the server, producing a |
|
70440 | 304 |
process return-code. |
62014 | 305 |
|
306 |
The \<^verbatim>\<open>-n\<close> option reports the server name, and the \<^verbatim>\<open>-s\<close> option provides a |
|
307 |
different server name. The default server name is the official distribution |
|
71795 | 308 |
name (e.g.\ \<^verbatim>\<open>Isabelle2020\<close>). Thus @{tool jedit_client} can connect to the |
62183 | 309 |
Isabelle desktop application without further options. |
62014 | 310 |
|
63987
ac96fe9224f6
just one option is enough -- "isabelle jedit" java process may be prefixed directly in the shell;
wenzelm
parents:
63871
diff
changeset
|
311 |
The \<^verbatim>\<open>-p\<close> option allows to override the implicit default of the system |
ac96fe9224f6
just one option is enough -- "isabelle jedit" java process may be prefixed directly in the shell;
wenzelm
parents:
63871
diff
changeset
|
312 |
option @{system_option_ref ML_process_policy} for ML processes started by |
ac96fe9224f6
just one option is enough -- "isabelle jedit" java process may be prefixed directly in the shell;
wenzelm
parents:
63871
diff
changeset
|
313 |
the Prover IDE, e.g. to control CPU affinity on multiprocessor systems. |
ac96fe9224f6
just one option is enough -- "isabelle jedit" java process may be prefixed directly in the shell;
wenzelm
parents:
63871
diff
changeset
|
314 |
|
62036 | 315 |
The JVM system property \<^verbatim>\<open>isabelle.jedit_server\<close> provides a different server |
62183 | 316 |
name, e.g.\ use \<^verbatim>\<open>isabelle jedit -Disabelle.jedit_server=\<close>\<open>name\<close> and |
62036 | 317 |
\<^verbatim>\<open>isabelle jedit_client -s\<close>~\<open>name\<close> to connect later on. |
62014 | 318 |
\<close> |
57320
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
319 |
|
00f2c8d1aa0b
more on command-line invocation -- moved material from system manual;
wenzelm
parents:
57319
diff
changeset
|
320 |
|
60291 | 321 |
section \<open>GUI rendering\<close> |
322 |
||
323 |
subsection \<open>Look-and-feel \label{sec:look-and-feel}\<close> |
|
54321 | 324 |
|
60291 | 325 |
text \<open> |
66685 | 326 |
jEdit is a Java/AWT/Swing application with the ambition to support |
70436 | 327 |
``native'' look-and-feel on all platforms, within the limits of what Java |
328 |
provider and major operating systems allow (see also \secref{sec:problems}). |
|
54321 | 329 |
|
54329 | 330 |
Isabelle/jEdit enables platform-specific look-and-feel by default as |
57420 | 331 |
follows. |
54321 | 332 |
|
61574 | 333 |
\<^descr>[Linux:] The platform-independent \<^emph>\<open>Metal\<close> is used by default. |
54321 | 334 |
|
73133 | 335 |
The Linux-specific \<^emph>\<open>GTK+\<close> look-and-feel often works, but the overall GTK |
336 |
theme and options need to be selected to suite Java/AWT/Swing. Note that |
|
337 |
the Java Virtual Machine has no direct influence of GTK rendering: it |
|
338 |
happens within external C libraries. |
|
339 |
||
340 |
\<^descr>[Windows:] Regular \<^emph>\<open>Windows\<close> look-and-feel is used by default. |
|
341 |
||
342 |
\<^descr>[macOS:] Regular \<^emph>\<open>Mac OS X\<close> look-and-feel is used by default. |
|
54321 | 343 |
|
62183 | 344 |
Users may experiment with different Swing look-and-feels, but need to keep |
66685 | 345 |
in mind that this extra variance of GUI functionality often causes problems. |
73133 | 346 |
The platform-independent \<^emph>\<open>Metal\<close> look-and-feel should work smoothly on all |
347 |
platforms, although its is technically and stylistically outdated. |
|
54372 | 348 |
|
66685 | 349 |
Changing the look-and-feel in \<^emph>\<open>Global Options~/ Appearance\<close> may update the |
70436 | 350 |
GUI only partially: a proper restart of Isabelle/jEdit is usually required. |
60291 | 351 |
\<close> |
352 |
||
353 |
||
70436 | 354 |
subsection \<open>Displays with high resolution \label{sec:hdpi}\<close> |
60291 | 355 |
|
356 |
text \<open> |
|
71755 | 357 |
In 2020, we usually see displays with high resolution like ``Ultra HD'' / |
70436 | 358 |
``4K'' at $3840 \times 2160$, or more. Old ``Full HD'' displays at $1920 |
359 |
\times 1080$ pixels are still being used, but Java 11 font-rendering might |
|
71755 | 360 |
look bad on it. GUI layouts are lagging behind the high resolution trends, |
361 |
and implicitly assume very old-fashioned $1024 \times 768$ or $1280 \times |
|
362 |
1024$ screens and fonts with 12 or 14 pixels. Java and jEdit do provide |
|
363 |
reasonable support for high resolution, but this requires manual |
|
364 |
adjustments as described below. |
|
60291 | 365 |
|
70436 | 366 |
\<^medskip> The \<^bold>\<open>operating-system\<close> often provides some configuration for global |
367 |
scaling of text fonts, e.g.\ to enlarge it uniformly by $200\%$. This |
|
368 |
impacts regular GUI elements, when used with native look-and-feel: Linux |
|
369 |
\<^emph>\<open>GTK+\<close>, \<^emph>\<open>Windows\<close>, \<^emph>\<open>Mac OS X\<close>, respectively. Alternatively, it is |
|
370 |
possible to use the platform-independent \<^emph>\<open>Metal\<close> look-and-feel and change |
|
371 |
its main font sizes via jEdit options explained below. The Isabelle/jEdit |
|
372 |
\<^bold>\<open>application\<close> provides further options to adjust font sizes in particular |
|
373 |
GUI elements. Here is a summary of all relevant font properties: |
|
60291 | 374 |
|
61574 | 375 |
\<^item> \<^emph>\<open>Global Options / Text Area / Text font\<close>: the main text area font, |
376 |
which is also used as reference point for various derived font sizes, |
|
62185 | 377 |
e.g.\ the \<^emph>\<open>Output\<close> (\secref{sec:output}) and \<^emph>\<open>State\<close> |
62183 | 378 |
(\secref{sec:state-output}) panels. |
60291 | 379 |
|
61574 | 380 |
\<^item> \<^emph>\<open>Global Options / Gutter / Gutter font\<close>: the font for the gutter area |
381 |
left of the main text area, e.g.\ relevant for display of line numbers |
|
382 |
(disabled by default). |
|
60291 | 383 |
|
61574 | 384 |
\<^item> \<^emph>\<open>Global Options / Appearance / Button, menu and label font\<close> as well as |
385 |
\<^emph>\<open>List and text field font\<close>: this specifies the primary and secondary font |
|
62183 | 386 |
for the \<^emph>\<open>Metal\<close> look-and-feel (\secref{sec:look-and-feel}). |
60291 | 387 |
|
61574 | 388 |
\<^item> \<^emph>\<open>Plugin Options / Isabelle / General / Reset Font Size\<close>: the main text |
389 |
area font size for action @{action_ref "isabelle.reset-font-size"}, e.g.\ |
|
62183 | 390 |
relevant for quick scaling like in common web browsers. |
60291 | 391 |
|
61574 | 392 |
\<^item> \<^emph>\<open>Plugin Options / Console / General / Font\<close>: the console window font, |
393 |
e.g.\ relevant for Isabelle/Scala command-line. |
|
60291 | 394 |
|
61574 | 395 |
In \figref{fig:isabelle-jedit-hdpi} the \<^emph>\<open>Metal\<close> look-and-feel is configured |
70436 | 396 |
with custom fonts at 36 pixels, and the main text area and console at 40 |
397 |
pixels. This leads to fairly good rendering quality, despite the |
|
398 |
old-fashioned appearance of \<^emph>\<open>Metal\<close>. |
|
60291 | 399 |
|
70298 | 400 |
\begin{sidewaysfigure}[!htb] |
60291 | 401 |
\begin{center} |
402 |
\includegraphics[width=\textwidth]{isabelle-jedit-hdpi} |
|
403 |
\end{center} |
|
70436 | 404 |
\caption{Metal look-and-feel with custom fonts for high resolution} |
60291 | 405 |
\label{fig:isabelle-jedit-hdpi} |
70298 | 406 |
\end{sidewaysfigure} |
60291 | 407 |
\<close> |
54321 | 408 |
|
409 |
||
62183 | 410 |
chapter \<open>Augmented jEdit functionality\<close> |
411 |
||
58618 | 412 |
section \<open>Dockable windows \label{sec:dockables}\<close> |
57316 | 413 |
|
58618 | 414 |
text \<open> |
61574 | 415 |
In jEdit terminology, a \<^emph>\<open>view\<close> is an editor window with one or more \<^emph>\<open>text |
416 |
areas\<close> that show the content of one or more \<^emph>\<open>buffers\<close>. A regular view may |
|
417 |
be surrounded by \<^emph>\<open>dockable windows\<close> that show additional information in |
|
418 |
arbitrary format, not just text; a \<^emph>\<open>plain view\<close> does not allow dockables. |
|
419 |
The \<^emph>\<open>dockable window manager\<close> of jEdit organizes these dockable windows, |
|
420 |
either as \<^emph>\<open>floating\<close> windows, or \<^emph>\<open>docked\<close> panels within one of the four |
|
421 |
margins of the view. There may be any number of floating instances of some |
|
422 |
dockable window, but at most one docked instance; jEdit actions that address |
|
423 |
\<^emph>\<open>the\<close> dockable window of a particular kind refer to the unique docked |
|
424 |
instance. |
|
57316 | 425 |
|
426 |
Dockables are used routinely in jEdit for important functionality like |
|
61574 | 427 |
\<^emph>\<open>HyperSearch Results\<close> or the \<^emph>\<open>File System Browser\<close>. Plugins often provide |
62184 | 428 |
a central dockable to access their main functionality, which may be opened |
429 |
by the user on demand. The Isabelle/jEdit plugin takes this approach to the |
|
61574 | 430 |
extreme: its plugin menu provides the entry-points to many panels that are |
431 |
managed as dockable windows. Some important panels are docked by default, |
|
62184 | 432 |
e.g.\ \<^emph>\<open>Documentation\<close>, \<^emph>\<open>State\<close>, \<^emph>\<open>Theories\<close> \<^emph>\<open>Output\<close>, \<^emph>\<open>Query\<close>. The user |
433 |
can change this arrangement easily and persistently. |
|
57316 | 434 |
|
435 |
Compared to plain jEdit, dockable window management in Isabelle/jEdit is |
|
436 |
slightly augmented according to the the following principles: |
|
437 |
||
61477 | 438 |
\<^item> Floating windows are dependent on the main window as \<^emph>\<open>dialog\<close> in |
57316 | 439 |
the sense of Java/AWT/Swing. Dialog windows always stay on top of the view, |
440 |
which is particularly important in full-screen mode. The desktop environment |
|
441 |
of the underlying platform may impose further policies on such dependent |
|
442 |
dialogs, in contrast to fully independent windows, e.g.\ some window |
|
443 |
management functions may be missing. |
|
444 |
||
61415 | 445 |
\<^item> Keyboard focus of the main view vs.\ a dockable window is carefully |
57316 | 446 |
managed according to the intended semantics, as a panel mainly for output or |
62184 | 447 |
input. For example, activating the \<^emph>\<open>Output\<close> (\secref{sec:output}) or State |
448 |
(\secref{sec:state-output}) panel via the dockable window manager returns |
|
449 |
keyboard focus to the main text area, but for \<^emph>\<open>Query\<close> (\secref{sec:query}) |
|
450 |
or \<^emph>\<open>Sledgehammer\<close> \secref{sec:sledgehammer} the focus is given to the main |
|
451 |
input field of that panel. |
|
57316 | 452 |
|
61415 | 453 |
\<^item> Panels that provide their own text area for output have an additional |
61477 | 454 |
dockable menu item \<^emph>\<open>Detach\<close>. This produces an independent copy of the |
455 |
current output as a floating \<^emph>\<open>Info\<close> window, which displays that content |
|
57316 | 456 |
independently of ongoing changes of the PIDE document-model. Note that |
457 |
Isabelle/jEdit popup windows (\secref{sec:tooltips-hyperlinks}) provide a |
|
61477 | 458 |
similar \<^emph>\<open>Detach\<close> operation as an icon. |
58618 | 459 |
\<close> |
57316 | 460 |
|
461 |
||
58618 | 462 |
section \<open>Isabelle symbols \label{sec:symbols}\<close> |
57319 | 463 |
|
58618 | 464 |
text \<open> |
61477 | 465 |
Isabelle sources consist of \<^emph>\<open>symbols\<close> that extend plain ASCII to allow |
57420 | 466 |
infinitely many mathematical symbols within the formal sources. This works |
467 |
without depending on particular encodings and varying Unicode |
|
70436 | 468 |
standards.\<^footnote>\<open>Raw Unicode characters within formal sources compromise |
61574 | 469 |
portability and reliability in the face of changing interpretation of |
470 |
special features of Unicode, such as Combining Characters or Bi-directional |
|
62184 | 471 |
Text.\<close> See @{cite "Wenzel:2011:CICM"}. |
57319 | 472 |
|
57420 | 473 |
For the prover back-end, formal text consists of ASCII characters that are |
61574 | 474 |
grouped according to some simple rules, e.g.\ as plain ``\<^verbatim>\<open>a\<close>'' or symbolic |
475 |
``\<^verbatim>\<open>\<alpha>\<close>''. For the editor front-end, a certain subset of symbols is rendered |
|
70436 | 476 |
physically via Unicode glyphs, to show ``\<^verbatim>\<open>\<alpha>\<close>'' as ``\<open>\<alpha>\<close>'', for example. |
477 |
This symbol interpretation is specified by the Isabelle system distribution |
|
478 |
in \<^file>\<open>$ISABELLE_HOME/etc/symbols\<close> and may be augmented by the user in |
|
479 |
\<^path>\<open>$ISABELLE_HOME_USER/etc/symbols\<close>. |
|
57319 | 480 |
|
58554 | 481 |
The appendix of @{cite "isabelle-isar-ref"} gives an overview of the |
57319 | 482 |
standard interpretation of finitely many symbols from the infinite |
58554 | 483 |
collection. Uninterpreted symbols are displayed literally, e.g.\ |
61503 | 484 |
``\<^verbatim>\<open>\<foobar>\<close>''. Overlap of Unicode characters used in symbol |
58554 | 485 |
interpretation with informal ones (which might appear e.g.\ in comments) |
486 |
needs to be avoided. Raw Unicode characters within prover source files |
|
487 |
should be restricted to informal parts, e.g.\ to write text in non-latin |
|
488 |
alphabets in comments. |
|
61506 | 489 |
\<close> |
57319 | 490 |
|
61506 | 491 |
paragraph \<open>Encoding.\<close> |
67304
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
492 |
|
62184 | 493 |
text \<open>Technically, the Unicode interpretation of Isabelle symbols is an |
494 |
\<^emph>\<open>encoding\<close> called \<^verbatim>\<open>UTF-8-Isabelle\<close> in jEdit (\<^emph>\<open>not\<close> in the underlying |
|
66463 | 495 |
JVM). It is provided by the Isabelle Base plugin and enabled by default for |
67304
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
496 |
all source files in Isabelle/jEdit. |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
497 |
|
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
498 |
Sometimes such defaults are reset accidentally, or malformed UTF-8 sequences |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
499 |
in the text force jEdit to fall back on a different encoding like |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
500 |
\<^verbatim>\<open>ISO-8859-15\<close>. In that case, verbatim ``\<^verbatim>\<open>\<alpha>\<close>'' will be shown in the text |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
501 |
buffer instead of its Unicode rendering ``\<open>\<alpha>\<close>''. The jEdit menu operation |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
502 |
\<^emph>\<open>File~/ Reload with Encoding~/ UTF-8-Isabelle\<close> helps to resolve such |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
503 |
problems (after repairing malformed parts of the text). |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
504 |
|
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
505 |
If the loaded text already contains Unicode sequences that are in conflict |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
506 |
with the Isabelle symbol encoding, the fallback-encoding UTF-8 is used and |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
507 |
Isabelle symbols remain in literal \<^verbatim>\<open>\<symbol>\<close> form. The jEdit menu |
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
508 |
operation \<^emph>\<open>Utilities~/ Buffer Options~/ Character encoding\<close> allows to |
70436 | 509 |
enforce \<^verbatim>\<open>UTF-8-Isabelle\<close>, but this will also change original Unicode text |
510 |
into Isabelle symbols when saving the file! |
|
67304
3cf05d7cf174
more robust treatment of conflicts with existing Unicode text;
wenzelm
parents:
67263
diff
changeset
|
511 |
\<close> |
57319 | 512 |
|
61506 | 513 |
paragraph \<open>Font.\<close> |
514 |
text \<open>Correct rendering via Unicode requires a font that contains glyphs for |
|
62184 | 515 |
the corresponding codepoints. There are also various unusual symbols with |
516 |
particular purpose in Isabelle, e.g.\ control symbols and very long arrows. |
|
70436 | 517 |
Isabelle/jEdit prefers its own font collection \<^verbatim>\<open>Isabelle DejaVu\<close>, with |
518 |
families \<^verbatim>\<open>Serif\<close> (default for help texts), \<^verbatim>\<open>Sans\<close> (default for GUI |
|
519 |
elements), \<^verbatim>\<open>Mono Sans\<close> (default for text area). This ensures that all |
|
520 |
standard Isabelle symbols are shown on the screen (or printer) as expected. |
|
57319 | 521 |
|
57420 | 522 |
Note that a Java/AWT/Swing application can load additional fonts only if |
69353
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
523 |
they are not installed on the operating system already! Outdated versions of |
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
524 |
Isabelle fonts that happen to be provided by the operating system prevent |
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
525 |
Isabelle/jEdit to use its bundled version. This could lead to missing glyphs |
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
526 |
(black rectangles), when the system version of a font is older than the |
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
527 |
application version. This problem can be avoided by refraining to |
70436 | 528 |
``install'' a copy of the Isabelle fonts in the first place, although it |
69353
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
529 |
might be tempting to use the same font in other applications. |
62184 | 530 |
|
69353
395c4fb15ea2
use "Isabelle DejaVu" fonts uniformly: Text Area, GUI elements, HTML output etc.;
wenzelm
parents:
68737
diff
changeset
|
531 |
HTML pages generated by Isabelle refer to the same Isabelle fonts as a |
62184 | 532 |
server-side resource. Thus a web-browser can use that without requiring a |
533 |
locally installed copy. |
|
61506 | 534 |
\<close> |
57319 | 535 |
|
61506 | 536 |
paragraph \<open>Input methods.\<close> |
537 |
text \<open>In principle, Isabelle/jEdit could delegate the problem to produce |
|
538 |
Isabelle symbols in their Unicode rendering to the underlying operating |
|
539 |
system and its \<^emph>\<open>input methods\<close>. Regular jEdit also provides various ways to |
|
540 |
work with \<^emph>\<open>abbreviations\<close> to produce certain non-ASCII characters. Since |
|
541 |
none of these standard input methods work satisfactorily for the |
|
542 |
mathematical characters required for Isabelle, various specific |
|
543 |
Isabelle/jEdit mechanisms are provided. |
|
57319 | 544 |
|
57420 | 545 |
This is a summary for practically relevant input methods for Isabelle |
546 |
symbols. |
|
57319 | 547 |
|
61504 | 548 |
\<^enum> The \<^emph>\<open>Symbols\<close> panel: some GUI buttons allow to insert certain symbols in |
549 |
the text buffer. There are also tooltips to reveal the official Isabelle |
|
550 |
representation with some additional information about \<^emph>\<open>symbol |
|
551 |
abbreviations\<close> (see below). |
|
57319 | 552 |
|
70436 | 553 |
\<^enum> Copy/paste from decoded source files: text that is already rendered as |
554 |
Unicode can be re-used for other text. This also works between different |
|
555 |
applications, e.g.\ Isabelle/jEdit and some web browser or mail client, as |
|
556 |
long as the same Unicode interpretation of Isabelle symbols is used. |
|
57319 | 557 |
|
61504 | 558 |
\<^enum> Copy/paste from prover output within Isabelle/jEdit. The same principles |
559 |
as for text buffers apply, but note that \<^emph>\<open>copy\<close> in secondary Isabelle/jEdit |
|
560 |
windows works via the keyboard shortcuts \<^verbatim>\<open>C+c\<close> or \<^verbatim>\<open>C+INSERT\<close>, while jEdit |
|
561 |
menu actions always refer to the primary text area! |
|
57319 | 562 |
|
62184 | 563 |
\<^enum> Completion provided by the Isabelle plugin (see \secref{sec:completion}). |
61504 | 564 |
Isabelle symbols have a canonical name and optional abbreviations. This can |
565 |
be used with the text completion mechanism of Isabelle/jEdit, to replace a |
|
566 |
prefix of the actual symbol like \<^verbatim>\<open>\<lambda>\<close>, or its name preceded by backslash |
|
567 |
\<^verbatim>\<open>\lambda\<close>, or its ASCII abbreviation \<^verbatim>\<open>%\<close> by the Unicode rendering. |
|
57319 | 568 |
|
569 |
The following table is an extract of the information provided by the |
|
63680 | 570 |
standard \<^file>\<open>$ISABELLE_HOME/etc/symbols\<close> file: |
57319 | 571 |
|
61415 | 572 |
\<^medskip> |
57319 | 573 |
\begin{tabular}{lll} |
61477 | 574 |
\<^bold>\<open>symbol\<close> & \<^bold>\<open>name with backslash\<close> & \<^bold>\<open>abbreviation\<close> \\\hline |
61503 | 575 |
\<open>\<lambda>\<close> & \<^verbatim>\<open>\lambda\<close> & \<^verbatim>\<open>%\<close> \\ |
576 |
\<open>\<Rightarrow>\<close> & \<^verbatim>\<open>\Rightarrow\<close> & \<^verbatim>\<open>=>\<close> \\ |
|
577 |
\<open>\<Longrightarrow>\<close> & \<^verbatim>\<open>\Longrightarrow\<close> & \<^verbatim>\<open>==>\<close> \\[0.5ex] |
|
578 |
\<open>\<And>\<close> & \<^verbatim>\<open>\And\<close> & \<^verbatim>\<open>!!\<close> \\ |
|
579 |
\<open>\<equiv>\<close> & \<^verbatim>\<open>\equiv\<close> & \<^verbatim>\<open>==\<close> \\[0.5ex] |
|
580 |
\<open>\<forall>\<close> & \<^verbatim>\<open>\forall\<close> & \<^verbatim>\<open>!\<close> \\ |
|
581 |
\<open>\<exists>\<close> & \<^verbatim>\<open>\exists\<close> & \<^verbatim>\<open>?\<close> \\ |
|
582 |
\<open>\<longrightarrow>\<close> & \<^verbatim>\<open>\longrightarrow\<close> & \<^verbatim>\<open>-->\<close> \\ |
|
583 |
\<open>\<and>\<close> & \<^verbatim>\<open>\and\<close> & \<^verbatim>\<open>&\<close> \\ |
|
584 |
\<open>\<or>\<close> & \<^verbatim>\<open>\or\<close> & \<^verbatim>\<open>|\<close> \\ |
|
585 |
\<open>\<not>\<close> & \<^verbatim>\<open>\not\<close> & \<^verbatim>\<open>~\<close> \\ |
|
586 |
\<open>\<noteq>\<close> & \<^verbatim>\<open>\noteq\<close> & \<^verbatim>\<open>~=\<close> \\ |
|
587 |
\<open>\<in>\<close> & \<^verbatim>\<open>\in\<close> & \<^verbatim>\<open>:\<close> \\ |
|
588 |
\<open>\<notin>\<close> & \<^verbatim>\<open>\notin\<close> & \<^verbatim>\<open>~:\<close> \\ |
|
57319 | 589 |
\end{tabular} |
61415 | 590 |
\<^medskip> |
61574 | 591 |
|
57420 | 592 |
Note that the above abbreviations refer to the input method. The logical |
593 |
notation provides ASCII alternatives that often coincide, but sometimes |
|
62184 | 594 |
deviate. This occasionally causes user confusion with old-fashioned Isabelle |
595 |
source that use ASCII replacement notation like \<^verbatim>\<open>!\<close> or \<^verbatim>\<open>ALL\<close> directly in |
|
596 |
the text. |
|
57319 | 597 |
|
598 |
On the other hand, coincidence of symbol abbreviations with ASCII |
|
61574 | 599 |
replacement syntax syntax helps to update old theory sources via explicit |
600 |
completion (see also \<^verbatim>\<open>C+b\<close> explained in \secref{sec:completion}). |
|
61506 | 601 |
\<close> |
57319 | 602 |
|
61506 | 603 |
paragraph \<open>Control symbols.\<close> |
604 |
text \<open>There are some special control symbols to modify the display style of a |
|
605 |
single symbol (without nesting). Control symbols may be applied to a region |
|
606 |
of selected text, either using the \<^emph>\<open>Symbols\<close> panel or keyboard shortcuts or |
|
607 |
jEdit actions. These editor operations produce a separate control symbol for |
|
608 |
each symbol in the text, in order to make the whole text appear in a certain |
|
609 |
style. |
|
57319 | 610 |
|
61415 | 611 |
\<^medskip> |
57319 | 612 |
\begin{tabular}{llll} |
61477 | 613 |
\<^bold>\<open>style\<close> & \<^bold>\<open>symbol\<close> & \<^bold>\<open>shortcut\<close> & \<^bold>\<open>action\<close> \\\hline |
61503 | 614 |
superscript & \<^verbatim>\<open>\<^sup>\<close> & \<^verbatim>\<open>C+e UP\<close> & @{action_ref "isabelle.control-sup"} \\ |
615 |
subscript & \<^verbatim>\<open>\<^sub>\<close> & \<^verbatim>\<open>C+e DOWN\<close> & @{action_ref "isabelle.control-sub"} \\ |
|
616 |
bold face & \<^verbatim>\<open>\<^bold>\<close> & \<^verbatim>\<open>C+e RIGHT\<close> & @{action_ref "isabelle.control-bold"} \\ |
|
617 |
emphasized & \<^verbatim>\<open>\<^emph>\<close> & \<^verbatim>\<open>C+e LEFT\<close> & @{action_ref "isabelle.control-emph"} \\ |
|
618 |
reset & & \<^verbatim>\<open>C+e BACK_SPACE\<close> & @{action_ref "isabelle.control-reset"} \\ |
|
57319 | 619 |
\end{tabular} |
61415 | 620 |
\<^medskip> |
61483 | 621 |
|
622 |
To produce a single control symbol, it is also possible to complete on |
|
61504 | 623 |
\<^verbatim>\<open>\sup\<close>, \<^verbatim>\<open>\sub\<close>, \<^verbatim>\<open>\bold\<close>, \<^verbatim>\<open>\emph\<close> as for regular symbols. |
61483 | 624 |
|
62184 | 625 |
The emphasized style only takes effect in document output (when used with a |
626 |
cartouche), but not in the editor. |
|
58618 | 627 |
\<close> |
57319 | 628 |
|
629 |
||
58618 | 630 |
section \<open>Scala console \label{sec:scala-console}\<close> |
57319 | 631 |
|
58618 | 632 |
text \<open> |
61574 | 633 |
The \<^emph>\<open>Console\<close> plugin manages various shells (command interpreters), e.g.\ |
634 |
\<^emph>\<open>BeanShell\<close>, which is the official jEdit scripting language, and the |
|
635 |
cross-platform \<^emph>\<open>System\<close> shell. Thus the console provides similar |
|
636 |
functionality than the Emacs buffers \<^verbatim>\<open>*scratch*\<close> and \<^verbatim>\<open>*shell*\<close>. |
|
57319 | 637 |
|
61574 | 638 |
Isabelle/jEdit extends the repertoire of the console by \<^emph>\<open>Scala\<close>, which is |
639 |
the regular Scala toplevel loop running inside the same JVM process as |
|
57420 | 640 |
Isabelle/jEdit itself. This means the Scala command interpreter has access |
57603 | 641 |
to the JVM name space and state of the running Prover IDE application. The |
61503 | 642 |
default environment imports the full content of packages \<^verbatim>\<open>isabelle\<close> and |
643 |
\<^verbatim>\<open>isabelle.jedit\<close>. |
|
57603 | 644 |
|
61574 | 645 |
For example, \<^verbatim>\<open>PIDE\<close> refers to the Isabelle/jEdit plugin object, and \<^verbatim>\<open>view\<close> |
646 |
to the current editor view of jEdit. The Scala expression |
|
647 |
\<^verbatim>\<open>PIDE.snapshot(view)\<close> makes a PIDE document snapshot of the current buffer |
|
70436 | 648 |
within the current editor view: it allows to retrieve document markup in a |
649 |
timeless~/ stateless manner, while the prover continues its processing. |
|
57319 | 650 |
|
651 |
This helps to explore Isabelle/Scala functionality interactively. Some care |
|
652 |
is required to avoid interference with the internals of the running |
|
62184 | 653 |
application. |
58618 | 654 |
\<close> |
57319 | 655 |
|
656 |
||
70438 | 657 |
section \<open>Physical and logical files \label{sec:files}\<close> |
57318 | 658 |
|
58618 | 659 |
text \<open> |
57420 | 660 |
File specifications in jEdit follow various formats and conventions |
70438 | 661 |
according to \<^emph>\<open>Virtual File Systems\<close>, which may be also provided by plugins. |
662 |
This allows to access remote files via the \<^verbatim>\<open>https:\<close> protocol prefix, for |
|
663 |
example. Isabelle/jEdit attempts to work with the file-system model of jEdit |
|
664 |
as far as possible. In particular, theory sources are passed from the editor |
|
665 |
to the prover, without indirection via the file-system. Thus files don't |
|
666 |
need to be saved: the editor buffer content is used directly. |
|
667 |
\<close> |
|
668 |
||
669 |
||
670 |
subsection \<open>Local files and environment variables \label{sec:local-files}\<close> |
|
671 |
||
672 |
text \<open> |
|
673 |
Local files (without URL notation) are particularly important. The file path |
|
674 |
notation is that of the Java Virtual Machine on the underlying platform. On |
|
675 |
Windows the preferred form uses backslashes, but happens to accept forward |
|
676 |
slashes like Unix/POSIX as well. Further differences arise due to Windows |
|
677 |
drive letters and network shares: thus relative paths (with forward slashes) |
|
678 |
are portable, but absolute paths are not. |
|
679 |
||
680 |
File paths in Java are distinct from Isabelle; the latter uses POSIX |
|
681 |
notation with forward slashes on \<^emph>\<open>all\<close> platforms. Isabelle/ML on Windows |
|
682 |
uses Unix-style path notation, with drive letters according to Cygwin (e.g.\ |
|
683 |
\<^verbatim>\<open>/cygdrive/c\<close>). Environment variables from the Isabelle process may be used |
|
684 |
freely, e.g.\ \<^file>\<open>$ISABELLE_HOME/etc/symbols\<close> or \<^file>\<open>$POLYML_HOME/README\<close>. |
|
685 |
There are special shortcuts: \<^dir>\<open>~\<close> for \<^dir>\<open>$USER_HOME\<close> and \<^dir>\<open>~~\<close> for |
|
686 |
\<^dir>\<open>$ISABELLE_HOME\<close>. |
|
57318 | 687 |
|
70436 | 688 |
\<^medskip> Since jEdit happens to support environment variables within file |
57420 | 689 |
specifications as well, it is natural to use similar notation within the |
690 |
editor, e.g.\ in the file-browser. This does not work in full generality, |
|
691 |
though, due to the bias of jEdit towards platform-specific notation and of |
|
692 |
Isabelle towards POSIX. Moreover, the Isabelle settings environment is not |
|
70436 | 693 |
accessible when starting Isabelle/jEdit via the desktop application wrapper, |
694 |
in contrast to @{tool jedit} run from the command line |
|
60257 | 695 |
(\secref{sec:command-line}). |
57318 | 696 |
|
63751 | 697 |
Isabelle/jEdit imitates important system settings within the Java process |
698 |
environment, in order to allow easy access to these important places from |
|
699 |
the editor: \<^verbatim>\<open>$ISABELLE_HOME\<close>, \<^verbatim>\<open>$ISABELLE_HOME_USER\<close>, \<^verbatim>\<open>$JEDIT_HOME\<close>, |
|
700 |
\<^verbatim>\<open>$JEDIT_SETTINGS\<close>. The file browser of jEdit also includes \<^emph>\<open>Favorites\<close> for |
|
70438 | 701 |
these locations. |
57318 | 702 |
|
70436 | 703 |
\<^medskip> Path specifications in prover input or output usually include formal |
704 |
markup that turns it into a hyperlink (see also |
|
705 |
\secref{sec:tooltips-hyperlinks}). This allows to open the corresponding |
|
706 |
file in the text editor, independently of the path notation. If the path |
|
707 |
refers to a directory, it is opened in the jEdit file browser. |
|
57318 | 708 |
|
709 |
Formally checked paths in prover input are subject to completion |
|
61574 | 710 |
(\secref{sec:completion}): partial specifications are resolved via directory |
711 |
content and possible completions are offered in a popup. |
|
58618 | 712 |
\<close> |
57318 | 713 |
|
714 |
||
70438 | 715 |
subsection \<open>PIDE resources via virtual file-systems\<close> |
716 |
||
717 |
text \<open> |
|
718 |
The jEdit file browser is docked by default, e.g. see |
|
719 |
\figref{fig:isabelle-jedit-hdpi} (left docking area). It provides immediate |
|
720 |
access to the local file-system, as well as important Isabelle resources via |
|
721 |
the \<^emph>\<open>Favorites\<close> menu. Environment variables like \<^verbatim>\<open>$ISABELLE_HOME\<close> are |
|
722 |
discussed in \secref{sec:local-files}. Virtual file-systems are more |
|
723 |
special: the idea is to present structured information like a directory |
|
724 |
tree. The following URLs are offered in the \<^emph>\<open>Favorites\<close> menu, or by |
|
725 |
corresponding jEdit actions. |
|
726 |
||
727 |
\<^item> URL \<^verbatim>\<open>isabelle-export:\<close> or action @{action_def |
|
728 |
"isabelle-export-browser"} shows a toplevel directory with theory names: |
|
729 |
each may provide its own tree structure of session exports. Exports are |
|
730 |
like a logical file-system for the current prover session, maintained as |
|
731 |
Isabelle/Scala data structures and written to the session database |
|
732 |
eventually. The \<^verbatim>\<open>isabelle-export:\<close> URL exposes the current content |
|
733 |
according to a snapshot of the document model. The file browser is \<^emph>\<open>not\<close> |
|
734 |
updated continuously when the PIDE document changes: the reload operation |
|
735 |
needs to be used explicitly. A notable example for exports is the command |
|
736 |
@{command_ref export_code} @{cite "isabelle-isar-ref"}. |
|
737 |
||
738 |
\<^item> URL \<^verbatim>\<open>isabelle-session:\<close> or action @{action_def |
|
739 |
"isabelle-session-browser"} show the structure of session chapters and |
|
740 |
sessions within them. What looks like a file-entry is actually a reference |
|
741 |
to the session definition in its corresponding \<^verbatim>\<open>ROOT\<close> file. The latter is |
|
742 |
subject to Prover IDE markup, so the session theories and other files may |
|
743 |
be browsed quickly by following hyperlinks in the text. |
|
744 |
\<close> |
|
745 |
||
746 |
||
64515 | 747 |
section \<open>Indentation\<close> |
748 |
||
749 |
text \<open> |
|
750 |
Isabelle/jEdit augments the existing indentation facilities of jEdit to take |
|
751 |
the structure of theory and proof texts into account. There is also special |
|
70436 | 752 |
support for unstructured proof scripts (\<^theory_text>\<open>apply\<close> etc.). |
64515 | 753 |
|
754 |
\<^descr>[Syntactic indentation] follows the outer syntax of Isabelle/Isar. |
|
755 |
||
756 |
Action @{action "indent-lines"} (shortcut \<^verbatim>\<open>C+i\<close>) indents the current line |
|
757 |
according to command keywords and some command substructure: this |
|
758 |
approximation may need further manual tuning. |
|
759 |
||
760 |
Action @{action "isabelle.newline"} (shortcut \<^verbatim>\<open>ENTER\<close>) indents the old |
|
70436 | 761 |
and the new line according to command keywords only: leading to precise |
64515 | 762 |
alignment of the main Isar language elements. This depends on option |
763 |
@{system_option_def "jedit_indent_newline"} (enabled by default). |
|
764 |
||
66683 | 765 |
Regular input (via keyboard or completion) indents the current line |
66685 | 766 |
whenever an new keyword is emerging at the start of the line. This depends |
767 |
on option @{system_option_def "jedit_indent_input"} (enabled by default). |
|
66683 | 768 |
|
64515 | 769 |
\<^descr>[Semantic indentation] adds additional white space to unstructured proof |
70436 | 770 |
scripts via the number of subgoals. This requires information of ongoing |
771 |
document processing and may thus lag behind when the user is editing too |
|
772 |
quickly; see also option @{system_option_def "jedit_script_indent"} and |
|
773 |
@{system_option_def "jedit_script_indent_limit"}. |
|
64515 | 774 |
|
775 |
The above options are accessible in the menu \<^emph>\<open>Plugins / Plugin Options / |
|
66683 | 776 |
Isabelle / General\<close>. A prerequisite for advanced indentation is \<^emph>\<open>Utilities |
777 |
/ Buffer Options / Automatic indentation\<close>: it needs to be set to \<^verbatim>\<open>full\<close> |
|
778 |
(default). |
|
64515 | 779 |
\<close> |
780 |
||
781 |
||
62184 | 782 |
section \<open>SideKick parsers \label{sec:sidekick}\<close> |
783 |
||
784 |
text \<open> |
|
785 |
The \<^emph>\<open>SideKick\<close> plugin provides some general services to display buffer |
|
786 |
structure in a tree view. Isabelle/jEdit provides SideKick parsers for its |
|
64513 | 787 |
main mode for theory files, ML files, as well as some minor modes for the |
788 |
\<^verbatim>\<open>NEWS\<close> file (see \figref{fig:sidekick}), session \<^verbatim>\<open>ROOT\<close> files, system |
|
789 |
\<^verbatim>\<open>options\<close>, and Bib{\TeX} files (\secref{sec:bibtex}). |
|
62184 | 790 |
|
791 |
\begin{figure}[!htb] |
|
792 |
\begin{center} |
|
793 |
\includegraphics[scale=0.333]{sidekick} |
|
794 |
\end{center} |
|
795 |
\caption{The Isabelle NEWS file with SideKick tree view} |
|
796 |
\label{fig:sidekick} |
|
797 |
\end{figure} |
|
798 |
||
64513 | 799 |
The default SideKick parser for theory files is \<^verbatim>\<open>isabelle\<close>: it provides a |
800 |
tree-view on the formal document structure, with section headings at the top |
|
801 |
and formal specification elements at the bottom. The alternative parser |
|
802 |
\<^verbatim>\<open>isabelle-context\<close> shows nesting of context blocks according to \<^theory_text>\<open>begin \<dots> |
|
803 |
end\<close> structure. |
|
804 |
||
805 |
\<^medskip> |
|
806 |
Isabelle/ML files are structured according to semi-formal comments that are |
|
807 |
explained in @{cite "isabelle-implementation"}. This outline is turned into |
|
808 |
a tree-view by default, by using the \<^verbatim>\<open>isabelle-ml\<close> parser. There is also a |
|
809 |
folding mode of the same name, for hierarchic text folds within ML files. |
|
810 |
||
811 |
\<^medskip> |
|
62184 | 812 |
The special SideKick parser \<^verbatim>\<open>isabelle-markup\<close> exposes the uninterpreted |
813 |
markup tree of the PIDE document model of the current buffer. This is |
|
814 |
occasionally useful for informative purposes, but the amount of displayed |
|
815 |
information might cause problems for large buffers. |
|
816 |
\<close> |
|
817 |
||
818 |
||
58618 | 819 |
chapter \<open>Prover IDE functionality \label{sec:document-model}\<close> |
57315 | 820 |
|
58618 | 821 |
section \<open>Document model \label{sec:document-model}\<close> |
57322 | 822 |
|
58618 | 823 |
text \<open> |
57322 | 824 |
The document model is central to the PIDE architecture: the editor and the |
825 |
prover have a common notion of structured source text with markup, which is |
|
826 |
produced by formal processing. The editor is responsible for edits of |
|
827 |
document source, as produced by the user. The prover is responsible for |
|
828 |
reports of document markup, as produced by its processing in the background. |
|
829 |
||
830 |
Isabelle/jEdit handles classic editor events of jEdit, in order to connect |
|
831 |
the physical world of the GUI (with its singleton state) to the mathematical |
|
832 |
world of multiple document versions (with timeless and stateless updates). |
|
58618 | 833 |
\<close> |
57322 | 834 |
|
54322 | 835 |
|
58618 | 836 |
subsection \<open>Editor buffers and document nodes \label{sec:buffer-node}\<close> |
57322 | 837 |
|
58618 | 838 |
text \<open> |
61477 | 839 |
As a regular text editor, jEdit maintains a collection of \<^emph>\<open>buffers\<close> to |
57322 | 840 |
store text files; each buffer may be associated with any number of visible |
61574 | 841 |
\<^emph>\<open>text areas\<close>. Buffers are subject to an \<^emph>\<open>edit mode\<close> that is determined |
842 |
from the file name extension. The following modes are treated specifically |
|
843 |
in Isabelle/jEdit: |
|
57322 | 844 |
|
61415 | 845 |
\<^medskip> |
57322 | 846 |
\begin{tabular}{lll} |
62185 | 847 |
\<^bold>\<open>mode\<close> & \<^bold>\<open>file name\<close> & \<^bold>\<open>content\<close> \\\hline |
848 |
\<^verbatim>\<open>isabelle\<close> & \<^verbatim>\<open>*.thy\<close> & theory source \\ |
|
849 |
\<^verbatim>\<open>isabelle-ml\<close> & \<^verbatim>\<open>*.ML\<close> & Isabelle/ML source \\ |
|
850 |
\<^verbatim>\<open>sml\<close> & \<^verbatim>\<open>*.sml\<close> or \<^verbatim>\<open>*.sig\<close> & Standard ML source \\ |
|
851 |
\<^verbatim>\<open>isabelle-root\<close> & \<^verbatim>\<open>ROOT\<close> & session root \\ |
|
852 |
\<^verbatim>\<open>isabelle-options\<close> & & Isabelle options \\ |
|
853 |
\<^verbatim>\<open>isabelle-news\<close> & & Isabelle NEWS \\ |
|
57322 | 854 |
\end{tabular} |
61415 | 855 |
\<^medskip> |
54321 | 856 |
|
57322 | 857 |
All jEdit buffers are automatically added to the PIDE document-model as |
61574 | 858 |
\<^emph>\<open>document nodes\<close>. The overall document structure is defined by the theory |
859 |
nodes in two dimensions: |
|
57322 | 860 |
|
61574 | 861 |
\<^enum> via \<^bold>\<open>theory imports\<close> that are specified in the \<^emph>\<open>theory header\<close> using |
862 |
concrete syntax of the @{command_ref theory} command @{cite |
|
863 |
"isabelle-isar-ref"}; |
|
57322 | 864 |
|
66685 | 865 |
\<^enum> via \<^bold>\<open>auxiliary files\<close> that are included into a theory by \<^emph>\<open>load |
61574 | 866 |
commands\<close>, notably @{command_ref ML_file} and @{command_ref SML_file} |
867 |
@{cite "isabelle-isar-ref"}. |
|
54322 | 868 |
|
57322 | 869 |
In any case, source files are managed by the PIDE infrastructure: the |
870 |
physical file-system only plays a subordinate role. The relevant version of |
|
60257 | 871 |
source text is passed directly from the editor to the prover, using internal |
57322 | 872 |
communication channels. |
58618 | 873 |
\<close> |
57322 | 874 |
|
875 |
||
58618 | 876 |
subsection \<open>Theories \label{sec:theories}\<close> |
57322 | 877 |
|
58618 | 878 |
text \<open> |
61574 | 879 |
The \<^emph>\<open>Theories\<close> panel (see also \figref{fig:theories}) provides an overview |
880 |
of the status of continuous checking of theory nodes within the document |
|
66685 | 881 |
model. |
57322 | 882 |
|
62183 | 883 |
\begin{figure}[!htb] |
57339 | 884 |
\begin{center} |
885 |
\includegraphics[scale=0.333]{theories} |
|
886 |
\end{center} |
|
62185 | 887 |
\caption{Theories panel with an overview of the document-model, and jEdit |
888 |
text areas as editable views on some of the document nodes} |
|
57339 | 889 |
\label{fig:theories} |
890 |
\end{figure} |
|
891 |
||
64842 | 892 |
Theory imports are resolved automatically by the PIDE document model: all |
893 |
required files are loaded and stored internally, without the need to open |
|
894 |
corresponding jEdit buffers. Opening or closing editor buffers later on has |
|
66685 | 895 |
no direct impact on the formal document content: it only affects visibility. |
64842 | 896 |
|
66685 | 897 |
In contrast, auxiliary files (e.g.\ from @{command ML_file} commands) are |
898 |
\<^emph>\<open>not\<close> resolved within the editor by default, but the prover process takes |
|
899 |
care of that. This may be changed by enabling the system option |
|
900 |
@{system_option jedit_auto_resolve}: it ensures that all files are uniformly |
|
901 |
provided by the editor. |
|
54321 | 902 |
|
61415 | 903 |
\<^medskip> |
61574 | 904 |
The visible \<^emph>\<open>perspective\<close> of Isabelle/jEdit is defined by the collective |
905 |
view on theory buffers via open text areas. The perspective is taken as a |
|
906 |
hint for document processing: the prover ensures that those parts of a |
|
907 |
theory where the user is looking are checked, while other parts that are |
|
908 |
presently not required are ignored. The perspective is changed by opening or |
|
909 |
closing text area windows, or scrolling within a window. |
|
54322 | 910 |
|
61574 | 911 |
The \<^emph>\<open>Theories\<close> panel provides some further options to influence the process |
912 |
of continuous checking: it may be switched off globally to restrict the |
|
913 |
prover to superficial processing of command syntax. It is also possible to |
|
914 |
indicate theory nodes as \<^emph>\<open>required\<close> for continuous checking: this means |
|
915 |
such nodes and all their imports are always processed independently of the |
|
916 |
visibility status (if continuous checking is enabled). Big theory libraries |
|
62185 | 917 |
that are marked as required can have significant impact on performance! |
54322 | 918 |
|
66685 | 919 |
The \<^emph>\<open>Purge\<close> button restricts the document model to theories that are |
920 |
required for open editor buffers: inaccessible theories are removed and will |
|
921 |
be rechecked when opened or imported later. |
|
922 |
||
61415 | 923 |
\<^medskip> |
61574 | 924 |
Formal markup of checked theory content is turned into GUI rendering, based |
62185 | 925 |
on a standard repertoire known from mainstream IDEs for programming |
926 |
languages: colors, icons, highlighting, squiggly underlines, tooltips, |
|
927 |
hyperlinks etc. For outer syntax of Isabelle/Isar there is some traditional |
|
928 |
syntax-highlighting via static keywords and tokenization within the editor; |
|
929 |
this buffer syntax is determined from theory imports. In contrast, the |
|
930 |
painting of inner syntax (term language etc.)\ uses semantic information |
|
931 |
that is reported dynamically from the logical context. Thus the prover can |
|
932 |
provide additional markup to help the user to understand the meaning of |
|
933 |
formal text, and to produce more text with some add-on tools (e.g.\ |
|
934 |
information messages with \<^emph>\<open>sendback\<close> markup by automated provers or |
|
935 |
disprovers in the background). \<close> |
|
57322 | 936 |
|
937 |
||
58618 | 938 |
subsection \<open>Auxiliary files \label{sec:aux-files}\<close> |
57322 | 939 |
|
58618 | 940 |
text \<open> |
57329 | 941 |
Special load commands like @{command_ref ML_file} and @{command_ref |
58554 | 942 |
SML_file} @{cite "isabelle-isar-ref"} refer to auxiliary files within some |
57329 | 943 |
theory. Conceptually, the file argument of the command extends the theory |
944 |
source by the content of the file, but its editor buffer may be loaded~/ |
|
945 |
changed~/ saved separately. The PIDE document model propagates changes of |
|
946 |
auxiliary file content to the corresponding load command in the theory, to |
|
947 |
update and process it accordingly: changes of auxiliary file content are |
|
948 |
treated as changes of the corresponding load command. |
|
57323 | 949 |
|
61415 | 950 |
\<^medskip> |
61574 | 951 |
As a concession to the massive amount of ML files in Isabelle/HOL itself, |
952 |
the content of auxiliary files is only added to the PIDE document-model on |
|
953 |
demand, the first time when opened explicitly in the editor. There are |
|
954 |
further tricks to manage markup of ML files, such that Isabelle/HOL may be |
|
955 |
edited conveniently in the Prover IDE on small machines with only 8\,GB of |
|
956 |
main memory. Using \<^verbatim>\<open>Pure\<close> as logic session image, the exploration may start |
|
63680 | 957 |
at the top \<^file>\<open>$ISABELLE_HOME/src/HOL/Main.thy\<close> or the bottom |
66685 | 958 |
\<^file>\<open>$ISABELLE_HOME/src/HOL/HOL.thy\<close>, for example. It is also possible to |
959 |
explore the Isabelle/Pure bootstrap process (a virtual copy) by opening |
|
960 |
\<^file>\<open>$ISABELLE_HOME/src/Pure/ROOT.ML\<close> like a theory in the Prover IDE. |
|
57323 | 961 |
|
962 |
Initially, before an auxiliary file is opened in the editor, the prover |
|
963 |
reads its content from the physical file-system. After the file is opened |
|
964 |
for the first time in the editor, e.g.\ by following the hyperlink |
|
965 |
(\secref{sec:tooltips-hyperlinks}) for the argument of its @{command |
|
966 |
ML_file} command, the content is taken from the jEdit buffer. |
|
967 |
||
968 |
The change of responsibility from prover to editor counts as an update of |
|
969 |
the document content, so subsequent theory sources need to be re-checked. |
|
57420 | 970 |
When the buffer is closed, the responsibility remains to the editor: the |
971 |
file may be opened again without causing another document update. |
|
57323 | 972 |
|
973 |
A file that is opened in the editor, but its theory with the load command is |
|
974 |
not, is presently inactive in the document model. A file that is loaded via |
|
975 |
multiple load commands is associated to an arbitrary one: this situation is |
|
976 |
morally unsupported and might lead to confusion. |
|
977 |
||
61415 | 978 |
\<^medskip> |
61574 | 979 |
Output that refers to an auxiliary file is combined with that of the |
980 |
corresponding load command, and shown whenever the file or the command are |
|
981 |
active (see also \secref{sec:output}). |
|
57323 | 982 |
|
983 |
Warnings, errors, and other useful markup is attached directly to the |
|
62185 | 984 |
positions in the auxiliary file buffer, in the manner of standard IDEs. By |
63680 | 985 |
using the load command @{command SML_file} as explained in |
986 |
\<^file>\<open>$ISABELLE_HOME/src/Tools/SML/Examples.thy\<close>, Isabelle/jEdit may be used as |
|
57323 | 987 |
fully-featured IDE for Standard ML, independently of theory or proof |
61574 | 988 |
development: the required theory merely serves as some kind of project file |
989 |
for a collection of SML source modules. |
|
58618 | 990 |
\<close> |
54322 | 991 |
|
54352 | 992 |
|
58618 | 993 |
section \<open>Output \label{sec:output}\<close> |
54353 | 994 |
|
58618 | 995 |
text \<open> |
61574 | 996 |
Prover output consists of \<^emph>\<open>markup\<close> and \<^emph>\<open>messages\<close>. Both are directly |
997 |
attached to the corresponding positions in the original source text, and |
|
998 |
visualized in the text area, e.g.\ as text colours for free and bound |
|
999 |
variables, or as squiggly underlines for warnings, errors etc.\ (see also |
|
1000 |
\figref{fig:output}). In the latter case, the corresponding messages are |
|
1001 |
shown by hovering with the mouse over the highlighted text --- although in |
|
1002 |
many situations the user should already get some clue by looking at the |
|
62185 | 1003 |
position of the text highlighting, without seeing the message body itself. |
54357 | 1004 |
|
62183 | 1005 |
\begin{figure}[!htb] |
54357 | 1006 |
\begin{center} |
57312 | 1007 |
\includegraphics[scale=0.333]{output} |
54357 | 1008 |
\end{center} |
62185 | 1009 |
\caption{Multiple views on prover output: gutter with icon, text area with |
1010 |
popup, text overview column, \<^emph>\<open>Theories\<close> panel, \<^emph>\<open>Output\<close> panel} |
|
54357 | 1011 |
\label{fig:output} |
1012 |
\end{figure} |
|
54353 | 1013 |
|
62185 | 1014 |
The ``gutter'' on the left-hand-side of the text area uses icons to |
1015 |
provide a summary of the messages within the adjacent text line. Message |
|
61574 | 1016 |
priorities are used to prefer errors over warnings, warnings over |
62185 | 1017 |
information messages; other output is ignored. |
54353 | 1018 |
|
62185 | 1019 |
The ``text overview column'' on the right-hand-side of the text area uses |
1020 |
similar information to paint small rectangles for the overall status of the |
|
1021 |
whole text buffer. The graphics is scaled to fit the logical buffer length |
|
1022 |
into the given window height. Mouse clicks on the overview area move the |
|
1023 |
cursor approximately to the corresponding text line in the buffer. |
|
54353 | 1024 |
|
62185 | 1025 |
The \<^emph>\<open>Theories\<close> panel provides another course-grained overview, but without |
1026 |
direct correspondence to text positions. The coloured rectangles represent |
|
1027 |
the amount of messages of a certain kind (warnings, errors, etc.) and the |
|
66685 | 1028 |
execution status of commands. The border of each rectangle indicates the |
1029 |
overall status of processing: a thick border means it is \<^emph>\<open>finished\<close> or |
|
1030 |
\<^emph>\<open>failed\<close> (with color for errors). A double-click on one of the theory |
|
1031 |
entries with their status overview opens the corresponding text buffer, |
|
1032 |
without moving the cursor to a specific point. |
|
54353 | 1033 |
|
61415 | 1034 |
\<^medskip> |
62185 | 1035 |
The \<^emph>\<open>Output\<close> panel displays prover messages that correspond to a given |
1036 |
command, within a separate window. The cursor position in the presently |
|
1037 |
active text area determines the prover command whose cumulative message |
|
1038 |
output is appended and shown in that window (in canonical order according to |
|
1039 |
the internal execution of the command). There are also control elements to |
|
1040 |
modify the update policy of the output wrt.\ continued editor movements: |
|
1041 |
\<^emph>\<open>Auto update\<close> and \<^emph>\<open>Update\<close>. This is particularly useful for multiple |
|
1042 |
instances of the \<^emph>\<open>Output\<close> panel to look at different situations. |
|
1043 |
Alternatively, the panel can be turned into a passive \<^emph>\<open>Info\<close> window via the |
|
1044 |
\<^emph>\<open>Detach\<close> menu item. |
|
54353 | 1045 |
|
62185 | 1046 |
Proof state is handled separately (\secref{sec:state-output}), but it is |
1047 |
also possible to tick the corresponding checkbox to append it to regular |
|
1048 |
output (\figref{fig:output-including-state}). This is a globally persistent |
|
1049 |
option: it affects all open panels and future editor sessions. |
|
54353 | 1050 |
|
62185 | 1051 |
\begin{figure}[!htb] |
1052 |
\begin{center} |
|
1053 |
\includegraphics[scale=0.333]{output-including-state} |
|
1054 |
\end{center} |
|
1055 |
\caption{Proof state display within the regular output panel} |
|
1056 |
\label{fig:output-including-state} |
|
1057 |
\end{figure} |
|
54353 | 1058 |
|
61415 | 1059 |
\<^medskip> |
62185 | 1060 |
Following the IDE principle, regular messages are attached to the original |
1061 |
source in the proper place and may be inspected on demand via popups. This |
|
1062 |
excludes messages that are somehow internal to the machinery of proof |
|
1063 |
checking, notably \<^emph>\<open>proof state\<close> and \<^emph>\<open>tracing\<close>. |
|
1064 |
||
1065 |
In any case, the same display technology is used for small popups and big |
|
1066 |
output windows. The formal text contains markup that may be explored |
|
1067 |
recursively via further popups and hyperlinks (see |
|
61574 | 1068 |
\secref{sec:tooltips-hyperlinks}), or clicked directly to initiate certain |
1069 |
actions (see \secref{sec:auto-tools} and \secref{sec:sledgehammer}). |
|
71719 | 1070 |
|
1071 |
\<^medskip> |
|
1072 |
Alternatively, the subsequent actions (with keyboard shortcuts) allow to |
|
1073 |
show tooltip messages or navigate error positions: |
|
1074 |
||
1075 |
\<^medskip> |
|
1076 |
\begin{tabular}[t]{l} |
|
1077 |
@{action_ref "isabelle.tooltip"} (\<^verbatim>\<open>CS+b\<close>) \\ |
|
1078 |
@{action_ref "isabelle.message"} (\<^verbatim>\<open>CS+m\<close>) \\ |
|
1079 |
\end{tabular}\quad |
|
1080 |
\begin{tabular}[t]{l} |
|
1081 |
@{action_ref "isabelle.first-error"} (\<^verbatim>\<open>CS+a\<close>) \\ |
|
1082 |
@{action_ref "isabelle.last-error"} (\<^verbatim>\<open>CS+z\<close>) \\ |
|
1083 |
@{action_ref "isabelle.next-error"} (\<^verbatim>\<open>CS+n\<close>) \\ |
|
1084 |
@{action_ref "isabelle.prev-error"} (\<^verbatim>\<open>CS+p\<close>) \\ |
|
1085 |
\end{tabular} |
|
1086 |
\<^medskip> |
|
61574 | 1087 |
\<close> |
54353 | 1088 |
|
1089 |
||
62185 | 1090 |
section \<open>Proof state \label{sec:state-output}\<close> |
62154 | 1091 |
|
1092 |
text \<open> |
|
62185 | 1093 |
The main purpose of the Prover IDE is to help the user editing proof |
1094 |
documents, with ongoing formal checking by the prover in the background. |
|
1095 |
This can be done to some extent in the main text area alone, especially for |
|
1096 |
well-structured Isar proofs. |
|
1097 |
||
1098 |
Nonetheless, internal proof state needs to be inspected in many situations |
|
1099 |
of exploration and ``debugging''. The \<^emph>\<open>State\<close> panel shows exclusively such |
|
1100 |
proof state messages without further distraction, while all other messages |
|
1101 |
are displayed in \<^emph>\<open>Output\<close> (\secref{sec:output}). |
|
1102 |
\Figref{fig:output-and-state} shows a typical GUI layout where both panels |
|
1103 |
are open. |
|
62154 | 1104 |
|
62183 | 1105 |
\begin{figure}[!htb] |
62154 | 1106 |
\begin{center} |
1107 |
\includegraphics[scale=0.333]{output-and-state} |
|
1108 |
\end{center} |
|
1109 |
\caption{Separate proof state display (right) and other output (bottom).} |
|
1110 |
\label{fig:output-and-state} |
|
1111 |
\end{figure} |
|
1112 |
||
62185 | 1113 |
Another typical arrangement has more than one \<^emph>\<open>State\<close> panel open (as |
1114 |
floating windows), with \<^emph>\<open>Auto update\<close> disabled to look at an old situation |
|
1115 |
while the proof text in the vicinity is changed. The \<^emph>\<open>Update\<close> button |
|
1116 |
triggers an explicit one-shot update; this operation is also available via |
|
1117 |
the action @{action "isabelle.update-state"} (keyboard shortcut \<^verbatim>\<open>S+ENTER\<close>). |
|
1118 |
||
1119 |
On small screens, it is occasionally useful to have all messages |
|
1120 |
concatenated in the regular \<^emph>\<open>Output\<close> panel, e.g.\ see |
|
1121 |
\figref{fig:output-including-state}. |
|
1122 |
||
1123 |
\<^medskip> |
|
1124 |
The mechanics of \<^emph>\<open>Output\<close> versus \<^emph>\<open>State\<close> are slightly different: |
|
1125 |
||
1126 |
\<^item> \<^emph>\<open>Output\<close> shows information that is continuously produced and already |
|
1127 |
present when the GUI wants to show it. This is implicitly controlled by |
|
1128 |
the visible perspective on the text. |
|
1129 |
||
1130 |
\<^item> \<^emph>\<open>State\<close> initiates a real-time query on demand, with a full round trip |
|
1131 |
including a fresh print operation on the prover side. This is controlled |
|
1132 |
explicitly when the cursor is moved to the next command (\<^emph>\<open>Auto update\<close>) |
|
1133 |
or the \<^emph>\<open>Update\<close> operation is triggered. |
|
1134 |
||
1135 |
This can make a difference in GUI responsibility and resource usage within |
|
1136 |
the prover process. Applications with very big proof states that are only |
|
1137 |
inspected in isolation work better with the \<^emph>\<open>State\<close> panel. |
|
62154 | 1138 |
\<close> |
1139 |
||
62185 | 1140 |
|
58618 | 1141 |
section \<open>Query \label{sec:query}\<close> |
57311 | 1142 |
|
58618 | 1143 |
text \<open> |
61574 | 1144 |
The \<^emph>\<open>Query\<close> panel provides various GUI forms to request extra information |
62249 | 1145 |
from the prover, as a replacement of old-style diagnostic commands like |
1146 |
@{command find_theorems}. There are input fields and buttons for a |
|
1147 |
particular query command, with output in a dedicated text area. |
|
57311 | 1148 |
|
62249 | 1149 |
The main query modes are presented as separate tabs: \<^emph>\<open>Find Theorems\<close>, |
1150 |
\<^emph>\<open>Find Constants\<close>, \<^emph>\<open>Print Context\<close>, e.g.\ see \figref{fig:query}. As usual |
|
1151 |
in jEdit, multiple \<^emph>\<open>Query\<close> windows may be active at the same time: any |
|
1152 |
number of floating instances, but at most one docked instance (which is used |
|
1153 |
by default). |
|
57313 | 1154 |
|
62183 | 1155 |
\begin{figure}[!htb] |
57313 | 1156 |
\begin{center} |
1157 |
\includegraphics[scale=0.333]{query} |
|
1158 |
\end{center} |
|
62154 | 1159 |
\caption{An instance of the Query panel: find theorems} |
57313 | 1160 |
\label{fig:query} |
1161 |
\end{figure} |
|
57311 | 1162 |
|
61415 | 1163 |
\<^medskip> |
1164 |
The following GUI elements are common to all query modes: |
|
57311 | 1165 |
|
61574 | 1166 |
\<^item> The spinning wheel provides feedback about the status of a pending query |
1167 |
wrt.\ the evaluation of its context and its own operation. |
|
57311 | 1168 |
|
61574 | 1169 |
\<^item> The \<^emph>\<open>Apply\<close> button attaches a fresh query invocation to the current |
1170 |
context of the command where the cursor is pointing in the text. |
|
57311 | 1171 |
|
61574 | 1172 |
\<^item> The \<^emph>\<open>Search\<close> field allows to highlight query output according to some |
1173 |
regular expression, in the notation that is commonly used on the Java |
|
70436 | 1174 |
platform.\<^footnote>\<open>\<^url>\<open>https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html\<close>\<close> |
61574 | 1175 |
This may serve as an additional visual filter of the result. |
57311 | 1176 |
|
61574 | 1177 |
\<^item> The \<^emph>\<open>Zoom\<close> box controls the font size of the output area. |
57311 | 1178 |
|
1179 |
All query operations are asynchronous: there is no need to wait for the |
|
1180 |
evaluation of the document for the query context, nor for the query |
|
61477 | 1181 |
operation itself. Query output may be detached as independent \<^emph>\<open>Info\<close> |
57311 | 1182 |
window, using a menu operation of the dockable window manager. The printed |
1183 |
result usually provides sufficient clues about the original query, with some |
|
1184 |
hyperlink to its context (via markup of its head line). |
|
58618 | 1185 |
\<close> |
57311 | 1186 |
|
1187 |
||
58618 | 1188 |
subsection \<open>Find theorems\<close> |
57311 | 1189 |
|
58618 | 1190 |
text \<open> |
61574 | 1191 |
The \<^emph>\<open>Query\<close> panel in \<^emph>\<open>Find Theorems\<close> mode retrieves facts from the theory |
1192 |
or proof context matching all of given criteria in the \<^emph>\<open>Find\<close> text field. A |
|
68043 | 1193 |
single criterion has the following syntax: |
57311 | 1194 |
|
69609 | 1195 |
\<^rail>\<open> |
62969 | 1196 |
('-'?) ('name' ':' @{syntax name} | 'intro' | 'elim' | 'dest' | |
57313 | 1197 |
'solves' | 'simp' ':' @{syntax term} | @{syntax term}) |
69609 | 1198 |
\<close> |
57313 | 1199 |
|
61574 | 1200 |
See also the Isar command @{command_ref find_theorems} in @{cite |
1201 |
"isabelle-isar-ref"}. |
|
58618 | 1202 |
\<close> |
57311 | 1203 |
|
1204 |
||
58618 | 1205 |
subsection \<open>Find constants\<close> |
57311 | 1206 |
|
58618 | 1207 |
text \<open> |
61574 | 1208 |
The \<^emph>\<open>Query\<close> panel in \<^emph>\<open>Find Constants\<close> mode prints all constants whose type |
1209 |
meets all of the given criteria in the \<^emph>\<open>Find\<close> text field. A single |
|
68043 | 1210 |
criterion has the following syntax: |
57313 | 1211 |
|
69609 | 1212 |
\<^rail>\<open> |
57313 | 1213 |
('-'?) |
62969 | 1214 |
('name' ':' @{syntax name} | 'strict' ':' @{syntax type} | @{syntax type}) |
69609 | 1215 |
\<close> |
57313 | 1216 |
|
58554 | 1217 |
See also the Isar command @{command_ref find_consts} in @{cite |
1218 |
"isabelle-isar-ref"}. |
|
58618 | 1219 |
\<close> |
57311 | 1220 |
|
1221 |
||
58618 | 1222 |
subsection \<open>Print context\<close> |
57311 | 1223 |
|
58618 | 1224 |
text \<open> |
61574 | 1225 |
The \<^emph>\<open>Query\<close> panel in \<^emph>\<open>Print Context\<close> mode prints information from the |
1226 |
theory or proof context, or proof state. See also the Isar commands |
|
57329 | 1227 |
@{command_ref print_context}, @{command_ref print_cases}, @{command_ref |
62249 | 1228 |
print_term_bindings}, @{command_ref print_theorems}, described in @{cite |
1229 |
"isabelle-isar-ref"}. |
|
58618 | 1230 |
\<close> |
57311 | 1231 |
|
1232 |
||
58618 | 1233 |
section \<open>Tooltips and hyperlinks \label{sec:tooltips-hyperlinks}\<close> |
54352 | 1234 |
|
58618 | 1235 |
text \<open> |
62249 | 1236 |
Formally processed text (prover input or output) contains rich markup that |
1237 |
can be explored by using the \<^verbatim>\<open>CONTROL\<close> modifier key on Linux and Windows, |
|
73131
bd2269b6cd99
updated "macOS" terminology: current Big Sur is already version 11;
wenzelm
parents:
72483
diff
changeset
|
1238 |
or \<^verbatim>\<open>COMMAND\<close> on macOS. Hovering with the mouse while the modifier is |
62249 | 1239 |
pressed reveals a \<^emph>\<open>tooltip\<close> (grey box over the text with a yellow popup) |
1240 |
and/or a \<^emph>\<open>hyperlink\<close> (black rectangle over the text with change of mouse |
|
1241 |
pointer); see also \figref{fig:tooltip}. |
|
54331 | 1242 |
|
62183 | 1243 |
\begin{figure}[!htb] |
54331 | 1244 |
\begin{center} |
70435 | 1245 |
\includegraphics[scale=0.333]{popup1} |
54331 | 1246 |
\end{center} |
54356 | 1247 |
\caption{Tooltip and hyperlink for some formal entity} |
54350 | 1248 |
\label{fig:tooltip} |
54331 | 1249 |
\end{figure} |
1250 |
||
62249 | 1251 |
Tooltip popups use the same rendering technology as the main text area, and |
61574 | 1252 |
further tooltips and/or hyperlinks may be exposed recursively by the same |
1253 |
mechanism; see \figref{fig:nested-tooltips}. |
|
54323 | 1254 |
|
62183 | 1255 |
\begin{figure}[!htb] |
54331 | 1256 |
\begin{center} |