doc-src/System/basics.tex
author wenzelm
Mon, 18 Oct 1999 19:43:18 +0200
changeset 7882 52fb3667f7df
parent 7861 8d5d3163fd81
child 7883 01e6e05d208b
permissions -rw-r--r--
tuned;
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
7882
wenzelm
parents: 7861
diff changeset
     4
\chapter{The Isabelle system environment}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     5
7882
wenzelm
parents: 7861
diff changeset
     6
This manual describes Isabelle together with related tools and user interfaces
wenzelm
parents: 7861
diff changeset
     7
as seen from an outside, system oriented view.  See also the \emph{Isabelle
wenzelm
parents: 7861
diff changeset
     8
  Reference Manual}~\cite{isabelle-ref} and the \emph{Isabelle Isar Reference
wenzelm
parents: 7861
diff changeset
     9
  Manual}~\cite{isabelle-isar-ref} for the actual Isabelle commands and
wenzelm
parents: 7861
diff changeset
    10
related functions.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    11
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    12
\medskip The Isabelle system environment is based on a few general elements:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    13
\begin{itemize}
7882
wenzelm
parents: 7861
diff changeset
    14
\item The \emph{Isabelle settings mechanism}, which provides environment
wenzelm
parents: 7861
diff changeset
    15
  variables to all Isabelle programs (including tools and user interfaces).
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    16
\item \emph{Isabelle proper} (\ttindex{isabelle}), which invokes logic
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    17
  sessions, both interactively or in batch mode. In particular,
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    18
  \texttt{isabelle} abstracts over the invocation of the actual {\ML} system
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    19
  to be used.
7882
wenzelm
parents: 7861
diff changeset
    20
\item The \emph{Isabelle tools wrapper} (\ttindex{isatool}), which provides a
wenzelm
parents: 7861
diff changeset
    21
  generic startup platform for Isabelle related utilities.  Thus tools
wenzelm
parents: 7861
diff changeset
    22
  automatically benefit from the settings mechanism.
wenzelm
parents: 7861
diff changeset
    23
\item The \emph{Isabelle interface wrapper} (\ttindex{Isabelle}\footnote{Note
wenzelm
parents: 7861
diff changeset
    24
    the capital \texttt{I}!}), which provides some abstraction over the actual
wenzelm
parents: 7861
diff changeset
    25
  user interface to be used.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    26
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    27
7882
wenzelm
parents: 7861
diff changeset
    28
\medskip The beginning user would probably just run one of the interfaces (by
wenzelm
parents: 7861
diff changeset
    29
invoking the capital \texttt{Isabelle}), and maybe some basic tools like
wenzelm
parents: 7861
diff changeset
    30
\texttt{doc} (see \S\ref{sec:tool-doc}).  This assumes that the system has
wenzelm
parents: 7861
diff changeset
    31
already been installed, of course.\footnote{In case you have to do this
wenzelm
parents: 7861
diff changeset
    32
  yourself, see the \ttindex{INSTALL} file in the top-level directory of the
wenzelm
parents: 7861
diff changeset
    33
  distribution of how to proceed.  Some binary packages are available as
wenzelm
parents: 7861
diff changeset
    34
  well.}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    35
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    36
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    37
\section{Isabelle settings} \label{sec:settings}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    38
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    39
The Isabelle system heavily depends on the \emph{settings
7882
wenzelm
parents: 7861
diff changeset
    40
  mechanism}\indexbold{settings}. Basically, this is a statically scoped
wenzelm
parents: 7861
diff changeset
    41
collection of environment variables, such as \texttt{ISABELLE_HOME},
wenzelm
parents: 7861
diff changeset
    42
\texttt{ML_SYSTEM}, \texttt{ML_HOME}.  These variables are \emph{not} intended
wenzelm
parents: 7861
diff changeset
    43
to be set directly from the shell, though.  Isabelle employs a somewhat more
wenzelm
parents: 7861
diff changeset
    44
sophisticated scheme of \emph{settings files} --- one for site-wide defaults,
wenzelm
parents: 7861
diff changeset
    45
another for additional user-specific modifications.  With all configuration
wenzelm
parents: 7861
diff changeset
    46
variables in at most two places, this scheme is more maintainable and
wenzelm
parents: 7861
diff changeset
    47
user-friendly than plain shell environment variables.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    48
7882
wenzelm
parents: 7861
diff changeset
    49
In particular, we avoid the typical situation where prospective users of a
wenzelm
parents: 7861
diff changeset
    50
software package are told to put several things into their shell startup
wenzelm
parents: 7861
diff changeset
    51
scripts, before being able to actually run it. Isabelle requires none such
wenzelm
parents: 7861
diff changeset
    52
administrative chores of its end-users --- the executables can be invoked
wenzelm
parents: 7861
diff changeset
    53
straight away.  Occasionally, users would still want to put the Isabelle
wenzelm
parents: 7861
diff changeset
    54
\texttt{bin} directory into their shell's search path, but this is not
wenzelm
parents: 7861
diff changeset
    55
required.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    56
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    57
7882
wenzelm
parents: 7861
diff changeset
    58
\subsection{Creating the environment}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    59
7882
wenzelm
parents: 7861
diff changeset
    60
Whenever any of the Isabelle executables is run, their settings environment is
wenzelm
parents: 7861
diff changeset
    61
built as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    62
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    63
\begin{enumerate}
7882
wenzelm
parents: 7861
diff changeset
    64
\item The special variable \settdx{ISABELLE_HOME} is determined automatically
wenzelm
parents: 7861
diff changeset
    65
  from the location of the binary that has been run.
wenzelm
parents: 7861
diff changeset
    66
  
wenzelm
parents: 7861
diff changeset
    67
  You should not try to set \texttt{ISABELLE_HOME} manually. Also note that
wenzelm
parents: 7861
diff changeset
    68
  the Isabelle executables either have to be run from their original location
wenzelm
parents: 7861
diff changeset
    69
  in the distribution directory, or via the executable objects created via the
wenzelm
parents: 7861
diff changeset
    70
  \texttt{install} utility (see \S\ref{sec:tool-install}).  Just doing a plain
wenzelm
parents: 7861
diff changeset
    71
  copy of the \texttt{bin} files will not work!
wenzelm
parents: 7861
diff changeset
    72
  
wenzelm
parents: 7861
diff changeset
    73
\item The file \texttt{\$ISABELLE_HOME/etc/settings} ist run as a shell script
wenzelm
parents: 7861
diff changeset
    74
  with the auto-export option for variables enabled.
wenzelm
parents: 7861
diff changeset
    75
  
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
    76
  This file typically contains a rather long list of shell variable
7882
wenzelm
parents: 7861
diff changeset
    77
  assigments, thus providing the site-wide default settings.  The Isabelle
wenzelm
parents: 7861
diff changeset
    78
  distribution already contains a global settings file with sensible defaults
wenzelm
parents: 7861
diff changeset
    79
  for most variables. When installing the system, only a few of these have to
wenzelm
parents: 7861
diff changeset
    80
  be adapted (most likely \texttt{ML_SYSTEM} etc.).
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    81
  
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    82
\item The file \texttt{\$ISABELLE_HOME_USER/etc/settings} (if it exists) is
7882
wenzelm
parents: 7861
diff changeset
    83
  run in the same way as the site default settings. Note that the variable
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    84
  \texttt{ISABELLE_HOME_USER} has already been set before --- usually to
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
    85
  \texttt{\~\relax/isabelle}.
7882
wenzelm
parents: 7861
diff changeset
    86
  
wenzelm
parents: 7861
diff changeset
    87
  Thus individual users may override the site-wide defaults. See also file
wenzelm
parents: 7861
diff changeset
    88
  \texttt{etc/user-settings.sample} in the distribution.  Typically, a user
wenzelm
parents: 7861
diff changeset
    89
  settings file would contain only a few lines, just the assigments that are
wenzelm
parents: 7861
diff changeset
    90
  really changed.  One should definitely \emph{not} start with a full copy the
wenzelm
parents: 7861
diff changeset
    91
  basic \texttt{\$ISABELLE_HOME/etc/settings}. This could cause very annoying
wenzelm
parents: 7861
diff changeset
    92
  maintainance problems later, when the Isabelle installation is updated or
wenzelm
parents: 7861
diff changeset
    93
  changed otherwise.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    94
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    95
\end{enumerate}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    96
7882
wenzelm
parents: 7861
diff changeset
    97
Note that settings files are actually full GNU bash scripts. So one may use
wenzelm
parents: 7861
diff changeset
    98
complex shell commands, such as \texttt{if} or \texttt{case} statements, to
wenzelm
parents: 7861
diff changeset
    99
set variables depending on the system architecture or other environment
wenzelm
parents: 7861
diff changeset
   100
variables.  Such advanced features should be added only with great care,
wenzelm
parents: 7861
diff changeset
   101
though. In particular, external environment references should be kept at a
wenzelm
parents: 7861
diff changeset
   102
minimum.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   103
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   104
\medskip A few variables are somewhat special:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   105
\begin{itemize}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   106
\item \settdx{ISABELLE} and \settdx{ISATOOL} are set automatically to
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   107
  the absolute path names of the \texttt{isabelle} and
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   108
  \texttt{isatool} executables, respectively.
6414
wenzelm
parents: 6412
diff changeset
   109
  
wenzelm
parents: 6412
diff changeset
   110
\item \settdx{ISABELLE_PATH} and \settdx{ISABELLE_OUTPUT} will have the {\ML}
wenzelm
parents: 6412
diff changeset
   111
  system identifier (according to \texttt{ML_IDENTIFIER} automatically
wenzelm
parents: 6412
diff changeset
   112
  appended to their values.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   113
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   114
7882
wenzelm
parents: 7861
diff changeset
   115
\medskip The Isabelle settings scheme is basically simple, but non-trivial.
wenzelm
parents: 7861
diff changeset
   116
For debugging purposes, the resulting environment may be inspected with the
wenzelm
parents: 7861
diff changeset
   117
\texttt{getenv} utility, see \S\ref{sec:tool-getenv}.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   118
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   119
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   120
\subsection{Common variables}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   121
7882
wenzelm
parents: 7861
diff changeset
   122
This is a reference of common Isabelle settings variables. Note that the list
wenzelm
parents: 7861
diff changeset
   123
is somewhat open-ended. Third-party utilities or interfaces may add their own
wenzelm
parents: 7861
diff changeset
   124
selection. Variables that are special in some sense are marked with *.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   125
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   126
\begin{description}
7882
wenzelm
parents: 7861
diff changeset
   127
\item[\settdx{ISABELLE_HOME}*] is the location of the top-level Isabelle
wenzelm
parents: 7861
diff changeset
   128
  distribution directory. This is automatically determined from the Isabelle
wenzelm
parents: 7861
diff changeset
   129
  executable that has been invoked.  Do not try to set \texttt{ISABELLE_HOME}
wenzelm
parents: 7861
diff changeset
   130
  yourself from the shell.
wenzelm
parents: 7861
diff changeset
   131
  
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   132
\item[\settdx{ISABELLE_HOME_USER}] is the user-specific counterpart of
7882
wenzelm
parents: 7861
diff changeset
   133
  \texttt{ISABELLE_HOME}. The default value is \texttt{\~\relax/isabelle},
wenzelm
parents: 7861
diff changeset
   134
  under rare circumstances this may be changed in the global setting file.
wenzelm
parents: 7861
diff changeset
   135
  Typically, the \texttt{ISABELLE_HOME_USER} directory mimics
wenzelm
parents: 7861
diff changeset
   136
  \texttt{ISABELLE_HOME} to some extend. In particular, site-wide defaults may
wenzelm
parents: 7861
diff changeset
   137
  be overridden by a private \texttt{etc/settings}.
wenzelm
parents: 7861
diff changeset
   138
  
wenzelm
parents: 7861
diff changeset
   139
\item[\settdx{ISABELLE}*, \settdx{ISATOOL}*] are automatically set to the full
wenzelm
parents: 7861
diff changeset
   140
  path names of the \texttt{isabelle} and \texttt{isatool} executables,
wenzelm
parents: 7861
diff changeset
   141
  respectively.  Thus other tools and scripts need not assume that the
wenzelm
parents: 7861
diff changeset
   142
  Isabelle \texttt{bin} directory is on the current search path of the shell.
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   143
  
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   144
\item[\settdx{ML_SYSTEM}, \settdx{ML_HOME}, \settdx{ML_OPTIONS},
6414
wenzelm
parents: 6412
diff changeset
   145
  \settdx{ML_PLATFORM}, \settdx{ML_IDENTIFIER}*] specify the underlying {\ML}
7882
wenzelm
parents: 7861
diff changeset
   146
  system to be used for Isabelle.  There is only a fixed set of admissable
wenzelm
parents: 7861
diff changeset
   147
  \texttt{ML_SYSTEM} names (see the \texttt{etc/settings} file of the
wenzelm
parents: 7861
diff changeset
   148
  distribution).
wenzelm
parents: 7861
diff changeset
   149
  
wenzelm
parents: 7861
diff changeset
   150
  The actual compiler binary will be run from the directory \texttt{ML_HOME},
wenzelm
parents: 7861
diff changeset
   151
  with \texttt{ML_OPTIONS} as first arguments on the command line.  The
wenzelm
parents: 7861
diff changeset
   152
  optional \texttt{ML_PLATFORM} may specify the binary format of ML heap
wenzelm
parents: 7861
diff changeset
   153
  images, which is useful for cross-platform installations.  The value of
wenzelm
parents: 7861
diff changeset
   154
  \texttt{ML_IDENTIFIER} is automatically obtained by composing the
wenzelm
parents: 7861
diff changeset
   155
  \texttt{ML_SYSTEM} and \texttt{ML_PLATFORM} values.
6414
wenzelm
parents: 6412
diff changeset
   156
  
wenzelm
parents: 6412
diff changeset
   157
\item[\settdx{ISABELLE_PATH}*] is a list of directories (separated by colons)
wenzelm
parents: 6412
diff changeset
   158
  where Isabelle logic images may reside. Note that the value of
wenzelm
parents: 6412
diff changeset
   159
  \texttt{ML_IDENTIFIER} is appended to each component automatically.
7882
wenzelm
parents: 7861
diff changeset
   160
  
wenzelm
parents: 7861
diff changeset
   161
\item[\settdx{ISABELLE_OUTPUT}*] is a directory where output heap files should
wenzelm
parents: 7861
diff changeset
   162
  be stored by default. The \texttt{ML_SYSTEM} identifier is appended here,
wenzelm
parents: 7861
diff changeset
   163
  too.
wenzelm
parents: 7861
diff changeset
   164
  
wenzelm
parents: 7861
diff changeset
   165
\item[\settdx{ISABELLE_BROWSER_INFO}] is the directory where theory browser
wenzelm
parents: 7861
diff changeset
   166
  information (HTML text, graph data, and printable documents) is stored (see
wenzelm
parents: 7861
diff changeset
   167
  also \S\ref{sec:info}).  The default value is
4555
wenzelm
parents: 4547
diff changeset
   168
  \texttt{\$ISABELLE_HOME_USER/browser_info}.
7882
wenzelm
parents: 7861
diff changeset
   169
  
wenzelm
parents: 7861
diff changeset
   170
\item[\settdx{ISABELLE_LOGIC}] specifies the default logic to load if none is
wenzelm
parents: 7861
diff changeset
   171
  given explicitely by the user.  The default value is \texttt{HOL}.
wenzelm
parents: 7861
diff changeset
   172
  
wenzelm
parents: 7861
diff changeset
   173
\item[\settdx{ISABELLE_USEDIR_OPTIONS}] is implicitly prefixed to the command
wenzelm
parents: 7861
diff changeset
   174
  line of any \texttt{isatool usedir} invocation (see also
wenzelm
parents: 7861
diff changeset
   175
  \S\ref{sec:tool-usedir}). This typically contains compilation options for
wenzelm
parents: 7861
diff changeset
   176
  object-logics --- \texttt{usedir} is the basic utility for managing logic
wenzelm
parents: 7861
diff changeset
   177
  sessions (cf.\ the \texttt{IsaMakefile}s in the distribution).
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   178
  
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   179
\item[\settdx{ISABELLE_LATEX}, \settdx{ISABELLE_PDFLATEX},
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   180
  \settdx{ISABELLE_BIBTEX}, \settdx{ISABELLE_DVIPS}] refer to {\LaTeX} related
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   181
  tools for Isabelle document preparation (see also \S\ref{sec:tool-latex}).
7882
wenzelm
parents: 7861
diff changeset
   182
  
wenzelm
parents: 7861
diff changeset
   183
\item[\settdx{ISABELLE_TOOLS}] is a colon separated list of directories that
wenzelm
parents: 7861
diff changeset
   184
  are scanned by \texttt{isatool} for external utility programs (see also
wenzelm
parents: 7861
diff changeset
   185
  \S\ref{sec:isatool}).
wenzelm
parents: 7861
diff changeset
   186
  
wenzelm
parents: 7861
diff changeset
   187
\item[\settdx{ISABELLE_DOCS}] is a colon separated list of directories with
wenzelm
parents: 7861
diff changeset
   188
  documentation files.
wenzelm
parents: 7861
diff changeset
   189
  
wenzelm
parents: 7861
diff changeset
   190
\item[\settdx{DVI_VIEWER}] specifies the command to be used for displaying
wenzelm
parents: 7861
diff changeset
   191
  \texttt{dvi} files.
wenzelm
parents: 7861
diff changeset
   192
  
wenzelm
parents: 7861
diff changeset
   193
\item[\settdx{ISABELLE_INSTALL_FONTS}] determines the way that the Isabelle
wenzelm
parents: 7861
diff changeset
   194
  symbol fonts are installed into your currently running X11 display server.
wenzelm
parents: 7861
diff changeset
   195
  X11 fonts are a subtle issue, see \S\ref{sec:tool-installfonts} for more
wenzelm
parents: 7861
diff changeset
   196
  information.
wenzelm
parents: 7861
diff changeset
   197
  
wenzelm
parents: 7861
diff changeset
   198
\item[\settdx{ISABELLE_TMP_PREFIX}] is the prefix from which any running
wenzelm
parents: 7861
diff changeset
   199
  \texttt{isabelle} process derives an individual directory for temporary
wenzelm
parents: 7861
diff changeset
   200
  files.  The default is somewhere in \texttt{/tmp}.
wenzelm
parents: 7861
diff changeset
   201
  
wenzelm
parents: 7861
diff changeset
   202
\item[\settdx{ISABELLE_INTERFACE}] is an identifier that specifies the actual
wenzelm
parents: 7861
diff changeset
   203
  user interface that the capital \texttt{Isabelle} should invoke.  See
wenzelm
parents: 7861
diff changeset
   204
  \S\ref{sec:interface} for more details.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   205
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   206
\end{description}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   207
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   208
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   209
\section{Isabelle proper --- \texttt{isabelle}}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   210
7882
wenzelm
parents: 7861
diff changeset
   211
The \ttindex{isabelle} executable runs logic sessions --- either interactively
wenzelm
parents: 7861
diff changeset
   212
or in batch mode. It provides an abstraction over the underlying {\ML} system,
wenzelm
parents: 7861
diff changeset
   213
and over the actual heap file locations. Its usage is:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   214
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   215
Usage: isabelle [OPTIONS] [INPUT] [OUTPUT]
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   216
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   217
  Options are:
5814
a3881c1f1d3c isabelle -I;
wenzelm
parents: 5364
diff changeset
   218
    -I           startup Isar interaction mode
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   219
    -e MLTEXT    pass MLTEXT to the ML session
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   220
    -m MODE      add print mode for output
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   221
    -q           non-interactive session
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   222
    -r           open heap file read-only
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   223
    -u           pass 'use"ROOT.ML";' to the ML session
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   224
    -w           reset write permissions on OUTPUT
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   225
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   226
  INPUT (default "\$ISABELLE_LOGIC") and OUTPUT specify in/out heaps.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   227
  These are either names to be searched in the Isabelle path, or actual
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   228
  file names (containing at least one /).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   229
  If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   230
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   231
Input files without path specifications are looked up in the
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   232
\texttt{ISABELLE_PATH} setting, which may consist of multiple components
7882
wenzelm
parents: 7861
diff changeset
   233
separated by colons --- these are tried in the given order.  Likewise, base
wenzelm
parents: 7861
diff changeset
   234
names are relative to the directory specified by \texttt{ISABELLE_OUTPUT}.  In
wenzelm
parents: 7861
diff changeset
   235
any case, actual file locations may also be given by including at least one
wenzelm
parents: 7861
diff changeset
   236
slash (\texttt{/}) in the name (hint: use \texttt{./} to refer to the current
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   237
directory).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   238
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   239
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   240
\subsection*{Options}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   241
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   242
If the input heap file does not have write permission bits set, or the
7882
wenzelm
parents: 7861
diff changeset
   243
\texttt{-r} option is given explicitely, then the session started will be
wenzelm
parents: 7861
diff changeset
   244
read-only.  That is, the {\ML} world cannot be committed back into the logic
wenzelm
parents: 7861
diff changeset
   245
image.  Otherwise, a writable session enables commits into either the input
wenzelm
parents: 7861
diff changeset
   246
file, or into an alternative output heap file (in case that is given as the
wenzelm
parents: 7861
diff changeset
   247
second argument on the command line).
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   248
7882
wenzelm
parents: 7861
diff changeset
   249
The read-write state of sessions is determined at startup only, it cannot be
wenzelm
parents: 7861
diff changeset
   250
changed intermediately. Also note that heap images may require considerable
wenzelm
parents: 7861
diff changeset
   251
amounts of disk space. Users are responsible themselves to dispose their heap
wenzelm
parents: 7861
diff changeset
   252
files when they are no longer needed.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   253
7882
wenzelm
parents: 7861
diff changeset
   254
\medskip The \texttt{-w} option makes the output heap file read-only after
wenzelm
parents: 7861
diff changeset
   255
terminating.  Thus subsequent invocations cause the logic image to be
wenzelm
parents: 7861
diff changeset
   256
read-only automatically.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   257
7882
wenzelm
parents: 7861
diff changeset
   258
\medskip Using the \texttt{-e} option, arbitrary {\ML} code may be passed to
wenzelm
parents: 7861
diff changeset
   259
the Isabelle session from the command line. Multiple \texttt{-e}'s are
wenzelm
parents: 7861
diff changeset
   260
evaluated in the given order. Strange things may happen when errorneous {\ML}
wenzelm
parents: 7861
diff changeset
   261
code is provided. Also make sure that the {\ML} commands are terminated
wenzelm
parents: 7861
diff changeset
   262
properly by semicolon.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   263
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   264
\medskip The \texttt{-u} option is a shortcut for \texttt{-e}, passing
4555
wenzelm
parents: 4547
diff changeset
   265
``\texttt{use"ROOT.ML";}'' to the {\ML} session.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   266
7882
wenzelm
parents: 7861
diff changeset
   267
\medskip The \texttt{-m} option adds identifiers of print modes to be made
wenzelm
parents: 7861
diff changeset
   268
active for this session. Typically, this is used by some user interface, e.g.\ 
wenzelm
parents: 7861
diff changeset
   269
to enable output of mathematical symbols from a special screen font.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   270
7882
wenzelm
parents: 7861
diff changeset
   271
\medskip Isabelle normally enters an interactive top-level loop (after
wenzelm
parents: 7861
diff changeset
   272
processing the \texttt{-e} texts). The \texttt{-q} option inhibits
wenzelm
parents: 7861
diff changeset
   273
interaction, thus providing a pure batch mode facility.
5814
a3881c1f1d3c isabelle -I;
wenzelm
parents: 5364
diff changeset
   274
a3881c1f1d3c isabelle -I;
wenzelm
parents: 5364
diff changeset
   275
\medskip The \texttt{-I} option makes Isabelle enter Isar interaction mode on
7882
wenzelm
parents: 7861
diff changeset
   276
startup, instead of the primitive {\ML} top-level.  User interfaces (such
wenzelm
parents: 7861
diff changeset
   277
Proof~General) take care of this switch automatically.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   278
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   279
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   280
\subsection*{Examples}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   281
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   282
Run an interactive session of the default object-logic (as specified
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   283
by the \texttt{ISABELLE_LOGIC} setting) like this:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   284
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   285
isabelle
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   286
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   287
Usually \texttt{ISABELLE_LOGIC} refers to one of the standard logic
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   288
images, which are read-only by default.  A writable session --- based
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   289
on \texttt{FOL}, but output to \texttt{Foo} (in the directory
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   290
specified by the \texttt{ISABELLE_OUTPUT} setting) --- may be invoked
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   291
as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   292
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   293
isabelle FOL Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   294
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   295
Ending this session normally (e.g.\ by typing control-D) dumps the
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   296
whole {\ML} system state into \texttt{Foo}. Be prepared for several
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   297
megabytes!
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   298
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   299
The \texttt{Foo} session may be continued later (still in writable
3262
7115da553895 under construction;
wenzelm
parents: 3217
diff changeset
   300
state) by:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   301
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   302
isabelle Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   303
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   304
A read-only \texttt{Foo} session may be started by:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   305
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   306
isabelle -r Foo
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   307
\end{ttbox}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   308
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   309
\medskip Note that manual session management like this does \emph{not} provide
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   310
proper setup for theory presentation.  This would require the \texttt{usedir}
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   311
utility, see \S\ref{sec:tool-usedir}.
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   312
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   313
\bigskip The next example demonstrates batch execution of Isabelle. We print a
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   314
certain theorem of \texttt{FOL}:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   315
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   316
isabelle -e "prth allE;" -q -r FOL
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   317
\end{ttbox}
7882
wenzelm
parents: 7861
diff changeset
   318
Note that the output text will be interspersed with additional junk messages
wenzelm
parents: 7861
diff changeset
   319
by the {\ML} runtime environment.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   320
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   321
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   322
\section{The Isabelle tools wrapper --- \texttt{isatool}} \label{sec:isatool}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   323
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   324
All Isabelle related utilities are called via a common wrapper ---
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   325
\ttindex{isatool}:
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   326
\begin{ttbox}
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   327
Usage: isatool TOOL [ARGS ...]
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   328
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   329
  Start Isabelle utility program TOOL with ARGS. Pass "-?" to TOOL
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   330
  for more specific help.
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   331
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   332
  Available tools are:
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   333
7882
wenzelm
parents: 7861
diff changeset
   334
    browser - Isabelle graph browser
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   335
    doc - view Isabelle documentation
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   336
    \dots
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   337
\end{ttbox}
7882
wenzelm
parents: 7861
diff changeset
   338
Basically, Isabelle tools are ordinary executable scripts.  These are run
wenzelm
parents: 7861
diff changeset
   339
within the same Isabelle settings environment, see \S\ref{sec:settings}.  The
wenzelm
parents: 7861
diff changeset
   340
set of available tools is collected by \texttt{isatool} from the directories
wenzelm
parents: 7861
diff changeset
   341
listed in the \texttt{ISABELLE_TOOLS} setting.  Do not try to call the scripts
wenzelm
parents: 7861
diff changeset
   342
directly.  Neither should you add the tool directories to your shell's search
wenzelm
parents: 7861
diff changeset
   343
path.
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   344
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   345
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   346
\section{The Isabelle interface wrapper --- \texttt{Isabelle}} \label{sec:interface}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   347
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   348
Isabelle is a generic theorem prover, even w.r.t.\ its user interface.  The
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   349
\ttindex{Isabelle} command (note the capital \texttt{I}) provides a uniform
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   350
way for end-users to invoke a certain interface; which one to start actually
7882
wenzelm
parents: 7861
diff changeset
   351
is determined by the \settdx{ISABELLE_INTERFACE} setting variable.  Also note
wenzelm
parents: 7861
diff changeset
   352
that the \texttt{install} utility provides some options to install desktop
wenzelm
parents: 7861
diff changeset
   353
environment icons as well (see \S\ref{sec:tool-install}).
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   354
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   355
An interface may be specified either by giving an identifier that the Isabelle
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   356
distribution knows about, or by specifying an actual path name (containing a
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   357
slash ``\texttt{/}'') of some executable.  Currently, the following interfaces
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   358
are available:
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   359
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   360
\begin{itemize}
7882
wenzelm
parents: 7861
diff changeset
   361
\item \texttt{none} is just a pass-through to plain \texttt{isabelle}. Thus
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   362
  \texttt{Isabelle} basically becomes an alias for \texttt{isabelle}.
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   363
  
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   364
\item \texttt{xterm} refers to a simple xterm based interface which is part of
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   365
  the Isabelle distribution.
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   366
  
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   367
\item \texttt{emacs} refers to David Aspinall's \emph{Isamode}\index{user
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   368
    interface!Isamode} for emacs.  Isabelle just provides a wrapper for this,
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   369
  the actual Isamode distribution is available elsewhere \cite{isamode}.
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   370
  
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   371
\item Proof~General~\cite{proofgeneral}\index{user interface!Proof General} of
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   372
  LFCS Edinburgh is distributed with separate interface wrapper scripts for
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   373
  Isabelle.  See below for more details.
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   374
\end{itemize}
3278
636322bfd057 release version (sort of);
wenzelm
parents: 3262
diff changeset
   375
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   376
The factory default for \texttt{ISABELLE_INTERFACE} is \texttt{xterm}.  This
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   377
interface runs \texttt{isabelle} within its own \textsl{xterm} window.
7882
wenzelm
parents: 7861
diff changeset
   378
Usually, display of mathematical symbols from the Isabelle font is enabled as
wenzelm
parents: 7861
diff changeset
   379
well (see \S\ref{sec:tool-installfonts} for X11 font configuration issues).
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   380
Furthermore, different kinds of identifiers in logical terms are highlighted
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   381
appropriately, e.g.\ free variables in bold and bound variables underlined.
7861
wenzelm
parents: 7849
diff changeset
   382
There are some more options available, just pass ``\texttt{-?}'' to get the
wenzelm
parents: 7849
diff changeset
   383
usage printed.
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   384
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   385
\medskip Proof~General\index{user interface!Proof General} is a much more
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   386
advanced interface.  It supports both classic Isabelle (as
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   387
\texttt{ProofGeneral/isa}) and Isabelle/Isar (as \texttt{ProofGeneral/isar}).
7882
wenzelm
parents: 7861
diff changeset
   388
Note that the latter is inherently more robust.
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   389
7882
wenzelm
parents: 7861
diff changeset
   390
Using the Isabelle interface wrapper scripts as provided by Proof~General, a
wenzelm
parents: 7861
diff changeset
   391
typical setup for Isabelle/Isar would be like this:
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   392
\begin{ttbox}
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   393
ISABELLE_INTERFACE=\$ISABELLE_HOME/contrib/ProofGeneral/isar/interface
7882
wenzelm
parents: 7861
diff changeset
   394
PROOFGENERAL_OPTIONS="-u false"
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   395
\end{ttbox}
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   396
Thus \texttt{Isabelle} would automatically invoke Emacs with proper setup of
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   397
the Proof~General Lisp packages.  There are some options available, such as
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   398
\texttt{-l} for passing the logic image to be used.
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   399
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   400
\medskip Note that the world may be also seen the other way round: Emacs may
7882
wenzelm
parents: 7861
diff changeset
   401
be started first (with proper setup of Proof~General mode), and
wenzelm
parents: 7861
diff changeset
   402
\texttt{isabelle} run from within.  This requires further Emacs Lisp
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   403
configuration, see the Proof~General documentation \cite{proofgeneral} for
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   404
more information.
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   405
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   406
%%% Local Variables:
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   407
%%% mode: latex
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   408
%%% TeX-master: "system"
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   409
%%% End: