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