doc-src/System/misc.tex
author wenzelm
Tue, 20 May 1997 19:29:50 +0200
changeset 3257 4e3724e0659f
parent 3217 d30d62128fe5
child 3262 7115da553895
permissions -rw-r--r--
README generation;
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
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     4
\chapter{Miscellaneous tools}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     5
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     6
Subsequently we describe various Isabelle related utilities --- in
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
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    10
\section{Viewing documentation --- \texttt{isatool doc}} \label{sec:tool-doc}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    11
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    12
The \tooldx{doc} utility displays online documentation:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    13
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    14
Usage: isatool doc [DOC]
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    15
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    16
  View Isabelle documentation DOC, or show list of available documents.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    17
\end{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    18
If called without arguments, it lists all available documents. Each
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    19
line starts with an identifier, followed by some comment. Any of these
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    20
identifiers may be specified as the first argument in order to have
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    21
the corresponding document displayed.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    22
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    23
\medskip The \texttt{ISABELLE_DOCS} setting specifies the list of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    24
directories (separated by colons) to be scanned for documentations.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    25
The program for viewing \texttt{dvi} files is set in
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    26
\texttt{DVI_VIEWER}.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    27
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    28
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    29
\section{Tuning proof scripts --- \texttt{isatool expandshort}}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    30
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    31
The \tooldx{expandshort} utility tunes {\ML} proof scripts to enhance
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    32
readability a bit:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    33
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    34
Usage: expandshort [FILES ...]
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    35
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    36
  Expand shorthand goal commands in FILES.  Also contracts uses of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    37
  resolve_tac, dresolve_tac, eresolve_tac, rewrite_goals_tac on
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    38
  1-element lists; furthermore expands tabs, since they are now
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    39
  forbidden in ML string constants.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    40
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    41
  Renames old versions of FILES by appending "~~".
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    42
\end{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    43
In the files supplied as arguments, all occurrences of the shorthand
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    44
commands \texttt{br}, \texttt{be} etc.\ are replaced with the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    45
corresponding full commands.  Shorthand commands should appear one per
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    46
line.  The old versions of the files are renamed to have the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    47
suffix~\verb'~~'.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    48
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    49
\section{Get logic images --- \texttt{isatool findlogics}}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    50
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    51
The \tooldx{findlogics} utility traverses all directories specified in
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    52
\texttt{ISABELLE_PATH}, looking for Isabelle logic images. Its usage
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    53
is:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    54
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    55
Usage: isatool findlogics
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    56
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    57
  Collect heap file names from ISABELLE_PATH.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    58
\end{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    59
The base names of all files found on the path are printed --- sorted
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    60
and with duplicates removed. Also note that \texttt{ISABELLE_PATH}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    61
implicitely depends upon \texttt{ML_SYSTEM}. Thus switching to another
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    62
{\ML} compiler may change the set of logic images available.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    63
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    64
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    65
\section{Inspecting the settings environment -- \texttt{isatool getenv}}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    66
\label{sec:tool-getenv}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    67
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    68
The Isabelle settings environment --- as provided by the site-default
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    69
and user-specific settings files --- can be inspected with the
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    70
\tooldx{getenv} utility:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    71
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    72
Usage: isatool getenv [OPTIONS] [VARNAMES ...]
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    73
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    74
  Options are:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    75
    -a           display complete environment
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    76
    -b           print values only (doesn't work for -a)
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    77
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    78
  Get value of VARNAMES from the Isabelle settings.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    79
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    80
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    81
With the \texttt{-a} option, one may inspect the full process
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    82
environment that Isabelle related programs are run in. This usually
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    83
contains much more variables than are actually Isabelle settings.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    84
Normally output is a list of lines of the form
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    85
\mbox{$varname$\texttt{=}$value$}. The \texttt{-b} option causes only
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    86
the values to be printed.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    87
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    88
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    89
\subsection*{Examples}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    90
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    91
Get the {\ML} system identifier and the location where the compiler
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    92
binaries are supposed to reside as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    93
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    94
isatool getenv ML_SYSTEM ML_HOME
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    95
{\out ML_SYSTEM=smlnj-1.09}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    96
{\out ML_HOME=/usr/local/sml109.27/bin}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    97
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    98
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    99
The next one peeks at the search path that \texttt{isabelle} uses to
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   100
locate logic images:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   101
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   102
isatool getenv -b ISABELLE_PATH
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   103
{\out /home/me/isabelle/heaps/smlnj-1.09:/proj/isabelle/heaps/smlnj-1.09}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   104
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   105
We used the \texttt{-b} option to suppress the \texttt{ISABELLE_PATH=}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   106
prefix.  The value above is what became of the following assignment in
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   107
the default settings file:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   108
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   109
ISABELLE_PATH=\$ISABELLE_HOME_USER/heaps:\$ISABELLE_HOME/heaps
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   110
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   111
Note how the \texttt{ML_SYSTEM} value got appended automatically to
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   112
each path component. This is a special feature of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   113
\texttt{ISABELLE_PATH} (and also of \texttt{ISABELLE_OUTPUT}).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   114
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   115
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   116
\section{Isabelle's version of make --- \texttt{isatool make}}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   117
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   118
The Isabelle \tooldx{make} utility is a very simple wrapper for
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   119
ordinary Unix \texttt{make}:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   120
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   121
Usage: isatool make [ARGS ...]
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   122
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   123
  Compiles logic in current directory using IsaMakefile.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   124
  ARGS are directly passed to the system make program.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   125
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   126
Note that the Isabelle settings environment is also active. Thus one
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   127
may refer to its values within the \texttt{IsaMakefile}, e.g.\ 
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   128
\texttt{\$(ISABELLE_OUTPUT)}. Furthermore, programs started from the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   129
make file also inherit this environment.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   130
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   131
\medskip You may want to have a look at the \texttt{IsaMakefile}s of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   132
the distributed object-logics as examples for your own developements.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   133
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   134
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   135
\section{Running complete logics --- \texttt{isatool usedir}} \label{sec:tool-usedir}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   136
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   137
FIXME
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   138
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   139
%FIXME
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   140
%    -g BOOL      generate theory graph data (default false)
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   141
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   142
Usage: isatool usedir LOGIC NAME
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   143
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   144
  Options are:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   145
    -b           build mode (output heap image, use dir ".")
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   146
    -h BOOL      generate theory HTML data (default false)
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   147
    -s NAME      override session NAME
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   148
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   149
  Build object-logic or run examples. Also creates browsing
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   150
  information (HTML etc.) according to settings.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   151
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   152
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   153
FIXME