doc-src/System/basics.tex
author wenzelm
Thu, 03 Jul 2008 13:17:19 +0200
changeset 27461 c2bba6a4d750
parent 25628 94bb4a85d35d
permissions -rw-r--r--
specific to CVS; some updates for Java etc.;
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
13047
wenzelm
parents: 12464
diff changeset
     7
as seen from an outside (system oriented) view.  See also the
wenzelm
parents: 12464
diff changeset
     8
\emph{Isabelle/Isar Reference Manual}~\cite{isabelle-isar-ref} and the
wenzelm
parents: 12464
diff changeset
     9
\emph{Isabelle Reference Manual}~\cite{isabelle-ref} for the actual Isabelle
wenzelm
parents: 12464
diff changeset
    10
commands and related functions.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    11
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    12
\medskip The Isabelle system environment emerges from a few general concepts.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    13
\begin{itemize}
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    14
\item The \emph{Isabelle settings mechanism} provides environment variables to
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    15
  all Isabelle programs (including tools and user interfaces).
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    16
\item The \emph{Isabelle tools wrapper} (\ttindex{isatool}) provides a generic
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    17
  startup platform for Isabelle related utilities.  Thus tools automatically
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    18
  benefit from the settings mechanism.
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    19
\item The raw \emph{Isabelle process} (\ttindex{isabelle} or
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    20
  \texttt{isabelle-process}) runs logic sessions either interactively or in
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    21
  batch mode.  In particular, this view abstracts over the invocation of the
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    22
  actual {\ML} system to be used.
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    23
\item The \emph{Isabelle interface wrapper} (\ttindex{Isabelle} or
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    24
  \texttt{isabelle-interface}) provides some abstraction over the actual user
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    25
  interface to be used.  The de-facto standard interface for Isabelle is
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    26
  Proof~General \cite{proofgeneral}.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    27
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    28
13047
wenzelm
parents: 12464
diff changeset
    29
\medskip The beginning user would probably just run the default user interface
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    30
(by invoking the capital \texttt{Isabelle}).  This assumes that the system has
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    31
already been installed, of course.  In case you have to do this yourself, see
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    32
the \ttindex{INSTALL} file in the top-level directory of the distribution of
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    33
how to proceed; binary packages for various system components are available as
f9d3c92eae4d updated;
wenzelm
parents: 11582
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
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    40
  mechanism}\indexbold{settings}.  Essentially, this is a statically scoped
7882
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
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    47
user-friendly than global 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
7883
wenzelm
parents: 7882
diff changeset
    51
scripts, before being able to actually run the program. Isabelle requires none
wenzelm
parents: 7882
diff changeset
    52
such administrative chores of its end-users --- the executables can be invoked
wenzelm
parents: 7882
diff changeset
    53
straight away.\footnote{Occasionally, users would still want to put the
wenzelm
parents: 7882
diff changeset
    54
  Isabelle \texttt{bin} directory into their shell's search path, but this is
wenzelm
parents: 7882
diff changeset
    55
  not required.}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    56
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
    57
13047
wenzelm
parents: 12464
diff changeset
    58
\subsection{Building 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
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
    61
put together 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
7883
wenzelm
parents: 7882
diff changeset
    69
  in the distribution directory, or via the executable objects created by the
7882
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
  
13047
wenzelm
parents: 12464
diff changeset
    76
  This file holds a rather long list of shell variable assigments, thus
wenzelm
parents: 12464
diff changeset
    77
  providing the site-wide default settings.  The Isabelle distribution already
wenzelm
parents: 12464
diff changeset
    78
  contains a global settings file with sensible defaults for most variables.
wenzelm
parents: 12464
diff changeset
    79
  When installing the system, only a few of these may have to be adapted
wenzelm
parents: 12464
diff changeset
    80
  (probably \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
7883
wenzelm
parents: 7882
diff changeset
    98
complex shell commands, such as \texttt{if} or \texttt{case} statements to set
wenzelm
parents: 7882
diff changeset
    99
variables depending on the system architecture or other environment variables.
wenzelm
parents: 7882
diff changeset
   100
Such advanced features should be added only with great care, though. In
wenzelm
parents: 7882
diff changeset
   101
particular, external environment references should be kept at a minimum.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   102
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   103
\medskip A few variables are somewhat special:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   104
\begin{itemize}
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   105
\item \settdx{ISABELLE} and \settdx{ISATOOL} are set automatically to the
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   106
  absolute path names of the \texttt{isabelle-process} and \texttt{isatool}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   107
  executables, respectively.
6414
wenzelm
parents: 6412
diff changeset
   108
  
25433
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   109
\item \settdx{ISABELLE_OUTPUT} will have the identifiers of the
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   110
  Isabelle distribution (cf.\ \texttt{ISABELLE_IDENTIFIER}) and the
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   111
  {\ML} system (cf.\ \texttt{ML_IDENTIFIER}) appended automatically to
21469
1e45e9ef327e ML_IDENTIFIER includes Isabelle version;
wenzelm
parents: 20930
diff changeset
   112
  its value.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   113
\end{itemize}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   114
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   115
\medskip The Isabelle settings scheme is conceptually simple, but not
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   116
completely trivial.  For debugging purposes, the resulting environment may be
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   117
inspected with the \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
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   129
  executable that has been invoked.  Do not attempt to set
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   130
  \texttt{ISABELLE_HOME} yourself from the shell.
7882
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
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   140
  path names of the \texttt{isabelle-process} and \texttt{isatool}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   141
  executables, respectively.  Thus other tools and scripts need not assume
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   142
  that the Isabelle \texttt{bin} directory is on the current search path of
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   143
  the shell.
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   144
  
25433
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   145
\item[\settdx{ISABELLE_IDENTIFIER}*] refers to the name of this
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   146
  Isabelle distribution, e.g.\ ``\texttt{Isabelle2007}''.
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 23887
diff changeset
   147
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   148
\item[\settdx{ML_SYSTEM}, \settdx{ML_HOME}, \settdx{ML_OPTIONS},
6414
wenzelm
parents: 6412
diff changeset
   149
  \settdx{ML_PLATFORM}, \settdx{ML_IDENTIFIER}*] specify the underlying {\ML}
7882
wenzelm
parents: 7861
diff changeset
   150
  system to be used for Isabelle.  There is only a fixed set of admissable
wenzelm
parents: 7861
diff changeset
   151
  \texttt{ML_SYSTEM} names (see the \texttt{etc/settings} file of the
wenzelm
parents: 7861
diff changeset
   152
  distribution).
wenzelm
parents: 7861
diff changeset
   153
  
wenzelm
parents: 7861
diff changeset
   154
  The actual compiler binary will be run from the directory \texttt{ML_HOME},
wenzelm
parents: 7861
diff changeset
   155
  with \texttt{ML_OPTIONS} as first arguments on the command line.  The
wenzelm
parents: 7861
diff changeset
   156
  optional \texttt{ML_PLATFORM} may specify the binary format of ML heap
wenzelm
parents: 7861
diff changeset
   157
  images, which is useful for cross-platform installations.  The value of
21469
1e45e9ef327e ML_IDENTIFIER includes Isabelle version;
wenzelm
parents: 20930
diff changeset
   158
  \texttt{ML_IDENTIFIER} is automatically obtained by composing the values of
1e45e9ef327e ML_IDENTIFIER includes Isabelle version;
wenzelm
parents: 20930
diff changeset
   159
  \texttt{ML_SYSTEM}, \texttt{ML_PLATFORM} and the Isabelle version values.
6414
wenzelm
parents: 6412
diff changeset
   160
  
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   161
\item[\settdx{ISABELLE_PATH}] is a list of directories (separated by colons)
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   162
  where Isabelle logic images may reside.  When looking up heaps files, the
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   163
  value of \texttt{ML_IDENTIFIER} is appended to each component internally.
7882
wenzelm
parents: 7861
diff changeset
   164
  
wenzelm
parents: 7861
diff changeset
   165
\item[\settdx{ISABELLE_OUTPUT}*] is a directory where output heap files should
21469
1e45e9ef327e ML_IDENTIFIER includes Isabelle version;
wenzelm
parents: 20930
diff changeset
   166
  be stored by default. The {\ML} system and Isabelle version identifier is
1e45e9ef327e ML_IDENTIFIER includes Isabelle version;
wenzelm
parents: 20930
diff changeset
   167
  appended here, too.
7882
wenzelm
parents: 7861
diff changeset
   168
  
wenzelm
parents: 7861
diff changeset
   169
\item[\settdx{ISABELLE_BROWSER_INFO}] is the directory where theory browser
wenzelm
parents: 7861
diff changeset
   170
  information (HTML text, graph data, and printable documents) is stored (see
wenzelm
parents: 7861
diff changeset
   171
  also \S\ref{sec:info}).  The default value is
4555
wenzelm
parents: 4547
diff changeset
   172
  \texttt{\$ISABELLE_HOME_USER/browser_info}.
7882
wenzelm
parents: 7861
diff changeset
   173
  
wenzelm
parents: 7861
diff changeset
   174
\item[\settdx{ISABELLE_LOGIC}] specifies the default logic to load if none is
wenzelm
parents: 7861
diff changeset
   175
  given explicitely by the user.  The default value is \texttt{HOL}.
wenzelm
parents: 7861
diff changeset
   176
  
25628
94bb4a85d35d added ISABELLE_LINE_EDITOR setting;
wenzelm
parents: 25524
diff changeset
   177
\item[\settdx{ISABELLE_LINE_EDITOR}] specifies the default line editor
94bb4a85d35d added ISABELLE_LINE_EDITOR setting;
wenzelm
parents: 25524
diff changeset
   178
  for \texttt{isatool tty} (see also \S\ref{sec:tool-tty}).
94bb4a85d35d added ISABELLE_LINE_EDITOR setting;
wenzelm
parents: 25524
diff changeset
   179
7882
wenzelm
parents: 7861
diff changeset
   180
\item[\settdx{ISABELLE_USEDIR_OPTIONS}] is implicitly prefixed to the command
wenzelm
parents: 7861
diff changeset
   181
  line of any \texttt{isatool usedir} invocation (see also
wenzelm
parents: 7861
diff changeset
   182
  \S\ref{sec:tool-usedir}). This typically contains compilation options for
wenzelm
parents: 7861
diff changeset
   183
  object-logics --- \texttt{usedir} is the basic utility for managing logic
wenzelm
parents: 7861
diff changeset
   184
  sessions (cf.\ the \texttt{IsaMakefile}s in the distribution).
23887
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   185
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   186
\item[\settdx{ISABELLE_FILE_IDENT}] specifies a shell command for
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   187
  producing a source file identification, based on the actual content
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   188
  instead of the full physical path and date stamp (which is the
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   189
  default). A typical identification would produce a ``digest'' of the
e8a3b98995fe added ISABELLE_FILE_IDENT;
wenzelm
parents: 21469
diff changeset
   190
  text, using a cryptographic hash function like SHA-1, for example.
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   191
  
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   192
\item[\settdx{ISABELLE_LATEX}, \settdx{ISABELLE_PDFLATEX},
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   193
  \settdx{ISABELLE_BIBTEX}, \settdx{ISABELLE_DVIPS}] refer to {\LaTeX} related
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   194
  tools for Isabelle document preparation (see also \S\ref{sec:tool-latex}).
7882
wenzelm
parents: 7861
diff changeset
   195
  
wenzelm
parents: 7861
diff changeset
   196
\item[\settdx{ISABELLE_TOOLS}] is a colon separated list of directories that
wenzelm
parents: 7861
diff changeset
   197
  are scanned by \texttt{isatool} for external utility programs (see also
wenzelm
parents: 7861
diff changeset
   198
  \S\ref{sec:isatool}).
wenzelm
parents: 7861
diff changeset
   199
  
wenzelm
parents: 7861
diff changeset
   200
\item[\settdx{ISABELLE_DOCS}] is a colon separated list of directories with
wenzelm
parents: 7861
diff changeset
   201
  documentation files.
wenzelm
parents: 7861
diff changeset
   202
  
15685
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   203
\item[\settdx{ISABELLE_DOC_FORMAT}] specifies the preferred document format,
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   204
  typically \texttt{dvi} or \texttt{pdf}.
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   205
  
7882
wenzelm
parents: 7861
diff changeset
   206
\item[\settdx{DVI_VIEWER}] specifies the command to be used for displaying
wenzelm
parents: 7861
diff changeset
   207
  \texttt{dvi} files.
wenzelm
parents: 7861
diff changeset
   208
  
15685
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   209
\item[\settdx{PDF_VIEWER}] specifies the command to be used for displaying
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   210
  \texttt{pdf} files.
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   211
  
14933
3fd8c03e3ee6 added PRINT_COMMAND setting
wenzelm
parents: 13047
diff changeset
   212
\item[\settdx{PRINT_COMMAND}] specifies the standard printer spool command,
15685
64f76b974a8d added PDF_VIEWER, ISABELLE_DOC_FORMAT;
wenzelm
parents: 14933
diff changeset
   213
  which is expected to accept \texttt{ps} files.
14933
3fd8c03e3ee6 added PRINT_COMMAND setting
wenzelm
parents: 13047
diff changeset
   214
  
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   215
\item[\settdx{ISABELLE_TMP_PREFIX}*] is the prefix from which any running
7882
wenzelm
parents: 7861
diff changeset
   216
  \texttt{isabelle} process derives an individual directory for temporary
wenzelm
parents: 7861
diff changeset
   217
  files.  The default is somewhere in \texttt{/tmp}.
wenzelm
parents: 7861
diff changeset
   218
  
wenzelm
parents: 7861
diff changeset
   219
\item[\settdx{ISABELLE_INTERFACE}] is an identifier that specifies the actual
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   220
  user interface that the capital \texttt{Isabelle} or
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   221
  \texttt{isabelle-interface} should invoke.  See \S\ref{sec:interface} for
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   222
  more details.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   223
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   224
\end{description}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   225
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   226
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   227
\section{The Isabelle tools wrapper} \label{sec:isatool}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   228
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   229
All Isabelle related utilities are called via a common wrapper ---
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   230
\ttindex{isatool}:
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   231
\begin{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   232
Usage: isatool TOOL [ARGS ...]
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   233
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   234
  Start Isabelle utility program TOOL with ARGS. Pass "-?" to TOOL
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   235
  for more specific help.
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   236
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   237
  Available tools are:
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   238
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   239
    browser - Isabelle graph browser
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   240
    \dots
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   241
\end{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   242
In principle, Isabelle tools are ordinary executable scripts that are run
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   243
within the Isabelle settings environment, see \S\ref{sec:settings}.  The set
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   244
of available tools is collected by \texttt{isatool} from the directories
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   245
listed in the \texttt{ISABELLE_TOOLS} setting.  Do not try to call the scripts
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   246
directly from the shell.  Neither should you add the tool directories to your
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   247
shell's search path!
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   248
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   249
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   250
\subsubsection*{Examples}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   251
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   252
Show the list of available documentation of the current Isabelle installation
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   253
like this:
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   254
\begin{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   255
  isatool doc
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   256
\end{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   257
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   258
View a certain document as follows:
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   259
\begin{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   260
  isatool doc isar-ref
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   261
\end{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   262
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   263
Create an Isabelle session derived from HOL (see also \S\ref{sec:tool-mkdir}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   264
and \S\ref{sec:tool-make}):
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   265
\begin{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   266
  isatool mkdir HOL Test && isatool make
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   267
\end{ttbox}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   268
Note that \texttt{isatool mkdir} is usually only invoked once; existing
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   269
sessions (including document output etc.) are then updated by \texttt{isatool
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   270
  make} alone.
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   271
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   272
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   273
\section{The raw Isabelle process}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   274
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   275
The \ttindex{isabelle} (or \ttindex{isabelle-process}) executable runs
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   276
bare-bones Isabelle logic sessions --- either interactively or in batch mode.
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   277
It provides an abstraction over the underlying {\ML} system, and over the
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   278
actual heap file locations.  Its usage is:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   279
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   280
Usage: isabelle [OPTIONS] [INPUT] [OUTPUT]
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   281
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   282
  Options are:
10108
72a719e997b9 isabelle -C;
wenzelm
parents: 9983
diff changeset
   283
    -C           tell ML system to copy output image
5814
a3881c1f1d3c isabelle -I;
wenzelm
parents: 5364
diff changeset
   284
    -I           startup Isar interaction mode
9983
2826a1c3fe27 isabelle: -P option;
wenzelm
parents: 9790
diff changeset
   285
    -P           startup Proof General interaction mode
20930
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   286
    -S           secure mode -- disallow critical operations
25524
79f198a08c15 isabelle process: replaced option -p by -W (process wrapper);
wenzelm
parents: 25504
diff changeset
   287
    -W           startup process wrapper (interaction via external program)
20930
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   288
    -X           startup PGIP interaction mode
8362
f1dd226f5956 isabelle -c: tell ML system to compress output image;
wenzelm
parents: 7883
diff changeset
   289
    -c           tell ML system to compress output image
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   290
    -e MLTEXT    pass MLTEXT to the ML session
10900
7268a5f425f8 isabelle -f;
wenzelm
parents: 10108
diff changeset
   291
    -f           pass 'Session.finish();' to the ML session
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   292
    -m MODE      add print mode for output
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   293
    -q           non-interactive session
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   294
    -r           open heap file read-only
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   295
    -u           pass 'use"ROOT.ML";' to the ML session
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   296
    -w           reset write permissions on OUTPUT
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   297
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   298
  INPUT (default "\$ISABELLE_LOGIC") and OUTPUT specify in/out heaps.
7883
wenzelm
parents: 7882
diff changeset
   299
  These are either names to be searched in the Isabelle path, or
wenzelm
parents: 7882
diff changeset
   300
  actual file names (containing at least one /).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   301
  If INPUT is "RAW_ML_SYSTEM", just start the bare bones ML system.
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   302
\end{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   303
Input files without path specifications are looked up in the
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   304
\texttt{ISABELLE_PATH} setting, which may consist of multiple components
9790
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   305
separated by colons --- these are tried in the given order with the value of
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   306
\texttt{ML_IDENTIFIER} appended internally.  In a similar way, base names are
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   307
relative to the directory specified by \texttt{ISABELLE_OUTPUT}.  In any case,
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   308
actual file locations may also be given by including at least one slash
978c635c77f6 ISABELLE_PATH: ML_IDENTIFIER no longer added;
wenzelm
parents: 8362
diff changeset
   309
(\texttt{/}) in the name (hint: use \texttt{./} to refer to the current
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   310
directory).
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   311
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   312
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   313
\subsection*{Options}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   314
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   315
If the input heap file does not have write permission bits set, or the
7882
wenzelm
parents: 7861
diff changeset
   316
\texttt{-r} option is given explicitely, then the session started will be
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   317
read-only.  That is, the {\ML} world cannot be committed back into the image
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   318
file.  Otherwise, a writable session enables commits into either the input
13047
wenzelm
parents: 12464
diff changeset
   319
file, or into another output heap file (if that is given as the second
wenzelm
parents: 12464
diff changeset
   320
argument on the command line).
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   321
7882
wenzelm
parents: 7861
diff changeset
   322
The read-write state of sessions is determined at startup only, it cannot be
wenzelm
parents: 7861
diff changeset
   323
changed intermediately. Also note that heap images may require considerable
20930
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   324
amounts of disk space (approximately 40--80~MB). Users are responsible for
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   325
themselves to dispose their heap files when they are no longer needed.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   326
7882
wenzelm
parents: 7861
diff changeset
   327
\medskip The \texttt{-w} option makes the output heap file read-only after
wenzelm
parents: 7861
diff changeset
   328
terminating.  Thus subsequent invocations cause the logic image to be
wenzelm
parents: 7861
diff changeset
   329
read-only automatically.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   330
8362
f1dd226f5956 isabelle -c: tell ML system to compress output image;
wenzelm
parents: 7883
diff changeset
   331
\medskip The \texttt{-c} option tells the underlying ML system to compress the
f1dd226f5956 isabelle -c: tell ML system to compress output image;
wenzelm
parents: 7883
diff changeset
   332
output heap (fully transparently).  On Poly/ML for example, the image is
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   333
garbage collected and all stored values are maximally shared, resulting in up
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   334
to 50\% less disk space consumption.
8362
f1dd226f5956 isabelle -c: tell ML system to compress output image;
wenzelm
parents: 7883
diff changeset
   335
10108
72a719e997b9 isabelle -C;
wenzelm
parents: 9983
diff changeset
   336
\medskip The \texttt{-C} option tells the ML system to produce a completely
72a719e997b9 isabelle -C;
wenzelm
parents: 9983
diff changeset
   337
self-contained output image, probably including a copy of the ML runtime
72a719e997b9 isabelle -C;
wenzelm
parents: 9983
diff changeset
   338
system itself.
72a719e997b9 isabelle -C;
wenzelm
parents: 9983
diff changeset
   339
7882
wenzelm
parents: 7861
diff changeset
   340
\medskip Using the \texttt{-e} option, arbitrary {\ML} code may be passed to
wenzelm
parents: 7861
diff changeset
   341
the Isabelle session from the command line. Multiple \texttt{-e}'s are
wenzelm
parents: 7861
diff changeset
   342
evaluated in the given order. Strange things may happen when errorneous {\ML}
wenzelm
parents: 7861
diff changeset
   343
code is provided. Also make sure that the {\ML} commands are terminated
wenzelm
parents: 7861
diff changeset
   344
properly by semicolon.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   345
10900
7268a5f425f8 isabelle -f;
wenzelm
parents: 10108
diff changeset
   346
\medskip The \texttt{-u} option is a shortcut for \texttt{-e} passing
7268a5f425f8 isabelle -f;
wenzelm
parents: 10108
diff changeset
   347
``\texttt{use"ROOT.ML";}'' to the {\ML} session.  The \texttt{-f} option
7268a5f425f8 isabelle -f;
wenzelm
parents: 10108
diff changeset
   348
passes ``\texttt{Session.finish();}'', which is intended mainly for
7268a5f425f8 isabelle -f;
wenzelm
parents: 10108
diff changeset
   349
administrative purposes.
4540
24fcf5ecae88 updated to Isabelle98;
wenzelm
parents: 3278
diff changeset
   350
7882
wenzelm
parents: 7861
diff changeset
   351
\medskip The \texttt{-m} option adds identifiers of print modes to be made
wenzelm
parents: 7861
diff changeset
   352
active for this session. Typically, this is used by some user interface, e.g.\ 
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   353
to enable output of proper mathematical symbols.
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   354
7882
wenzelm
parents: 7861
diff changeset
   355
\medskip Isabelle normally enters an interactive top-level loop (after
wenzelm
parents: 7861
diff changeset
   356
processing the \texttt{-e} texts). The \texttt{-q} option inhibits
wenzelm
parents: 7861
diff changeset
   357
interaction, thus providing a pure batch mode facility.
5814
a3881c1f1d3c isabelle -I;
wenzelm
parents: 5364
diff changeset
   358
20930
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   359
\medskip The \texttt{-I} option makes Isabelle enter Isar interaction
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   360
mode on startup, instead of the primitive {\ML} top-level.  The
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   361
\texttt{-P} option configures the top-level loop for interaction with
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   362
the Proof~General user interface, and the \texttt{-X} option enables
25524
79f198a08c15 isabelle process: replaced option -p by -W (process wrapper);
wenzelm
parents: 25504
diff changeset
   363
XML-based PGIP communication.  The \texttt{-W} option makes Isabelle
79f198a08c15 isabelle process: replaced option -p by -W (process wrapper);
wenzelm
parents: 25504
diff changeset
   364
enter a special process wrapper for interaction via an external
79f198a08c15 isabelle process: replaced option -p by -W (process wrapper);
wenzelm
parents: 25504
diff changeset
   365
program; the protocol is a stripped-down version of Proof~General the
79f198a08c15 isabelle process: replaced option -p by -W (process wrapper);
wenzelm
parents: 25504
diff changeset
   366
interaction mode.
20930
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   367
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   368
\medskip The \texttt{-S} option makes the Isabelle process more secure
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   369
by disabling some critical operations, notably runtime compilation and
7ab9fa7d658f isabelle-process: options -S, -X;
wenzelm
parents: 15981
diff changeset
   370
evaluation of ML source code.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   371
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   372
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   373
\subsection*{Examples}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   374
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   375
Run an interactive session of the default object-logic (as specified
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   376
by the \texttt{ISABELLE_LOGIC} setting) like this:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   377
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   378
isabelle
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   379
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   380
Usually \texttt{ISABELLE_LOGIC} refers to one of the standard logic
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   381
images, which are read-only by default.  A writable session --- based
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   382
on \texttt{FOL}, but output to \texttt{Foo} (in the directory
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   383
specified by the \texttt{ISABELLE_OUTPUT} setting) --- may be invoked
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   384
as follows:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   385
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   386
isabelle FOL Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   387
\end{ttbox}
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   388
Ending this session normally (e.g.\ by typing control-D) dumps the whole {\ML}
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   389
system state into \texttt{Foo}. Be prepared for several tens of megabytes.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   390
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   391
The \texttt{Foo} session may be continued later (still in writable
3262
7115da553895 under construction;
wenzelm
parents: 3217
diff changeset
   392
state) by:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   393
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   394
isabelle Foo
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   395
\end{ttbox}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   396
A read-only \texttt{Foo} session may be started by:
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   397
\begin{ttbox}
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   398
isabelle -r Foo
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   399
\end{ttbox}
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   400
7849
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   401
\medskip Note that manual session management like this does \emph{not} provide
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   402
proper setup for theory presentation.  This would require the \texttt{usedir}
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   403
utility, see \S\ref{sec:tool-usedir}.
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   404
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   405
\bigskip The next example demonstrates batch execution of Isabelle. We print a
29a2a1d71128 updated;
wenzelm
parents: 7252
diff changeset
   406
certain theorem of \texttt{FOL}:
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   407
\begin{ttbox}
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   408
isabelle -e "prth allE;" -q -r FOL
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   409
\end{ttbox}
7882
wenzelm
parents: 7861
diff changeset
   410
Note that the output text will be interspersed with additional junk messages
wenzelm
parents: 7861
diff changeset
   411
by the {\ML} runtime environment.
3188
445555a7b714 preliminary!
wenzelm
parents:
diff changeset
   412
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   413
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   414
\section{The Isabelle interface wrapper}\label{sec:interface}
3217
d30d62128fe5 still under construction!
wenzelm
parents: 3188
diff changeset
   415
7208
8b4acb408301 user infaces: tuned, added ProofGeneral;
wenzelm
parents: 6414
diff changeset
   416
Isabelle is a generic theorem prover, even w.r.t.\ its user interface.  The
12464
f9d3c92eae4d updated;
wenzelm
parents: 11582
diff changeset
   417
\ttindex{Isabelle} (or \ttindex{isabelle-interface}) executable provides a
13047
wenzelm
parents: 12464
diff changeset
   418
uniform way for end-users to invoke a certain interface; which one to start is
15981
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   419
determined by the \settdx{ISABELLE_INTERFACE} setting variable, which should
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   420
give a full path specification to the actual executable.  Also note that the
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   421
\texttt{install} utility provides some options to install desktop environment
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   422
icons (see \S\ref{sec:tool-install}).
11582
f666c1e4133d updated;
wenzelm
parents: 10900
diff changeset
   423
15981
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   424
Presently, the most prominent Isabelle interface is
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   425
Proof~General~\cite{proofgeneral}\index{user interface!Proof General}.  There
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   426
are separate versions for the raw ML top-level and the proper Isabelle/Isar
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   427
interpreter loop.  The Proof~General distribution includes separate interface
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   428
wrapper scripts (in \texttt{ProofGeneral/isa} and \texttt{ProofGeneral/isar})
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   429
for either of these.  The canonical settings for Isabelle/Isar are as follows:
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   430
\begin{ttbox}
11582
f666c1e4133d updated;
wenzelm
parents: 10900
diff changeset
   431
ISABELLE_INTERFACE=\$ISABELLE_HOME/contrib/ProofGeneral/isar/interface
f666c1e4133d updated;
wenzelm
parents: 10900
diff changeset
   432
PROOFGENERAL_OPTIONS=""
15981
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   433
\end{ttbox}
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   434
Thus \texttt{Isabelle} would automatically invoke Emacs with proper setup of
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   435
the Proof~General Lisp packages.  There are some options available, such as
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   436
\texttt{-l} for passing the logic image to be used by default, or \texttt{-m}
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   437
to tune the standard print mode.  The \texttt{-I} option allows to switch
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   438
between the Isar and ML view, independently of the interface script being
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   439
used.
11582
f666c1e4133d updated;
wenzelm
parents: 10900
diff changeset
   440
  
15981
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   441
\medskip Note that the world may be also seen the other way round: Emacs may
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   442
be started first (with proper setup of Proof~General mode), and
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   443
\texttt{isabelle} run from within.  This requires further Emacs Lisp
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   444
configuration, see the Proof~General documentation \cite{proofgeneral} for
38db39971a5a no longer support isa-FOO interface;
wenzelm
parents: 15685
diff changeset
   445
more information.
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   446
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   447
%%% Local Variables:
5364
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   448
%%% mode: latex
ffa6d795c4b3 emacs local vars;
wenzelm
parents: 4555
diff changeset
   449
%%% TeX-master: "system"
6412
9309bc455432 ML_PLATFORM;
wenzelm
parents: 5814
diff changeset
   450
%%% End: