doc-src/System/misc.tex
author wenzelm
Thu, 15 Nov 2007 11:49:03 +0100
changeset 25435 bafaea364a66
parent 20572 2b88de40da57
child 25629 f7c6ca73a8bd
permissions -rw-r--r--
isatool version: clarify that this is the *long* form;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     1
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     2
% $Id$
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     3
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
     4
\chapter{Miscellaneous tools} \label{ch:tools}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     5
11031
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
     6
Subsequently we describe various Isabelle related utilities, given in
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     7
alphabetical order.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     8
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     9
11031
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    10
\section{Converting legacy ML scripts --- \texttt{isatool convert}}
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    11
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    12
The \tooldx{convert} utility assists in converting legacy ML proof scripts
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    13
into the new-style format of Isabelle/Isar:
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    14
\begin{ttbox}
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    15
Usage: convert [FILES|DIRS...]
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    16
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    17
  Recursively find .ML files, converting legacy tactic scripts to
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    18
  Isabelle/Isar tactic emulation.
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    19
  Note: conversion is only approximated, based on some heuristics.
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    20
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    21
  Renames old versions of FILES by appending "~0~".
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    22
  Creates new versions of FILES by appending ".thy".
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    23
\end{ttbox}
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    24
The resulting theory text uses the tactic emulation facilities of
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    25
Isabelle/Isar (see also \cite{isabelle-ref}, especially the ``Conversion
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    26
guide'' in the appendix).  Usually there is some manual tuning required to get
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
    27
an automatically converted script work again --- the success rate is around
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
    28
99\% for common ML scripts.
11031
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    29
99c4bed16b9b isatool convert;
wenzelm
parents: 9790
diff changeset
    30
14932
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    31
\section{Displaying documents --- \texttt{isatool display}}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    32
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    33
The \tooldx{display} utility displays documents in DVI format:
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    34
\begin{ttbox}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    35
Usage: display [OPTIONS] FILE
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    36
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    37
  Options are:
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    38
    -c           cleanup -- remove FILE after use
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    39
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    40
  Display document FILE (in DVI format).
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    41
\end{ttbox}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    42
20572
wenzelm
parents: 17567
diff changeset
    43
\medskip The \texttt{-c} option causes the input file to be removed after use.
wenzelm
parents: 17567
diff changeset
    44
The program for viewing \texttt{dvi} files is determined by the
14932
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    45
\texttt{DVI_VIEWER} setting.
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    46
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
    47
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    48
\section{Viewing documentation --- \texttt{isatool doc}} \label{sec:tool-doc}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    49
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    50
The \tooldx{doc} utility displays online documentation:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    51
\begin{ttbox}
13047
wenzelm
parents: 12464
diff changeset
    52
Usage: doc [DOC]
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    53
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    54
  View Isabelle documentation DOC, or show list of available documents.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    55
\end{ttbox}
7882
wenzelm
parents: 7849
diff changeset
    56
If called without arguments, it lists all available documents. Each line
wenzelm
parents: 7849
diff changeset
    57
starts with an identifier, followed by a short description. Any of these
wenzelm
parents: 7849
diff changeset
    58
identifiers may be specified as the first argument in order to have the
wenzelm
parents: 7849
diff changeset
    59
corresponding document displayed.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    60
7882
wenzelm
parents: 7849
diff changeset
    61
\medskip The \texttt{ISABELLE_DOCS} setting specifies the list of directories
wenzelm
parents: 7849
diff changeset
    62
(separated by colons) to be scanned for documentations.  The program for
wenzelm
parents: 7849
diff changeset
    63
viewing \texttt{dvi} files is determined by the \texttt{DVI_VIEWER} setting.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    64
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    65
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    66
\section{Tuning proof scripts --- \texttt{isatool expandshort}}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    67
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    68
The \tooldx{expandshort} utility tunes {\ML} proof scripts to enhance
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
    69
readability:
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    70
\begin{ttbox}
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
    71
Usage: expandshort [FILES|DIRS...]
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    72
7498
1e5585fd3632 expandshort usage: forward_tac;
wenzelm
parents: 7463
diff changeset
    73
  Recursively find .ML files, expand shorthand goal commands.  Also
1e5585fd3632 expandshort usage: forward_tac;
wenzelm
parents: 7463
diff changeset
    74
  contracts uses of resolve_tac, dresolve_tac, eresolve_tac,
7883
wenzelm
parents: 7882
diff changeset
    75
  forward_tac, rewrite_goals_tac on 1-element lists; furthermore
wenzelm
parents: 7882
diff changeset
    76
  expands tabs, which are forbidden in SML string constants.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    77
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
    78
  Renames old versions of files by appending "~~".
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    79
\end{ttbox}
7882
wenzelm
parents: 7849
diff changeset
    80
In the files or directories supplied as arguments, all occurrences of the
wenzelm
parents: 7849
diff changeset
    81
shorthand commands \texttt{br}, \texttt{be} etc.\ in proof scripts are
wenzelm
parents: 7849
diff changeset
    82
replaced with the corresponding full commands.  The old versions of the files
13047
wenzelm
parents: 12464
diff changeset
    83
are renamed to have the suffix ``\verb'~~'''.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
    84
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    85
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
    86
\section{Getting logic images --- \texttt{isatool findlogics}}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    87
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    88
The \tooldx{findlogics} utility traverses all directories specified in
7882
wenzelm
parents: 7849
diff changeset
    89
\texttt{ISABELLE_PATH}, looking for Isabelle logic images. Its usage is:
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    90
\begin{ttbox}
13047
wenzelm
parents: 12464
diff changeset
    91
Usage: findlogics
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    92
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    93
  Collect heap file names from ISABELLE_PATH.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    94
\end{ttbox}
6414
wenzelm
parents: 5571
diff changeset
    95
The base names of all files found on the path are printed --- sorted and with
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
    96
duplicates removed. Also note that lookup in \texttt{ISABELLE_PATH} includes
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
    97
the current values of \texttt{ML_SYSTEM} and \texttt{ML_PLATFORM}. Thus
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
    98
switching to another {\ML} compiler may change the set of logic images
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
    99
available.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   100
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   101
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   102
\section{Inspecting the settings environment --- \texttt{isatool getenv}}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   103
\label{sec:tool-getenv}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   104
7882
wenzelm
parents: 7849
diff changeset
   105
The Isabelle settings environment --- as provided by the site-default and
wenzelm
parents: 7849
diff changeset
   106
user-specific settings files --- can be inspected with the \tooldx{getenv}
wenzelm
parents: 7849
diff changeset
   107
utility:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   108
\begin{ttbox}
13047
wenzelm
parents: 12464
diff changeset
   109
Usage: getenv [OPTIONS] [VARNAMES ...]
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   110
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   111
  Options are:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   112
    -a           display complete environment
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   113
    -b           print values only (doesn't work for -a)
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   114
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   115
  Get value of VARNAMES from the Isabelle settings.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   116
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   117
7882
wenzelm
parents: 7849
diff changeset
   118
With the \texttt{-a} option, one may inspect the full process environment that
wenzelm
parents: 7849
diff changeset
   119
Isabelle related programs are run in. This usually contains much more
wenzelm
parents: 7849
diff changeset
   120
variables than are actually Isabelle settings.  Normally, output is a list of
wenzelm
parents: 7849
diff changeset
   121
lines of the form \mbox{$name$\texttt{=}$value$}. The \texttt{-b} option
wenzelm
parents: 7849
diff changeset
   122
causes only the values to be printed.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   123
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   124
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   125
\subsection*{Examples}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   126
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   127
Get the {\ML} system name and the location where the compiler binaries are
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   128
supposed to reside as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   129
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   130
isatool getenv ML_SYSTEM ML_HOME
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   131
{\out ML_SYSTEM=polyml}
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   132
{\out ML_HOME=/usr/share/polyml/x86-linux}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   133
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   134
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   135
The next one peeks at the output directory for \texttt{isabelle} logic images:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   136
\begin{ttbox}
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   137
isatool getenv -b ISABELLE_OUTPUT
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   138
{\out /home/me/isabelle/heaps/polyml_x86-linux}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   139
\end{ttbox}
4555
wenzelm
parents: 4540
diff changeset
   140
Here we have used the \texttt{-b} option to suppress the
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   141
\texttt{ISABELLE_OUTPUT=} prefix.  The value above is what became of the
4555
wenzelm
parents: 4540
diff changeset
   142
following assignment in the default settings file:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   143
\begin{ttbox}
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   144
ISABELLE_OUTPUT="\$ISABELLE_HOME_USER/heaps"
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   145
\end{ttbox}
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   146
Note how the \texttt{ML_IDENTIFIER} value got appended automatically to each
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 7883
diff changeset
   147
path component. This is a special feature of \texttt{ISABELLE_OUTPUT}.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   148
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   149
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   150
\section{Installing standalone Isabelle executables --- \texttt{isatool install}}
7882
wenzelm
parents: 7849
diff changeset
   151
\label{sec:tool-install}
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   152
7882
wenzelm
parents: 7849
diff changeset
   153
By default, the Isabelle binaries (\texttt{isabelle}, \texttt{isatool} etc.)
wenzelm
parents: 7849
diff changeset
   154
are just run from their location within the distribution directory, probably
6418
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   155
indirectly by the shell through its \texttt{PATH}.  Other schemes of
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   156
installation are supported by the \tooldx{install} utility:
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   157
\begin{ttbox}
6418
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   158
Usage: install [OPTIONS]
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   159
5405
2ecb74e65439 tuned isatool install;
wenzelm
parents: 5366
diff changeset
   160
  Options are:
7883
wenzelm
parents: 7882
diff changeset
   161
    -d DISTDIR   use DISTDIR as Isabelle distribution
wenzelm
parents: 7882
diff changeset
   162
                 (default ISABELLE_HOME)
6418
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   163
    -p DIR       install standalone binaries in DIR
5405
2ecb74e65439 tuned isatool install;
wenzelm
parents: 5366
diff changeset
   164
6418
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   165
  Install Isabelle executables with absolute references to the current
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   166
  distribution directory.
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   167
\end{ttbox}
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   168
6418
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   169
The \texttt{-d} option overrides the current Isabelle distribution directory
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   170
as determined by \texttt{ISABELLE_HOME}.
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   171
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   172
The \texttt{-p} option installs executable wrapper scripts for
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   173
\texttt{isabelle}, \texttt{isatool}, \texttt{Isabelle}, containing proper
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   174
absolute references to the Isabelle distribution directory.  A typical
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   175
\texttt{DIR} specification would be some directory expected to be in the
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   176
shell's \texttt{PATH}, such as \texttt{/usr/local/bin}.  It is important to
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   177
note that a plain manual copy of the original Isabelle executables just would
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   178
not work!
87aa3e5190e0 updated isatool install;
wenzelm
parents: 6414
diff changeset
   179
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   180
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   181
\section{Creating instances of the Isabelle logo --- \texttt{isatool
5571
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   182
    logo}}
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   183
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   184
The \tooldx{logo} utility creates any instance of the generic Isabelle logo as
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   185
an Encapsuled Postscript file (EPS):
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   186
\begin{ttbox}
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   187
Usage: logo [OPTIONS] NAME
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   188
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   189
  Create instance NAME of the Isabelle logo (as EPS).
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   190
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   191
  Options are:
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   192
    -o OUTFILE   set output file (default determined from NAME)
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   193
    -q           quiet mode
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   194
\end{ttbox}
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   195
You are encouraged to use this to create a derived logo for your Isabelle
13047
wenzelm
parents: 12464
diff changeset
   196
project.  For example, \texttt{isatool logo Bali} creates
wenzelm
parents: 12464
diff changeset
   197
\texttt{isabelle_bali.eps}.
5571
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   198
3613c5d22cc6 added isatool logo;
wenzelm
parents: 5405
diff changeset
   199
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   200
\section{Isabelle's version of make --- \texttt{isatool make}}
11616
wenzelm
parents: 11124
diff changeset
   201
\label{sec:tool-make}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   202
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   203
The Isabelle \tooldx{make} utility is a very simple wrapper for
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   204
ordinary Unix \texttt{make}:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   205
\begin{ttbox}
13047
wenzelm
parents: 12464
diff changeset
   206
Usage: make [ARGS ...]
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   207
7801
535112d1f316 make: tuned usage;
wenzelm
parents: 7498
diff changeset
   208
  Compile the logic in current directory using IsaMakefile.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   209
  ARGS are directly passed to the system make program.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   210
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   211
Note that the Isabelle settings environment is also active. Thus one
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   212
may refer to its values within the \ttindex{IsaMakefile}, e.g.\ 
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   213
\texttt{\$(ISABELLE_OUTPUT)}. Furthermore, programs started from the
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   214
make file also inherit this environment.  Typically,
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   215
\texttt{IsaMakefile}s defer the real work to the \texttt{usedir}
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   216
utility, see \S\ref{sec:tool-usedir}.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   217
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   218
\medskip The basic \texttt{IsaMakefile} convention is that the default
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   219
target builds the actual logic, including its parents if appropriate.
4555
wenzelm
parents: 4540
diff changeset
   220
The \texttt{images} target is intended to build all local logic
wenzelm
parents: 4540
diff changeset
   221
images, while the \texttt{test} target shall build all related
wenzelm
parents: 4540
diff changeset
   222
examples.  The \texttt{all} target shall do \texttt{images} and
wenzelm
parents: 4540
diff changeset
   223
\texttt{test}.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   224
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   225
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   226
\subsection*{Examples}
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   227
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   228
Refer to the \texttt{IsaMakefile}s of the Isabelle distribution's
13047
wenzelm
parents: 12464
diff changeset
   229
object-logics as a model for your own developments.  For example, see
4555
wenzelm
parents: 4540
diff changeset
   230
\texttt{src/FOL/IsaMakefile}.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   231
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   232
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   233
\section{Make all logics --- \texttt{isatool makeall}}
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   234
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   235
The \tooldx{makeall} utility applies Isabelle make to all logic
4555
wenzelm
parents: 4540
diff changeset
   236
directories of the distribution:
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   237
\begin{ttbox}
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   238
Usage: makeall [ARGS ...]
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   239
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   240
  Apply isatool make to all logics (passing ARGS).
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   241
\end{ttbox}
4555
wenzelm
parents: 4540
diff changeset
   242
The arguments \texttt{ARGS} are just passed verbatim to each
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3752
diff changeset
   243
\texttt{make} invocation.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   244
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   245
14932
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   246
\section{Printing documents --- \texttt{isatool print}}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   247
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   248
The \tooldx{print} utility prints documents:
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   249
\begin{ttbox}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   250
Usage: print [OPTIONS] FILE
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   251
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   252
  Options are:
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   253
    -c           cleanup -- remove FILE after use
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   254
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   255
  Print document FILE.
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   256
\end{ttbox}
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   257
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   258
The \texttt{-c} option causes the input file to be removed after use.  The
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   259
printer spool command is determined by the \texttt{PRINT_COMMAND} setting.
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   260
df56e644da8f added isatool display and isatool print;
wenzelm
parents: 13047
diff changeset
   261
12464
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   262
\section{Remove awkward symbol names from theory sources --- \texttt{isatool unsymbolize}}
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   263
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   264
The \tooldx{unsymbolize} utility tunes Isabelle theory sources to improve
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   265
readability for plain ASCII output (e.g.\ in email communication).  Most
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   266
notably, \texttt{unsymbolize} replaces awkward arrow symbols such as
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   267
\verb|\<Longrightarrow>| by \verb|==>|.
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   268
\begin{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   269
Usage: unsymbolize [FILES|DIRS...]
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   270
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   271
  Recursively find .thy/.ML files, removing unreadable symbol names.
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   272
  Note: this is an ad-hoc script; there is no systematic way to replace
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   273
  symbols independently of the inner syntax of a theory!
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   274
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   275
  Renames old versions of FILES by appending "~~".
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   276
\end{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   277
f9d3c92eae4d updated;
wenzelm
parents: 11616
diff changeset
   278
16257
98337d5acd0e added isatool version;
wenzelm
parents: 14932
diff changeset
   279
\section{Output the version identifier of the Isabelle distribution --- \texttt{isatool version}}
98337d5acd0e added isatool version;
wenzelm
parents: 14932
diff changeset
   280
25435
bafaea364a66 isatool version: clarify that this is the *long* form;
wenzelm
parents: 20572
diff changeset
   281
The \tooldx{version} utility outputs the full version string of the
bafaea364a66 isatool version: clarify that this is the *long* form;
wenzelm
parents: 20572
diff changeset
   282
Isabelle distribution being used, e.g.\ ``\texttt{Isabelle2007:
bafaea364a66 isatool version: clarify that this is the *long* form;
wenzelm
parents: 20572
diff changeset
   283
  November 2007}''.  There are no options nor arguments.
16257
98337d5acd0e added isatool version;
wenzelm
parents: 14932
diff changeset
   284
5366
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   285
%%% Local Variables: 
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   286
%%% mode: latex
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   287
%%% TeX-master: "system"
8521cd8b0a40 emacs local vars;
wenzelm
parents: 4555
diff changeset
   288
%%% End: