doc-src/System/basics.tex
author wenzelm
Fri, 16 May 1997 15:57:11 +0200
changeset 3217 d30d62128fe5
parent 3188 445555a7b714
child 3262 7115da553895
permissions -rw-r--r--
still under construction!
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{Basic concepts}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     5
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     6
The \emph{Isabelle System Manual} describes Isabelle together with its
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
     7
related tools and user interfaces --- as seen from an outside
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     8
(operating system oriented) view.  See the \emph{Isabelle Reference
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
     9
  Manual} for all internal {\ML} level user commands, on the other
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    10
hand.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    11
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    12
\medskip The Isabelle system level environment is based on a few
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    13
general concepts:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    14
\begin{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    15
\item The \emph{Isabelle settings mechanism}, which provides
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    16
  environment variables to all Isabelle programs (including tools and
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    17
  user interfaces).
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    18
\item \emph{Isabelle proper} (\ttindex{isabelle}), which runs logic
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    19
  sessions, both interactively or in batch mode. In particular,
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    20
  \texttt{isabelle} abstracts over the invocation of the actual {\ML}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    21
  system to be used.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    22
\item The \emph{Isabelle tools wrapper} (\ttindex{isatool}), which
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    23
  provides a generic startup platform for Isabelle related utilities.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    24
  Thus tools automatically benefit from the settings mechanism.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    25
  Furthermore, the shell's search path is kept clean from many small
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    26
  programs.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    27
\item The \emph{Isabelle interface wrapper}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    28
  (\ttindex{Isabelle}\footnote{Note the capital \texttt{I}!}), which
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    29
  provides some abstraction over the actual user interface to be used.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    30
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    31
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    32
\medskip The beginning user would probably just run one of the
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    33
interfaces (by invoking the capital \texttt{Isabelle}), and maybe some
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    34
basic other tools like \texttt{doc} (see \S\ref{sec:tool-doc}).  This
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    35
assumes that the system has already been installed properly, of
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    36
course.\footnote{In case you have to do this yourself from scratch,
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    37
  see the \ttindex{INSTALL} file in the top-level directory of the
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    38
  distribution. The information provided there should be sufficient as
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    39
  a start.}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    40
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    41
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    42
\section{Isabelle settings} \label{sec:settings}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    43
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    44
The Isabelle system heavily depends on the \emph{settings
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    45
  mechanism}\indexbold{settings}. Basically, this is just a collection
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    46
of environment variables, e.g.\ \texttt{ISABELLE_HOME},
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    47
\texttt{ML_SYSTEM}, \texttt{ML_HOME}.  These variables are \emph{not}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    48
intended to be set directly from the shell!
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    49
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    50
Isabelle employs a somewhat more sophisticated scheme of
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    51
\emph{settings files} --- one for site-wide defaults, another for
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    52
optional user-specific modifications.  With all configuration
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    53
variables in only one or two places, this is considered much more
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    54
maintainable and user-friendly than ordinary shell environment
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    55
variables.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    56
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    57
In particular, we avoid the typical situation where prospective users
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    58
of a software package are told to put this and that in their shell
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    59
startup scripts. Isabelle requires none such administrative chores of
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    60
its end-users --- the executables can be run straight away. Usually,
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    61
users would want to put the Isabelle \texttt{bin} directory into their
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    62
shell's search path, of course.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    63
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    64
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    65
\subsection{Building the environment}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    66
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    67
Whenever any of the Isabelle executables is run, theri settings
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    68
environment is built as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    69
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    70
\begin{enumerate}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    71
\item The special variable \settdx{ISABELLE_HOME} is determined
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    72
  automatically from the location of the binary that has been run.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    73
  
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    74
  You should not try to set \texttt{ISABELLE_HOME} manually. Also note
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    75
  that the Isabelle executables have to be run from their original
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    76
  location in the distribution directory --- copying or linking them
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    77
  somewhere else just won't work!
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    78
  
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    79
\item The file \texttt{\$ISABELLE_HOME/etc/settings} ist run as a
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    80
  shell script with the auto-export option for variables enabled.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    81
  
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    82
  This file typically contains a rather long list of assigments
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    83
  \texttt{FOO="bar"}, thus providing the site-wide default settings.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    84
  The Isabelle distribution already contains a global settings file
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    85
  with sensible defaults for most variables. When installing the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    86
  system, only a few of these have to be adapted (most likely
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    87
  \texttt{ML_SYSTEM} etc.).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    88
  
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    89
\item The file \texttt{\$ISABELLE_HOME_USER/etc/settings} (if it
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    90
  exists) is run the same way as the site default settings. The
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    91
  variable \texttt{ISABELLE_HOME_USER} has already been set before ---
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    92
  usually to \texttt{\~\relax/isabelle}.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    93
  
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    94
  Thus individual users may override the site-wide defaults. See also
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    95
  file \texttt{etc/user-settings.sample} in the distribution.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    96
  Typically, user settings are a few lines only, just containing the
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    97
  assigments that are really required.  One should definitely
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    98
  \emph{not} start with a full copy the central
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
    99
  \texttt{\$ISABELLE_HOME/etc/settings}. This could cause very anoying
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   100
  maintainance problems later, when the Isabelle installation is
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   101
  updated or changed otherwise.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   102
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   103
\end{enumerate}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   104
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   105
Note that settings files are actually full GNU bash scripts. So one
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   106
may use complex shell commands, say \texttt{if} or \texttt{case}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   107
statements to set variables depending on the system architecture or
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   108
other environment variables, for example. Such advanced features
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   109
should be added only with great care, though. In particular, external
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   110
environment references should be kept at a minimum.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   111
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   112
\medskip A few variables are somewhat special:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   113
\begin{itemize}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   114
\item \settdx{ISABELLE} and \settdx{ISATOOL} are set automatically to
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   115
  the absolute path names of the \texttt{isabelle} and
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   116
  \texttt{isatool} executables, respectively.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   117
  
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   118
\item \settdx{ISABELLE_PATH} and \settdx{ISABELLE_OUTPUT} will have
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   119
  the {\ML} system identifier (as specified by \texttt{ML_SYSTEM})
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   120
  automatically appended to their values.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   121
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   122
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   123
\medskip The Isabelle settings scheme is basically quite simple, but
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   124
non-trivial.  For debugging purposes, the generated environment may be
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   125
inspected with the \texttt{getenv} utility, see
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   126
\S\ref{sec:tool-getenv}.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   127
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   128
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   129
\subsection{Common variables}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   130
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   131
Below is a reference of common Isabelle settings variables. Note that
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   132
the list is somewhat open-ended. Third-party utilities or interfaces
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   133
may add their own selection. Variables that are special in some sense
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   134
are marked with *.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   135
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   136
\begin{description}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   137
\item[\settdx{ISABELLE_HOME}*] is the location of the top-level
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   138
  Isabelle distribution directory. This is automatically determined
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   139
  from the Isabelle executable that has been invoked.  Do not try to
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   140
  set \texttt{ISABELLE_HOME} yourself from the shell.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   141
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   142
\item[\settdx{ISABELLE_HOME_USER}] is the user-specific counterpart of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   143
  \texttt{ISABELLE_HOME}. The default value is
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   144
  \texttt{\~\relax/isabelle}, under rare circumstances this may be
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   145
  changed in the global setting file.  Typically, the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   146
  \texttt{ISABELLE_HOME_USER} directory mimics \texttt{ISABELLE_HOME}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   147
  to some extend. In particular, site-wide defaults may be overridden
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   148
  by a private \texttt{etc/settings}.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   149
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   150
\item[\settdx{ISABELLE}*, \settdx{ISATOOL}*] are automatically set to
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   151
  the full paths of the \texttt{isabelle} and \texttt{isatool}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   152
  executables, respectively.  Thus other tools and scripts need not
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   153
  assume that the Isabelle \texttt{bin} directory is on the current
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   154
  search path of the shell.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   155
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   156
\item[\settdx{ML_SYSTEM}, \settdx{ML_HOME}, \settdx{ML_OPTIONS}]
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   157
  specify the underlying {\ML} system to be used for Isabelle.  The
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   158
  choice of \texttt{ML_SYSTEM} identifiers is quite fixed, see the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   159
  global \texttt{etc/settings} file for some examples. The actual
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   160
  compiler binary will be run from directory \texttt{ML_HOME}, with
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   161
  \texttt{ML_OPTIONS} as first arguments on the command line.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   162
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   163
\item[\settdx{ISABELLE_PATH}*] is a list of directories (separated by
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   164
  colons) where Isabelle logic images may reside. Note that the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   165
  \texttt{ML_SYSTEM} identifier is appended to each component
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   166
  automatically.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   167
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   168
\item[\settdx{ISABELLE_OUTPUT}*] is a directory where output heap
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   169
  files should be stored. The \texttt{ML_SYSTEM} identifier is
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   170
  appended here, too.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   171
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   172
\item[\settdx{ISABELLE_LOGIC}] specifies the default logic to load if
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   173
  none is given explicitely by the user --- e.g.\ when running
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   174
  \texttt{isabelle} directly, or some user interface.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   175
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   176
\item[\settdx{ISABELLE_USEDIR_OPTIONS}] is implicitely prefixed to the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   177
  command line of any \texttt{isatool usedir} invocation (see also
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   178
  \S\ref{sec:tool-usedir}). This typically contains compilation
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   179
  options for object-logics --- \texttt{usedir} is the basic utility
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   180
  that builds them (cf.\ the \texttt{IsaMakefile}s in the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   181
  distribution).
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   182
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   183
\item[\settdx{ISABELLE_TOOLS}] is a colon separated list of
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   184
  directories that are scanned by \texttt{isatool} for utility
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   185
  programs (see also \S\ref{sec:isatool}).
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   186
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   187
\item[\settdx{ISABELLE_DOCS}] is a colon separated list of directories
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   188
  with documentation files.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   189
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   190
\item[\settdx{DVI_VIEWER}] specifies the program to be used for
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   191
  displaying \texttt{dvi} files.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   192
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   193
\item[\settdx{ISABELLE_INSTALL_FONTS}] determines the way that the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   194
  Isabelle symbol fonts are installed into your running X11 display
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   195
  server. X11 fonts are a non-trivial issue, see \S\ref{sec:fonts} for
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   196
  more information.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   197
  
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   198
\item[\settdx{ISABELLE_INTERFACE}] is an identifier that specifies the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   199
  actual user interface that the capital \texttt{Isabelle} should
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   200
  invoke.  Currently available are \texttt{none}, \texttt{xterm} and
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   201
  \texttt{emacs}. See \S\ref{sec:interface} for more details.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   202
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   203
\end{description}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   204
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   205
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   206
\section{Isabelle proper --- \texttt{isabelle}}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   207
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   208
The \ttindex{isabelle} executable runs logic sessions --- either
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   209
interactively or in batch mode. It provides an abstraction over the
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   210
underlying {\ML} system, and over the actual heap file locations. Its
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   211
usage is:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   212
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   213
Usage: isabelle [OPTIONS] [INPUT] [OUTPUT]
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   214
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   215
  Options are:
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   216
    -e MLTEXT    pass MLTEXT to the ML session
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   217
    -m MODE      add print mode for output
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   218
    -q           non-interactive session
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   219
    -r           open heap file read-only
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   220
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   221
  INPUT (default "\$ISABELLE_LOGIC") and OUTPUT specify in/out heaps.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   222
  These are either names to be searched in the Isabelle path, or actual
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   223
  file names (then containing at least one /).
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   224
  If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   225
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   226
Input files without path specifications are looked up in the
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   227
\texttt{ISABELLE_PATH} setting, which may consist of multiple
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   228
components separated by colons --- these are tried in order.  Short
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   229
output names are relative to the directory specified by
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   230
\texttt{ISABELLE_OUTPUT} setting.  In any case, actual file locations
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   231
could also be given by including at least one \texttt{/} in the name
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   232
(use \texttt{./} to refer to the current directory).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   233
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   234
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   235
\subsection*{Options}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   236
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   237
If the input heap file does not have write permission bits set, or the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   238
\texttt{-r} option is given explicitely, then the session will be
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   239
read-only. That is, the {\ML} world cannot be committed back into the
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   240
logic image.  Otherwise, a writable session enables commits into
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   241
either the input file, or into an alternative output heap file (in
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   242
case this is given as the second argument).
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   243
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   244
The read-write state of sessions is determined at startup only, it
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   245
cannot be changed intermediately. Also note that heap images may
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   246
require considerable amounts of disk space. Users are responsible
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   247
themselves to dispose their heap files when they are no longer needed.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   248
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   249
\medskip Using the \texttt{-e} option, arbitrary {\ML} code may be
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   250
passed to the Isabelle session from the command line. Multiple
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   251
\texttt{-e}'s are evaluated in the given order. Strange things may
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   252
happen when errorneous {\ML} code is supplied. Also make sure that
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   253
commands are terminated properly by semicolon.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   254
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   255
\medskip The \texttt{-m} option adds identifiers of print modes that
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   256
are to be made active for this session. Typically this is used by some
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   257
user interface, for example to enable output of mathematical symbols
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   258
from a special screen font. See also \S\ref{sec:tool-installfonts}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   259
about fonts and the \emph{Isabelle Reference Manual} about print modes
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   260
in general.
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   261
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   262
\medskip Isabelle normally enters an interactice {\ML} top-level loop
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   263
(after processing the \texttt{-e} texts). The \texttt{-q} option
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   264
inhibits this, thus providing a pure batch mode facility.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   265
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   266
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   267
\subsection*{Examples}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   268
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   269
Run an interactive session of the default object-logic (as specified
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   270
by the \texttt{ISABELLE_LOGIC} setting) like this:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   271
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   272
isabelle
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   273
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   274
Usually \texttt{ISABELLE_LOGIC} refers to one of the standard logic
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   275
images, which are read-only by default.  A writable session --- based
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   276
on \texttt{FOL}, but output to \texttt{Foo} (in the directory
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   277
specified by the \texttt{ISABELLE_OUTPUT} setting) --- may be invoked
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   278
as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   279
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   280
isabelle FOL Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   281
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   282
Ending this session normally (e.g.\ by typing control-D) dumps the
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   283
whole {\ML} system state into \texttt{Foo}. Be prepared for several
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   284
megabytes!
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   285
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   286
The \texttt{Foo} session may be continued later (still in writable
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   287
state) at exactly the same point:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   288
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   289
isabelle Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   290
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   291
A read-only \texttt{Foo} session may be started by:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   292
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   293
isabelle -r Foo
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   294
\end{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   295
One may also use something like \texttt{chmod~-w} on the logic image
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   296
to have them read-only automatically.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   297
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   298
\medskip The next example demonstrates batch execution of Isabelle. We
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   299
print a certain theorem of \texttt{FOL}:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   300
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   301
isabelle -e "prth allE;" -q -r FOL
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   302
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   303
Note that the output text will be usually interspersed with some
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   304
garbage produced by the {\ML} compiler.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   305
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   306
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   307
\section{The Isabelle tools wrapper --- \texttt{isatool}} \label{sec:isatool}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   308
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   309
FIXME
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   310
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   311
\section{The Isabelle interface wrapper --- \texttt{Isabelle}} \label{sec:interface}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   312
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   313
FIXME