src/Doc/System/Misc.thy
author wenzelm
Sat, 07 Nov 2015 12:53:22 +0100
changeset 61597 53e32a9b66b8
parent 61575 f18f6e51e901
child 61656 cfabbc083977
permissions -rw-r--r--
added @{undefined} with somewhat undefined symbol;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
     1
(*:wrap=hard:maxLineLen=78:*)
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
     2
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     3
theory Misc
43564
9864182c6bad document antiquotations are managed as theory data, with proper name space and entity markup;
wenzelm
parents: 41512
diff changeset
     4
imports Base
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     5
begin
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     6
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
     7
chapter \<open>Miscellaneous tools \label{ch:tools}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
     8
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
     9
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    10
  Subsequently we describe various Isabelle related utilities, given in
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    11
  alphabetical order.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    12
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
    13
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
    14
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    15
section \<open>Theory graph browser \label{sec:browse}\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    16
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    17
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    18
  The Isabelle graph browser is a general tool for visualizing dependency
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    19
  graphs. Certain nodes of the graph (i.e.\ theories) can be grouped together
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    20
  in ``directories'', whose contents may be hidden, thus enabling the user to
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    21
  collapse irrelevant portions of information. The browser is written in Java,
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    22
  it can be used both as a stand-alone application and as an applet.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    23
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    24
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    25
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    26
subsection \<open>Invoking the graph browser\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    27
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    28
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    29
  The stand-alone version of the graph browser is wrapped up as @{tool_def
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    30
  browser}:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
    31
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
    32
\<open>Usage: isabelle browser [OPTIONS] [GRAPHFILE]
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    33
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    34
  Options are:
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    35
    -b           Admin/build only
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    36
    -c           cleanup -- remove GRAPHFILE after use
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
    37
    -o FILE      output to FILE (ps, eps, pdf)\<close>}
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
    38
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    39
  When no file name is specified, the browser automatically changes to the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    40
  directory @{setting ISABELLE_BROWSER_INFO}.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    41
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
    42
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    43
  The \<^verbatim>\<open>-b\<close> option indicates that this is for administrative build only, i.e.\
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    44
  no browser popup if no files are given.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    45
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    46
  The \<^verbatim>\<open>-c\<close> option causes the input file to be removed after use.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    47
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    48
  The \<^verbatim>\<open>-o\<close> option indicates batch-mode operation, with the output written to
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    49
  the indicated file; note that \<^verbatim>\<open>pdf\<close> produces an \<^verbatim>\<open>eps\<close> copy as well.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    50
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
    51
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    52
  The applet version of the browser is part of the standard WWW theory
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    53
  presentation, see the link ``theory dependencies'' within each session
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    54
  index.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    55
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    56
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    57
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    58
subsection \<open>Using the graph browser\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    59
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    60
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    61
  The browser's main window, which is shown in \figref{fig:browserwindow},
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    62
  consists of two sub-windows. In the left sub-window, the directory tree is
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    63
  displayed. The graph itself is displayed in the right sub-window.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    64
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    65
  \begin{figure}[ht]
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    66
  \includegraphics[width=\textwidth]{browser_screenshot}
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    67
  \caption{\label{fig:browserwindow} Browser main window}
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    68
  \end{figure}
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    69
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    70
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    71
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    72
subsubsection \<open>The directory tree window\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    73
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    74
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    75
  We describe the usage of the directory browser and the meaning of the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    76
  different items in the browser window.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    77
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    78
  \<^item> A red arrow before a directory name indicates that the directory is
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    79
  currently ``folded'', i.e.~the nodes in this directory are collapsed to one
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    80
  single node. In the right sub-window, the names of nodes corresponding to
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    81
  folded directories are enclosed in square brackets and displayed in red
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    82
  color.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    83
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    84
  \<^item> A green downward arrow before a directory name indicates that the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    85
  directory is currently ``unfolded''. It can be folded by clicking on the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    86
  directory name. Clicking on the name for a second time unfolds the directory
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    87
  again. Alternatively, a directory can also be unfolded by clicking on the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    88
  corresponding node in the right sub-window.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    89
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    90
  \<^item> Blue arrows stand before ordinary node names. When clicking on such a name
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    91
  (i.e.\ that of a theory), the graph display window focuses to the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    92
  corresponding node. Double clicking invokes a text viewer window in which
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
    93
  the contents of the theory file are displayed.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    94
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    95
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    96
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    97
subsubsection \<open>The graph display window\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
    98
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
    99
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   100
  When pointing on an ordinary node, an upward and a downward arrow is shown.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   101
  Initially, both of these arrows are green. Clicking on the upward or
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   102
  downward arrow collapses all predecessor or successor nodes, respectively.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   103
  The arrow's color then changes to red, indicating that the predecessor or
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   104
  successor nodes are currently collapsed. The node corresponding to the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   105
  collapsed nodes has the name ``\<^verbatim>\<open>[....]\<close>''. To uncollapse the nodes again,
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   106
  simply click on the red arrow or on the node with the name ``\<^verbatim>\<open>[....]\<close>''.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   107
  Similar to the directory browser, the contents of theory files can be
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   108
  displayed by double clicking on the corresponding node.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   109
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   110
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   111
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   112
subsubsection \<open>The ``File'' menu\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   113
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   114
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   115
  Due to Java Applet security restrictions this menu is only available in the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   116
  full application version. The meaning of the menu items is as follows:
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   117
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 61407
diff changeset
   118
  \<^descr>[Open \dots] Open a new graph file.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   119
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   120
  \<^descr>[Export to PostScript] Outputs the current graph in Postscript format,
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   121
  appropriately scaled to fit on one single sheet of A4 paper. The resulting
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   122
  file can be printed directly.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   123
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   124
  \<^descr>[Export to EPS] Outputs the current graph in Encapsulated Postscript
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   125
  format. The resulting file can be included in other documents.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   126
61439
2bf52eec4e8a more symbols;
wenzelm
parents: 61407
diff changeset
   127
  \<^descr>[Quit] Quit the graph browser.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   128
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   129
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   130
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   131
subsection \<open>Syntax of graph definition files\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   132
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   133
text \<open>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   134
  A graph definition file has the following syntax:
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   135
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   136
  \begin{center}\small
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   137
  \begin{tabular}{rcl}
61503
28e788ca2c5d more control symbols;
wenzelm
parents: 61493
diff changeset
   138
    \<open>graph\<close> & \<open>=\<close> & \<open>{ vertex\<close>~\<^verbatim>\<open>;\<close>~\<open>}+\<close> \\
28e788ca2c5d more control symbols;
wenzelm
parents: 61493
diff changeset
   139
    \<open>vertex\<close> & \<open>=\<close> & \<open>vertex_name vertex_ID dir_name [\<close>~\<^verbatim>\<open>+\<close>~\<open>] path [\<close>~\<^verbatim>\<open><\<close>~\<open>|\<close>~\<^verbatim>\<open>>\<close>~\<open>] { vertex_ID }*\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   140
  \end{tabular}
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   141
  \end{center}
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   142
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   143
  The meaning of the items in a vertex description is as follows:
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   144
61493
0debd22f0c0e isabelle update_cartouches -t;
wenzelm
parents: 61458
diff changeset
   145
  \<^descr>[\<open>vertex_name\<close>] The name of the vertex.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   146
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   147
  \<^descr>[\<open>vertex_ID\<close>] The vertex identifier. Note that there may be several
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   148
  vertices with equal names, whereas identifiers must be unique.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   149
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   150
  \<^descr>[\<open>dir_name\<close>] The name of the ``directory'' the vertex should be placed in.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   151
  A ``\<^verbatim>\<open>+\<close>'' sign after \<open>dir_name\<close> indicates that the nodes in the directory
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   152
  are initially visible. Directories are initially invisible by default.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   153
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   154
  \<^descr>[\<open>path\<close>] The path of the corresponding theory file. This is specified
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   155
  relatively to the path of the graph definition file.
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   156
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   157
  \<^descr>[List of successor/predecessor nodes] A ``\<^verbatim>\<open><\<close>'' sign before the list means
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   158
  that successor nodes are listed, a ``\<^verbatim>\<open>>\<close>'' sign means that predecessor
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   159
  nodes are listed. If neither ``\<^verbatim>\<open><\<close>'' nor ``\<^verbatim>\<open>>\<close>'' is found, the browser
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   160
  assumes that successor nodes are listed.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   161
\<close>
57330
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   162
d8a64a4cbfca clarified role of old user interfaces as misc tools;
wenzelm
parents: 56439
diff changeset
   163
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   164
section \<open>Resolving Isabelle components \label{sec:tool-components}\<close>
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   165
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   166
text \<open>
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   167
  The @{tool_def components} tool resolves Isabelle components:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   168
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   169
\<open>Usage: isabelle components [OPTIONS] [COMPONENTS ...]
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   170
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   171
  Options are:
50653
5c85f8b80b95 simplified quick start via "isabelle components -I";
wenzelm
parents: 50132
diff changeset
   172
    -I           init user settings
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   173
    -R URL       component repository
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   174
                 (default $ISABELLE_COMPONENT_REPOSITORY)
53435
wenzelm
parents: 52550
diff changeset
   175
    -a           resolve all missing components
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   176
    -l           list status
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   177
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   178
  Resolve Isabelle components via download and installation.
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   179
  COMPONENTS are identified via base name.
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   180
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   181
  ISABELLE_COMPONENT_REPOSITORY="http://isabelle.in.tum.de/components"\<close>}
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   182
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   183
  Components are initialized as described in \secref{sec:components} in a
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   184
  permissive manner, which can mark components as ``missing''. This state is
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   185
  amended by letting @{tool "components"} download and unpack components that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   186
  are published on the default component repository @{url
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   187
  "http://isabelle.in.tum.de/components/"} in particular.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   188
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   189
  Option \<^verbatim>\<open>-R\<close> specifies an alternative component repository. Note that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   190
  \<^verbatim>\<open>file:///\<close> URLs can be used for local directories.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   191
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   192
  Option \<^verbatim>\<open>-a\<close> selects all missing components to be resolved. Explicit
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   193
  components may be named as command line-arguments as well. Note that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   194
  components are uniquely identified by their base name, while the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   195
  installation takes place in the location that was specified in the attempt
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   196
  to initialize the component before.
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   197
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   198
  Option \<^verbatim>\<open>-l\<close> lists the current state of available and missing components
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   199
  with their location (full name) within the file-system.
50653
5c85f8b80b95 simplified quick start via "isabelle components -I";
wenzelm
parents: 50132
diff changeset
   200
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   201
  Option \<^verbatim>\<open>-I\<close> initializes the user settings file to subscribe to the standard
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   202
  components specified in the Isabelle repository clone --- this does not make
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   203
  any sense for regular Isabelle releases. If the file already exists, it
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   204
  needs to be edited manually according to the printed explanation.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   205
\<close>
48844
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   206
6408fb6f7d81 some explanations on isabelle components;
wenzelm
parents: 48815
diff changeset
   207
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   208
section \<open>Raw ML console\<close>
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   209
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   210
text \<open>
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   211
  The @{tool_def console} tool runs the Isabelle process with raw ML console:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   212
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   213
\<open>Usage: isabelle console [OPTIONS]
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   214
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   215
  Options are:
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   216
    -d DIR       include session directory
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   217
    -l NAME      logic session name (default ISABELLE_LOGIC)
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   218
    -m MODE      add print mode for output
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   219
    -n           no build of session image on startup
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   220
    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   221
    -s           system build mode for session image
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   222
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   223
  Run Isabelle process with raw ML console and line editor
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   224
  (default ISABELLE_LINE_EDITOR).\<close>}
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   225
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   226
  The \<^verbatim>\<open>-l\<close> option specifies the logic session name. By default, its heap
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   227
  image is checked and built on demand, but the option \<^verbatim>\<open>-n\<close> skips that.
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   228
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   229
  Options \<^verbatim>\<open>-d\<close>, \<^verbatim>\<open>-o\<close>, \<^verbatim>\<open>-s\<close> are passed directly to @{tool build}
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   230
  (\secref{sec:tool-build}).
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   231
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   232
  Options \<^verbatim>\<open>-m\<close>, \<^verbatim>\<open>-o\<close> are passed directly to the underlying Isabelle process
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   233
  (\secref{sec:isabelle-process}).
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   234
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   235
  The Isabelle process is run through the line editor that is specified via
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   236
  the settings variable @{setting ISABELLE_LINE_EDITOR} (e.g.\
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   237
  @{executable_def rlwrap} for GNU readline); the fall-back is to use plain
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   238
  standard input/output.
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   239
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   240
  Interaction works via the raw ML toplevel loop: this is neither
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   241
  Isabelle/Isar nor Isabelle/ML within the usual formal context. Some useful
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   242
  ML commands at this stage are @{ML cd}, @{ML pwd}, @{ML use}, @{ML use_thy},
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   243
  @{ML use_thys}.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   244
\<close>
57439
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   245
0e41f26a0250 "isabelle tty" is superseded by "isabelle console";
wenzelm
parents: 57414
diff changeset
   246
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   247
section \<open>Displaying documents \label{sec:tool-display}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   248
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   249
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   250
  The @{tool_def display} tool displays documents in DVI or PDF format:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   251
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   252
\<open>Usage: isabelle display DOCUMENT
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   253
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   254
  Display DOCUMENT (in DVI or PDF format).\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   255
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   256
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   257
  The settings @{setting DVI_VIEWER} and @{setting PDF_VIEWER} determine the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   258
  programs for viewing the corresponding file formats. Normally this opens the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   259
  document via the desktop environment, potentially in an asynchronous manner
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   260
  with re-use of previews views.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   261
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   262
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   263
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   264
section \<open>Viewing documentation \label{sec:tool-doc}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   265
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   266
text \<open>
52444
2cfe6656d6d6 slightly improved "isabelle doc" based on Isabelle/Scala;
wenzelm
parents: 52052
diff changeset
   267
  The @{tool_def doc} tool displays Isabelle documentation:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   268
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   269
\<open>Usage: isabelle doc [DOC ...]
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   270
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   271
  View Isabelle documentation.\<close>}
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   272
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   273
  If called without arguments, it lists all available documents. Each line
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   274
  starts with an identifier, followed by a short description. Any of these
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   275
  identifiers may be specified as arguments, in order to display the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   276
  corresponding document (see also \secref{sec:tool-display}).
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   277
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   278
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   279
  The @{setting ISABELLE_DOCS} setting specifies the list of directories
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   280
  (separated by colons) to be scanned for documentations.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   281
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   282
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   283
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   284
section \<open>Shell commands within the settings environment \label{sec:tool-env}\<close>
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   285
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   286
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   287
  The @{tool_def env} tool is a direct wrapper for the standard
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   288
  \<^verbatim>\<open>/usr/bin/env\<close> command on POSIX systems, running within the Isabelle
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   289
  settings environment (\secref{sec:settings}).
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   290
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   291
  The command-line arguments are that of the underlying version of \<^verbatim>\<open>env\<close>. For
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   292
  example, the following invokes an instance of the GNU Bash shell within the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   293
  Isabelle environment:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   294
  @{verbatim [display] \<open>isabelle env bash\<close>}
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   295
\<close>
47828
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   296
e6e1b670520b some coverage of isabelle env;
wenzelm
parents: 47827
diff changeset
   297
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   298
section \<open>Inspecting the settings environment \label{sec:tool-getenv}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   299
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   300
text \<open>The Isabelle settings environment --- as provided by the
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   301
  site-default and user-specific settings files --- can be inspected
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 48577
diff changeset
   302
  with the @{tool_def getenv} tool:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   303
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   304
\<open>Usage: isabelle getenv [OPTIONS] [VARNAMES ...]
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   305
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   306
  Options are:
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   307
    -a           display complete environment
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   308
    -b           print values only (doesn't work for -a)
31497
5333aa739082 isabelle getenv: option -d;
wenzelm
parents: 28916
diff changeset
   309
    -d FILE      dump complete environment to FILE
5333aa739082 isabelle getenv: option -d;
wenzelm
parents: 28916
diff changeset
   310
                 (null terminated entries)
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   311
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   312
  Get value of VARNAMES from the Isabelle settings.\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   313
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   314
  With the \<^verbatim>\<open>-a\<close> option, one may inspect the full process environment that
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   315
  Isabelle related programs are run in. This usually contains much more
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   316
  variables than are actually Isabelle settings. Normally, output is a list of
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   317
  lines of the form \<open>name\<close>\<^verbatim>\<open>=\<close>\<open>value\<close>. The \<^verbatim>\<open>-b\<close> option causes only the values
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   318
  to be printed.
31497
5333aa739082 isabelle getenv: option -d;
wenzelm
parents: 28916
diff changeset
   319
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   320
  Option \<^verbatim>\<open>-d\<close> produces a dump of the complete environment to the specified
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   321
  file. Entries are terminated by the ASCII null character, i.e.\ the C string
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   322
  terminator.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   323
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   324
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   325
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   326
subsubsection \<open>Examples\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   327
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   328
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   329
  Get the location of @{setting ISABELLE_HOME_USER} where user-specific
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   330
  information is stored:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   331
  @{verbatim [display] \<open>isabelle getenv ISABELLE_HOME_USER\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   332
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   333
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   334
  Get the value only of the same settings variable, which is particularly
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   335
  useful in shell scripts:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   336
  @{verbatim [display] \<open>isabelle getenv -b ISABELLE_OUTPUT\<close>}
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   337
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   338
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   339
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   340
section \<open>Installing standalone Isabelle executables \label{sec:tool-install}\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   341
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   342
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   343
  By default, the main Isabelle binaries (@{executable "isabelle"} etc.) are
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   344
  just run from their location within the distribution directory, probably
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   345
  indirectly by the shell through its @{setting PATH}. Other schemes of
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   346
  installation are supported by the @{tool_def install} tool:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   347
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   348
\<open>Usage: isabelle install [OPTIONS] BINDIR
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   349
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   350
  Options are:
50132
180d086c30dd simplified command line of "isabelle install";
wenzelm
parents: 49072
diff changeset
   351
    -d DISTDIR   refer to DISTDIR as Isabelle distribution
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   352
                 (default ISABELLE_HOME)
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   353
50132
180d086c30dd simplified command line of "isabelle install";
wenzelm
parents: 49072
diff changeset
   354
  Install Isabelle executables with absolute references to the
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   355
  distribution directory.\<close>}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   356
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   357
  The \<^verbatim>\<open>-d\<close> option overrides the current Isabelle distribution directory as
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   358
  determined by @{setting ISABELLE_HOME}.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   359
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   360
  The \<open>BINDIR\<close> argument tells where executable wrapper scripts for
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   361
  @{executable "isabelle_process"} and @{executable isabelle} should be
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   362
  placed, which is typically a directory in the shell's @{setting PATH}, such
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   363
  as \<^verbatim>\<open>$HOME/bin\<close>.
48815
wenzelm
parents: 48814
diff changeset
   364
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   365
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   366
  It is also possible to make symbolic links of the main Isabelle executables
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   367
  manually, but making separate copies outside the Isabelle distribution
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   368
  directory will not work!
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   369
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   370
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   371
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   372
section \<open>Creating instances of the Isabelle logo\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   373
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   374
text \<open>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   375
  The @{tool_def logo} tool creates instances of the generic Isabelle logo as
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   376
  EPS and PDF, for inclusion in {\LaTeX} documents.
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   377
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   378
\<open>Usage: isabelle logo [OPTIONS] XYZ
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   379
49072
747835eb2782 "isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents: 48985
diff changeset
   380
  Create instance XYZ of the Isabelle logo (as EPS and PDF).
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   381
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   382
  Options are:
49072
747835eb2782 "isabelle logo" produces EPS and PDF format simultaneously;
wenzelm
parents: 48985
diff changeset
   383
    -n NAME      alternative output base name (default "isabelle_xyx")
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   384
    -q           quiet mode\<close>}
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   385
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   386
  Option \<^verbatim>\<open>-n\<close> specifies an alternative (base) name for the generated files.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   387
  The default is \<^verbatim>\<open>isabelle_\<close>\<open>xyz\<close> in lower-case.
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   388
61503
28e788ca2c5d more control symbols;
wenzelm
parents: 61493
diff changeset
   389
  Option \<^verbatim>\<open>-q\<close> omits printing of the result file name.
48936
e6d9e46ff7bc clarified "isabelle logo";
wenzelm
parents: 48844
diff changeset
   390
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   391
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   392
  Implementors of Isabelle tools and applications are encouraged to make
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   393
  derived Isabelle logos for their own projects using this template.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   394
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   395
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   396
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   397
section \<open>Output the version identifier of the Isabelle distribution\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   398
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   399
text \<open>
48602
342ca8f3197b more uniform usage of "isabelle tool";
wenzelm
parents: 48577
diff changeset
   400
  The @{tool_def version} tool displays Isabelle version information:
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   401
  @{verbatim [display]
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   402
\<open>Usage: isabelle version [OPTIONS]
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   403
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   404
  Options are:
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   405
    -i           short identification (derived from Mercurial id)
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   406
61407
7ba7b8103565 @{verbatim [display]} supersedes old alltt/ttbox;
wenzelm
parents: 61406
diff changeset
   407
  Display Isabelle version information.\<close>}
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   408
61406
eb2463fc4d7b more symbols;
wenzelm
parents: 58618
diff changeset
   409
  \<^medskip>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   410
  The default is to output the full version string of the Isabelle
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   411
  distribution, e.g.\ ``\<^verbatim>\<open>Isabelle2012: May 2012\<close>.
41511
2fe62d602681 isabelle version -i;
wenzelm
parents: 40800
diff changeset
   412
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   413
  The \<^verbatim>\<open>-i\<close> option produces a short identification derived from the Mercurial
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   414
  id of the @{setting ISABELLE_HOME} directory.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   415
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   416
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   417
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   418
section \<open>Convert XML to YXML\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   419
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   420
text \<open>
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   421
  The @{tool_def yxml} tool converts a standard XML document (stdin) to the
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   422
  much simpler and more efficient YXML format of Isabelle (stdout). The YXML
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   423
  format is defined as follows.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   424
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   425
    \<^enum> The encoding is always UTF-8.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   426
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   427
    \<^enum> Body text is represented verbatim (no escaping, no special treatment of
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   428
    white space, no named entities, no CDATA chunks, no comments).
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   429
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   430
    \<^enum> Markup elements are represented via ASCII control characters \<open>\<^bold>X = 5\<close>
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   431
    and \<open>\<^bold>Y = 6\<close> as follows:
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   432
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   433
    \begin{tabular}{ll}
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   434
      XML & YXML \\\hline
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   435
      \<^verbatim>\<open><\<close>\<open>name attribute\<close>\<^verbatim>\<open>=\<close>\<open>value \<dots>\<close>\<^verbatim>\<open>>\<close> &
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   436
      \<open>\<^bold>X\<^bold>Yname\<^bold>Yattribute\<close>\<^verbatim>\<open>=\<close>\<open>value\<dots>\<^bold>X\<close> \\
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   437
      \<^verbatim>\<open></\<close>\<open>name\<close>\<^verbatim>\<open>>\<close> & \<open>\<^bold>X\<^bold>Y\<^bold>X\<close> \\
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   438
    \end{tabular}
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   439
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   440
    There is no special case for empty body text, i.e.\ \<^verbatim>\<open><foo/>\<close> is treated
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   441
    like \<^verbatim>\<open><foo></foo>\<close>. Also note that \<open>\<^bold>X\<close> and \<open>\<^bold>Y\<close> may never occur in
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   442
    well-formed XML documents.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   443
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   444
  Parsing YXML is pretty straight-forward: split the text into chunks
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   445
  separated by \<open>\<^bold>X\<close>, then split each chunk into sub-chunks separated by \<open>\<^bold>Y\<close>.
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   446
  Markup chunks start with an empty sub-chunk, and a second empty sub-chunk
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   447
  indicates close of an element. Any other non-empty chunk consists of plain
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   448
  text. For example, see @{file "~~/src/Pure/PIDE/yxml.ML"} or @{file
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   449
  "~~/src/Pure/PIDE/yxml.scala"}.
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   450
61575
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   451
  YXML documents may be detected quickly by checking that the first two
f18f6e51e901 tuned whitespace;
wenzelm
parents: 61503
diff changeset
   452
  characters are \<open>\<^bold>X\<^bold>Y\<close>.
58618
782f0b662cae more cartouches;
wenzelm
parents: 57443
diff changeset
   453
\<close>
28224
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   454
10487d954a8f converted misc.tex;
wenzelm
parents:
diff changeset
   455
end